Example #1
0
 /**
  * Applies all behaviours prior to transformation.
  *
  * @param PreTransformationEvent $data Event object containing the parameters.
  *
  * @phpdoc-event transformer.transform.pre
  *
  * @throws Exception if the event does not originate from the Transformer
  *
  * @return void
  */
 public function applyBehaviours($data)
 {
     if (!$data->getSubject() instanceof \phpDocumentor\Transformer\Transformer) {
         throw new Exception('Unable to apply behaviours, the invoking object is not a ' . '\\phpDocumentor\\Transformer\\Transformer');
     }
     $behaviours = new \phpDocumentor\Transformer\Behaviour\Collection($data->getSubject(), array(new Transformer\Behaviour\GeneratePaths(), new Transformer\Behaviour\Inherit(), new Transformer\Behaviour\Tag\IgnoreTag(), new Transformer\Behaviour\Tag\ReturnTag(), new Transformer\Behaviour\Tag\ParamTag(), new Transformer\Behaviour\Tag\VarTag(), new Transformer\Behaviour\Tag\PropertyTag(), new Transformer\Behaviour\Tag\MethodTag(), new Transformer\Behaviour\Tag\UsesTag(), new Transformer\Behaviour\Tag\CoversTag(), new Transformer\Behaviour\Tag\AuthorTag(), new Transformer\Behaviour\Tag\LicenseTag(), new Transformer\Behaviour\Tag\InternalTag(), new Transformer\Behaviour\AddLinkInformation()));
     $data->setSource($behaviours->process($data->getSource()));
 }