Doctrine\Common\Annotations\DocParser::setTarget PHP Method

setTarget() public method

Sets current target context as bitmask.
public setTarget ( integer $target ) : void
$target integer
return void
    public function setTarget($target)
    {
        $this->target = $target;
    }

Usage Example

 /**
  * {@inheritDoc}
  */
 public function getMethodAnnotations(ReflectionMethod $method)
 {
     $class = $method->getDeclaringClass();
     $context = 'method ' . $class->getName() . '::' . $method->getName() . '()';
     $this->parser->setTarget(Target::TARGET_METHOD);
     $this->parser->setImports($this->getMethodImports($method));
     $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
     return $this->parser->parse($method->getDocComment(), $context);
 }
All Usage Examples Of Doctrine\Common\Annotations\DocParser::setTarget