We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I have noticed one tricky thing in a conceptual example. Here is an interface:
interface Memento { public function getName(): string; public function getDate(): string; }
and here is restore() method from originator:
public function restore(Memento $memento): void { $this->state = $memento->getState(); echo "Originator: My state has changed to: {$this->state}\n"; }
I don't really understand how we can call getState method if interface doesn't declare it ?
The text was updated successfully, but these errors were encountered:
Hi!
Please see https://refactoring.guru/design-patterns/memento "Implementation based on an intermediate interface"
Sorry, something went wrong.
No branches or pull requests
Hello, I have noticed one tricky thing in a conceptual example.
Here is an interface:
and here is restore() method from originator:
I don't really understand how we can call getState method if interface doesn't declare it ?
The text was updated successfully, but these errors were encountered: