Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement