Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100885 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3061 invoked from network); 12 Oct 2017 18:30:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2017 18:30:27 -0000 Received: from [127.0.0.1] ([127.0.0.1:4158]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 86/2B-49033-3C4BFD95 for ; Thu, 12 Oct 2017 14:30:27 -0400 Authentication-Results: pb1.pair.com smtp.mail=michaeldoehler@me.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michaeldoehler@me.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain me.com designates 17.36.66.90 as permitted sender) X-PHP-List-Original-Sender: michaeldoehler@me.com X-Host-Fingerprint: 17.36.66.90 st42p61im-zteg12041301.me.com Received: from [17.36.66.90] ([17.36.66.90:40798] helo=st42p61im-zteg12041301.me.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/DA-49033-453BFD95 for ; Thu, 12 Oct 2017 14:24:21 -0400 Received: from process-dkim-sign-daemon.st42p61im-zteg12041301.me.com by st42p61im-zteg12041301.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OXQ00H002SNIU00@st42p61im-zteg12041301.me.com> for internals@lists.php.net; Thu, 12 Oct 2017 18:24:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1507832657; bh=E8/W6G/IzIevm1V42G/X2DPzwf0fyRCKDXuDA9ZgkQc=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=ou1hbPdla39tP+ZfKwY08JqbI/o0PXpHdFTTKZPNLEecIwG5v3RSGIKl/rKjaFQ1/ 5x3RSLbTIECrD2yZlwCqM2mYOND3+rQxznV0mf//AjydvgeMmsmjNpvHkZSG591oH1 IfDIaQ9EhAR4uharVIn2Ax+HQQO6CWpaAHLcaaEdU/d1uurE6K8MMbetOFFNI2wNgK eP5qj9otw/NCK7LSymaCsS/+UvO56LYbpd3nG/bwHhAq0C/qxYzY2foxyiPR0s1VCy D9BoHVy9T7LmMuhZSryPMF0z+loJNy1qngUYuPqSJgpdHkXJaoas/HyVoeY4OiFoZF 9ic/OU1KGJd5g== Received: from icloud.com ([127.0.0.1]) by st42p61im-zteg12041301.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OXQ00BL834ET330@st42p61im-zteg12041301.me.com>; Thu, 12 Oct 2017 18:24:17 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-12_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710120264 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (1.0) X-Mailer: iPhone Mail (14G60) In-reply-to: Date: Thu, 12 Oct 2017 20:24:14 +0200 Cc: "internals@lists.php.net" Content-transfer-encoding: quoted-printable Message-ID: References: To: Mathias Grimm Subject: Re: [PHP-DEV] Suggestion Method Constant From: michaeldoehler@me.com (=?utf-8?Q?Michael_D=C3=B6hler?=) 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 : >=20 > I would like to suggest a method constant that could be used the same way > we use the ::class one >=20 > I don't have a strong personal preference but it could be something like: >=20 > MyController::myActionMethod::method, no sure about the internals but it > would be consistent with the one for the class. >=20 > Cheers,