You can redirect calls to some properties/functions by using __get, __call.
Is there a way to do it for classes?
I would like to convert all mentions of some_class_name in the code to, MY_VERSION_some_class_name (not only for one class, it's a pattern).
This would be easy if methods / properties were the target of this renaming policy.
Can you think of a way to do it for classes in PHP?
Thanks
“__class magic method” (mediating references to class names
Moderator: General Moderators
Re: “__class magic method” (mediating references to class na
you can use method_exists() with the class name and method name to check if that method exists, or use string manipulation to convert the call to your naming convention
I would stay away from using magic methods like this though. You might change the functionality or other developers won't know where the "magic" is happening.
I would stay away from using magic methods like this though. You might change the functionality or other developers won't know where the "magic" is happening.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.