Example #1
0
 /**
  * Retrieves the generic information.
  *
  * Finds out whether this method is abstract, static, final and what visibility it has on top of the information
  * found using the DocBlox_Reflection_Function parent method.
  *
  * @param DocBlox_Token_Iterator $tokens
  *
  * @see DocBlox_Reflection_Function::processGenericInformation
  *
  * @return void
  */
 protected function processGenericInformation(DocBlox_Token_Iterator $tokens)
 {
     $this->static = $this->findStatic($tokens) ? true : false;
     $this->abstract = $this->findAbstract($tokens) ? true : false;
     $this->final = $this->findFinal($tokens) ? true : false;
     $this->visibility = $this->findVisibility($tokens);
     parent::processGenericInformation($tokens);
 }
Example #2
0
  public function processTokens(DocBlox_TokenIterator $tokens)
  {
    // an abstract function does not have a body thus we stop searching
    if ($this->isAbstract())
    {
      return array(0,0);
    }

    return parent::processTokens($tokens);
  }
Example #3
0
 /**
  * Parses a function definition and adds it to the functions array.
  *
  * @param DocBlox_Reflection_TokenIterator $tokens Tokens to interpret with the
  *      pointer at the token to be processed.
  *
  * @return void
  */
 protected function processFunction(DocBlox_Reflection_TokenIterator $tokens)
 {
     $this->resetTimer('function');
     $function = new DocBlox_Reflection_Function();
     $function->setFilename($this->filename);
     $function->setNamespace($this->active_namespace);
     $function->setNamespaceAliases($this->namespace_aliases);
     $function->setDefaultPackageName($this->getDefaultPackageName());
     $function->parseTokenizer($tokens);
     $this->functions[$function->getName()] = $function;
     $this->debugTimer('>> Processed function ' . $function->getName(), 'function');
 }
Example #4
0
  protected function processFunction(DocBlox_TokenIterator $tokens)
  {
    $this->resetTimer('function');

    $function = new DocBlox_Reflection_Function();
    $function->setNamespace($this->active_namespace);
    $function->parseTokenizer($tokens);

    $this->debugTimer('>> Processed function '.$function->getName(), 'function');

    $this->functions[$function->getName()] = $function;
  }