tripal_example.api.inc 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Provides an application programming interface (API) for working the example module
  5. */
  6. /**
  7. * @defgroup tripal_example_api Example API
  8. * @ingroup tripal_api
  9. * @{
  10. * Provides an application programming interface (API) for working with features
  11. * @}
  12. */
  13. // EXPLANATION: This file is used for housing any API function that your
  14. // module creates. It is suggested you follow the naming style for Tripal
  15. // API functions. Below are naming rules for Tripal API functions:
  16. //
  17. // 1) Prefix the function with 'chado_' for all insert, updates, delete or get
  18. // function on a table in the chado schema. Tripal should provide all of these
  19. // functions for tables that come with Chado. But, you can use this prefix
  20. // for API functions on custom tables that your module may add.
  21. // 2) For all other functions prefix the function with your module name. So
  22. // for this example module the prefix would be 'tripal_example_'
  23. // 3) A 'verb' should follow the function prefix indicating the action that
  24. // the function performs. Commonly used verbs are 'get', 'insert', 'update'
  25. // 'associate', 'execute', etc. An exception is for functions that
  26. // test state rather than perform an action (e.g. does something exist).
  27. // For functions that test state use 'does' instead of a verb
  28. // (e.g. tripal_example_does_pub_exist)
  29. // 4) Follow the verb with a short predicate describing what is being acted upon.
  30. //