Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Function Reference

get_doc_comment ( array &code , start_line , as_string [false] )

Description
No description.
 
Parameters
requiredarray &code
requiredstart_line
optionalas_string [false]
 
Code
038  function get_doc_comment(array &$__code, $__start_line, $__as_string=false)
039  {
040      $lines = array();
041      if (preg_match('/\s+\*\//i',$__code[$__start_line-1]))
042      {
043          $line = $__start_line-2;
044          while (!preg_match('/\/\*\s*/i',$__code[$line]))
045          {
046              $line -= 1;
047          }
048          $lines = array_slice($__code,$line,$__start_line-$line);
049         
050      }
051     
052      if ($__as_string)
053      {
054          return implode("",$lines);
055      }
056      else
057      {
058          return $lines;
059      }
060  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads