Re: Suggestion Method Constant

From: Date: Thu, 12 Oct 2017 18:24:14 +0000
Subject: Re: Suggestion Method Constant
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-100885@lists.php.net to get a copy of this message
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 <mathiasgrimm@gmail.com>: > > 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,

« previous php.internals (#100885) next »