tripal_analysis.DEPRECATED.inc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. /**
  3. * @file
  4. * Wrapper functions to provide backwards compatibility for the tripal analysis api
  5. */
  6. /**
  7. * @deprecated Restructured API to make naming more readable and consistent.
  8. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  9. * This function has been replaced by tripal_register_analysis_child().
  10. *
  11. * @see tripal_register_analysis_child().
  12. */
  13. function tripal_analysis_register_child($modulename) {
  14. tripal_report_error(
  15. 'tripal_deprecated',
  16. TRIPAL_NOTICE,
  17. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  18. array(
  19. '%old_function'=>'tripal_analysis_register_child',
  20. '%new_function' => 'tripal_register_analysis_child'
  21. )
  22. );
  23. return tripal_register_analysis_child($modulename);
  24. }
  25. /**
  26. * @deprecated Restructured API to make naming more readable and consistent.
  27. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  28. * This function has been replaced by tripal_unregister_analysis_child().
  29. *
  30. * @see tripal_unregister_analysis_child().
  31. */
  32. function tripal_analysis_unregister_child($modulename) {
  33. tripal_report_error(
  34. 'tripal_deprecated',
  35. TRIPAL_NOTICE,
  36. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  37. array(
  38. '%old_function'=>'tripal_analysis_unregister_child',
  39. '%new_function' => 'tripal_unregister_analysis_child'
  40. )
  41. );
  42. return tripal_unregister_analysis_child($modulename);
  43. }
  44. /**
  45. * @deprecated Restructured API to make naming more readable and consistent.
  46. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  47. * This function has been replaced by chado_get_property().
  48. *
  49. * @see chado_get_property().
  50. */
  51. function tripal_analysis_get_property($analysis_id, $property, $cv_name = 'tripal') {
  52. tripal_report_error(
  53. 'tripal_deprecated',
  54. TRIPAL_NOTICE,
  55. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  56. array(
  57. '%old_function'=>'tripal_analysis_get_property',
  58. '%new_function' => 'chado_get_property'
  59. )
  60. );
  61. return chado_get_property('analysis', $analysis_id, $property, $cv_name);
  62. }
  63. /**
  64. * @deprecated Restructured API to make naming more readable and consistent.
  65. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  66. * This function has been replaced by chado_insert_property().
  67. *
  68. * @see chado_insert_property().
  69. */
  70. function tripal_analysis_insert_property($analysis_id, $property, $value, $update_if_present = 0, $cv_name = 'tripal') {
  71. tripal_report_error(
  72. 'tripal_deprecated',
  73. TRIPAL_NOTICE,
  74. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  75. array(
  76. '%old_function'=>'tripal_analysis_insert_property',
  77. '%new_function' => 'chado_insert_property'
  78. )
  79. );
  80. return chado_insert_property('analysis', $analysis_id, $property, $cv_name, $value, $update_if_present);
  81. }
  82. /**
  83. * @deprecated Restructured API to make naming more readable and consistent.
  84. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  85. * This function has been replaced by chado_update_property().
  86. *
  87. * @see chado_update_property().
  88. */
  89. function tripal_analysis_update_property($analysis_id, $property, $value, $insert_if_missing = 0, $cv_name = 'tripal') {
  90. tripal_report_error(
  91. 'tripal_deprecated',
  92. TRIPAL_NOTICE,
  93. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  94. array(
  95. '%old_function'=>'tripal_analysis_update_property',
  96. '%new_function' => 'chado_update_property'
  97. )
  98. );
  99. return chado_update_property('analysis', $analysis_id, $property, $cv_name, $value, $insert_if_missing);
  100. }
  101. /**
  102. * @deprecated Restructured API to make naming more readable and consistent.
  103. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  104. * This function has been replaced by the more generic chado_delete_property().
  105. *
  106. * @see chado_delete_property().
  107. */
  108. function tripal_analysis_delete_property($analysis_id, $property, $cv_name = 'tripal') {
  109. tripal_report_error(
  110. 'tripal_deprecated',
  111. TRIPAL_NOTICE,
  112. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  113. array(
  114. '%old_function'=>'tripal_analysis_delete_property',
  115. '%new_function' => 'chado_delete_property'
  116. )
  117. );
  118. return chado_delete_property('analysis', $analysis_id, $property, $cv_name);
  119. }
  120. /**
  121. * @deprecated Restructured API to make naming more readable and consistent.
  122. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  123. * This function has been replaced by tripal_get_analysis().
  124. *
  125. * @see tripal_get_analysis().
  126. */
  127. function tripal_analysis_get_node($analysis_id) {
  128. tripal_report_error(
  129. 'tripal_deprecated',
  130. TRIPAL_NOTICE,
  131. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  132. array(
  133. '%old_function'=>'tripal_analysis_get_node',
  134. '%new_function' => 'tripal_get_analysis'
  135. )
  136. );
  137. return tripal_get_analysis(array('analysis_id' => $analysis_id));
  138. }