-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b91f32
commit 353adbd
Showing
3 changed files
with
46 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
353adbd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of interesting. Playing around witht his one. Just a thought. Why return a function inside a method? Why not register the method itself? Kind of confusing given that the docs says
Mix another object into the class.
but the structure seems likeMake another object register functions/methods into the class
.353adbd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like your work is the best we can do. I tried to look for a way to rebind method to another object of a different class and seems like it is still impossible. Even
Closure::fromCallable([$mixin, $method->name])
throwsCannot bind method
error.