Re: function -> action

From: Date: Wed, 08 Aug 2007 02:39:24 +0000
Subject: Re: function -> action
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-260391@lists.php.net to get a copy of this message
On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: > I'm working on a project, where we distinguish between "functions" > and > "actions" in design, although in PHP both are implemented as > functions. > Is there a chance that PHP can use the word "action" as "function"? > > E.g.: > public function doSomething() { .... } > public action doSomethingElse() { ... } > > ... is actually the same but would help to see the design also in the > code. You might be able to do this with the Run-Kit extension... It might be easier, however, to hack some kind of pre-processor that would search for PCRE '\\s*action\\s*' and replace it with ' function ' You'd have to pre-process generate your actual PHP files that get executed, but the source you use would just have the 'action' in it. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#260391) next »