Neos\Flow\Reflection\ClassReflection::isTaggedWith PHP Метод

isTaggedWith() публичный Метод

Checks if the doc comment of this method is tagged with the specified tag
public isTaggedWith ( string $tag ) : boolean
$tag string Tag name to check for
Результат boolean TRUE if such a tag has been defined, otherwise FALSE
    public function isTaggedWith($tag)
    {
        return $this->getDocCommentParser()->isTaggedWith($tag);
    }

Usage Example

 /**
  * @test
  */
 public function proxyClassesStillContainAnnotationsFromItsOriginalClass()
 {
     $class = new ClassReflection(Fixtures\PrototypeClassA::class);
     $method = $class->getMethod('setSomeProperty');
     $this->assertTrue($class->implementsInterface(ProxyInterface::class));
     $this->assertTrue($class->isTaggedWith('scope'));
     $this->assertTrue($method->isTaggedWith('session'));
 }