Ralph Kutschera escreveu:
Hallo!

  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.

TIA, Ralph

That's not implemented in PHP language.

What you should do is use adequate naming conventions, use verbs and as far as possible, describe what the function does:

public function execute_someaction() {}
public function sanitize_somedata() {}
public function is_validwhatever() {}

Can you understand what each function does by their names? What should they return? How about in your application(s)...

~ DM

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to