SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Formula
  2. METHOD_NAME = [CONTEXT] + VERB + [HOW]
  3.  
  4. METHOD_NAME
  5. Must use camelCase (reference Zend Certificated Engineer study manual, Composer, and PSR standards).
  6. Must not start with “__” unless it’s a predefined magic method.
  7. Must start with an alphabetical character.
  8.  
  9. CONTEXT
  10. Should be a noun.
  11. Should be the name of the thing modified by VERB.
  12. Should be omitted if the CONTEXT is implied by object.
  13.  
  14. VERB
  15. Required.
  16. Should be the name of the function that is being performed.
  17. Should be based on a defined list of house terms (e.g. get, load, fetch).
  18. Reference thesaurus for assistance.
  19.  
  20. HOW
  21. Should be omitted if parameters are optional.
  22. May be omitted if multiple parameters are required.
  23. Prefixed by the word "By".
  24.  
  25. Examples
  26. $doc->loadByPath($path);
  27. $user->loadByName($username);
  28. $user->armDisableById($id);
  29. $user->add($username, $id);
  30. $user->load();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top