Advertisement
TBotNik

Adv_Doc_Std_Examples

Jul 20th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. <html>
  2.  
  3. <body>
  4. <center>
  5. <h1>Advanced Documentation Standard</h1>
  6. <h1>Example Comments</h1>
  7. </center>
  8. <p>
  9. <h2>Header Comment:</h2>
  10. <p>
  11. <textarea rows='14' cols='82'>
  12. &nbsp;
  13. &lt;?php
  14. &nbsp;&nbsp;&nbsp;/***************************************************************************/
  15. &nbsp;&nbsp;&nbsp;/* Author: Nyle E. Davis Create Date: 12/10/05 */
  16. &nbsp;&nbsp;&nbsp;/* E-Mail: davisoftaec@gmail.com Version: 1.0 */
  17. &nbsp;&nbsp;&nbsp;/* File: tbird_rules.php Path: localhost/Project/Tools/ */
  18. &nbsp;&nbsp;&nbsp;/* Purpose: This file processwa all existing TBird filter files, puts */
  19. &nbsp;&nbsp;&nbsp;/* all the rules into a MySQL DB, checking for duplicates, then */
  20. &nbsp;&nbsp;&nbsp;/* pulls the rules from MySQL and rewrites all TBird rule files */
  21. &nbsp;&nbsp;&nbsp;/* with the complete rule set. Future capabilities will allow */
  22. &nbsp;&nbsp;&nbsp;/* full control of the rule set. Blog forthcoming on the */
  23. &nbsp;&nbsp;&nbsp;/* future rule set capabilities. */
  24. &nbsp;&nbsp;&nbsp;/***************************************************************************/
  25. &nbsp;
  26. </textarea>
  27. <p>
  28. <b>Notice:</b>
  29. <br>
  30. <ul>
  31. <font size='-1'>
  32. The file header comments are indented by one tab from the "&lt;?php" file processing identification
  33. <br>
  34. command and immediately follow it.
  35. <br>
  36. This is the minimal file header comment allowed with the "Advanced Documentation Standard"!
  37. </font>
  38. </ul>
  39. <p>
  40. <h2>Function Comment:</h2>
  41. <p>
  42. <textarea rows='14' cols='80'>
  43. &nbsp;
  44. &nbsp;&nbsp;&nbsp;function array_flatten(array $array) {
  45. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*********************************************************************/
  46. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Function: array_flatten */
  47. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Purpose: To flatten multidimentional arrays for find &amp; */
  48. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* search needed for array processing in this class. */
  49. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*********************************************************************/
  50. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!is_array($array)) { return array($array); }
  51. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$return = array();
  52. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
  53. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach($it as $v) { $return[] = $v; }
  54. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $return;
  55. &nbsp;&nbsp;&nbsp;} // end function array_flatten
  56. &nbsp;
  57. </textarea>
  58. <p>
  59. <b>Notice:</b>
  60. <br>
  61. <ul>
  62. <font size='-1'>
  63. The function is indented by one tab from the "&lt;?php" file processing identification command (above),
  64. <br>
  65. the comments follow the fuction declaration and are indented one tab from the declaration.
  66. <br>
  67. This is the minimal function comment allowed with the "Advanced Documentation Standard"!
  68. </font>
  69. </ul>
  70. </body>
  71.  
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement