Hi,
Same i have in mind, for example: MyClass@myMethod
To make also some method call routing easier, e.g. in userland routers.
Transform the current approach:
$app->get("/foo", [MyClass::class, "myMethod"]);
To:
$app->get("/foo", MyClass@myMethod);
This will ease a lot, e.g. for refactoring, IDE usage and completes the code as
configuration approach for PHP.
Thanks
Michael
> Am 12.10.2017 um 19:43 schrieb Mathias Grimm <[email protected]>:
>
> I would like to suggest a method constant that could be used the same way
> we use the ::class one
>
> I don't have a strong personal preference but it could be something like:
>
> MyController::myActionMethod::method, no sure about the internals but it
> would be consistent with the one for the class.
>
> Cheers,
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php