Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16194 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16292 invoked by uid 1010); 10 May 2005 11:46:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 347 invoked from network); 10 May 2005 11:31:22 -0000 Received: from unknown (HELO opelclubrenbau.cz) (127.0.0.1) by localhost with SMTP; 10 May 2005 11:31:22 -0000 X-Host-Fingerprint: 80.108.136.197 chello080108136197.10.12.vie.surfer.at Linux 2.4/2.6 Received: from ([80.108.136.197:3901] helo=sunshine.home) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 53/75-35155-A8B90824 for ; Tue, 10 May 2005 07:31:22 -0400 Received: from [213.164.23.137] (helo=[10.15.10.17]) by sunshine.home with esmtpa (Exim 4.50) id 1DVRCE-0004yC-A6; Tue, 10 May 2005 11:38:36 +0200 Message-ID: <42809BEA.9010803@fischer.name> Date: Tue, 10 May 2005 13:32:58 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jason Sweat CC: internals@lists.php.net References: <4qdcz84j.fsf@random.internal> <427FA67E.2020506@omniti.com> <427FC9D1.1030607@php.net> <42805529.8030500@fischer.name> <5c287472050510042712f55c31@mail.gmail.com> In-Reply-To: <5c287472050510042712f55c31@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 2 X-Spam-Level: / X-Spam-Report: Spam detection software, running on the system "sunshine.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Jason Sweat wrote: >>When the class is named SomeLongNameBecauseWedontHaveNamespaces and I >>define a SELF_EXPLAINING_CONSTANT_NUMBER_ONE I've to write >>SomeLongNameBecauseWedontHaveNamespaces::SELF_EXPLAINING_CONSTANT_NUMBER_ONE >>to access it from within the class itself. >> >>Is there a way to reference constants from the same class (or dervived >>class) in a friendlier way? > > I often use self::SELF_EXPLAINING_CONSTANT_NUMBER_ONE when in context > of a class method itself. [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 UPPERCASE_25_50 message body is 25-50% uppercase Subject: Re: [PHP-DEV] Re: new overloading feature? From: markus@fischer.name (Markus Fischer) Jason Sweat wrote: >>When the class is named SomeLongNameBecauseWedontHaveNamespaces and I >>define a SELF_EXPLAINING_CONSTANT_NUMBER_ONE I've to write >>SomeLongNameBecauseWedontHaveNamespaces::SELF_EXPLAINING_CONSTANT_NUMBER_ONE >>to access it from within the class itself. >> >>Is there a way to reference constants from the same class (or dervived >>class) in a friendlier way? > > I often use self::SELF_EXPLAINING_CONSTANT_NUMBER_ONE when in context > of a class method itself. I forgot to add that I mean in static methods .. but thanks, - Markus