Created
May 12, 2024 10:16
-
-
Save andipyk/05c2ddc6a59894198b187afe0c7e176e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ParentClass { | |
public function refresh() { | |
// Original behavior in the parent class. | |
} | |
} | |
class ChildClass extends ParentClass { | |
#[\Override] | |
public function refresh() { | |
// Custom behavior overriding the new method in the parent class. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment