Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100884 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1666 invoked from network); 12 Oct 2017 18:28:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2017 18:28:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=mathiasgrimm@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mathiasgrimm@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: mathiasgrimm@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:55151] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/DA-49033-634BFD95 for ; Thu, 12 Oct 2017 14:28:08 -0400 Received: by mail-wm0-f45.google.com with SMTP id i124so15679867wmf.3 for ; Thu, 12 Oct 2017 11:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uXjurnmnsWtgtnb0UvDPDi+4ZMjSMxQAIzY+xVddTfo=; b=E5gstdFcWBka7RU2b6hTARsMqhw65nSQHvB9onhGOIRlE62olDDEMnxPF4Nf34K18G YsAlMbNIgQfkfUOI8oYXXnOgPxu78HakH2MZldRhJfI2+MtDxdJecXyz8YA6VFup6ue1 LRvsywJ2NpIGS8o0IhwMsKuO97s5t1rztclzyt9HiKcNdSOHvOBpF/m676vpRhqQKYpR 2xqGeNeYNaeW9mE7rQUZz+nXeYRRvcmEqo2HuS4d1cHsY6QQeze40nunfSQWfWvhW6I9 U9DHJKnNUGg8z/ieGDnJ547sQHjcP5+YYxwtuP9SRYQsNdJBj4ZYzypYWC1DTgb1rk6Q 53Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uXjurnmnsWtgtnb0UvDPDi+4ZMjSMxQAIzY+xVddTfo=; b=Sk5VFLb6k9u9dKBm7Aan1PEI04A3M4FAHtXVGrL24ob9/cX1jjGRzGyANlm9Q4MCdU ermE41twPSUoV8gg9YOKeRZHEZYslT2oG0/IR+4xmGhgisy3e9acGsOAt52+jmyiA36h dxFOJrsjwylScEz+dYQC7uzaY+gR0Bhi9VMSGlDfze+a2WyvBC0zUkjJfJjMSBM6aMCZ BsYf7eMg7b2hROfeXvH1ZH3pYrfWxX2RKsp/B/oWwj39esAMez1kC4HgYtIskVUmFinV y9HVlJ8dR4EE1GEWDVA6xWrwtT+QF9ulE7oxmcKIhRWw2wpf3uFkI14bjlThY7hMvmwl xU1A== X-Gm-Message-State: AMCzsaVo6Pe+OJSWBWzxA8qK5F9CtnhDWY7cQ8LpEsAJZWK+BT3fqDdv PxcfAb3EBel32AttD8x0CP/E3epWNRpDVoHK2GQ= X-Google-Smtp-Source: AOwi7QB1/gxoR7uPjDwmqPGOLm8S/ENzBpJE5vqia3Q8UuHqUywfCFtvfQdsnVzM/umj092XwM31GPhy505HDvToXNI= X-Received: by 10.28.170.208 with SMTP id t199mr2889958wme.4.1507832884378; Thu, 12 Oct 2017 11:28:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.161.1 with HTTP; Thu, 12 Oct 2017 11:28:03 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 Oct 2017 20:28:03 +0200 Message-ID: To: =?UTF-8?Q?Michael_D=C3=B6hler?= Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="001a114430787440bc055b5db38d" Subject: Re: [PHP-DEV] Suggestion Method Constant From: mathiasgrimm@gmail.com (Mathias Grimm) --001a114430787440bc055b5db38d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The only problem with the @ symbol is the lack of consistency with the other constants class constants are also MyClass::MY_CONST, or MyClass::class, so I think it makes sense to also be MyClass::myMethod::method On 12 October 2017 at 20:24, Michael D=C3=B6hler wr= ote: > 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 : > > > > I would like to suggest a method constant that could be used the same w= ay > > we use the ::class one > > > > I don't have a strong personal preference but it could be something lik= e: > > > > MyController::myActionMethod::method, no sure about the internals but i= t > > would be consistent with the one for the class. > > > > Cheers, > --001a114430787440bc055b5db38d--