tripal_example.api.inc

Provides an application programming interface (API) for working the example module

File

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