Neos\Flow\Aop\PropertyIntroduction::__construct PHP Метод

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

Constructor
public __construct ( string $declaringAspectClassName, string $propertyName, Pointcut $pointcut )
$declaringAspectClassName string Name of the aspect containing the declaration for this introduction
$propertyName string Name of the property to introduce
$pointcut Neos\Flow\Aop\Pointcut\Pointcut The pointcut for this introduction
    public function __construct($declaringAspectClassName, $propertyName, Pointcut $pointcut)
    {
        $this->declaringAspectClassName = $declaringAspectClassName;
        $this->propertyName = $propertyName;
        $this->pointcut = $pointcut;
        $propertyReflection = new \ReflectionProperty($declaringAspectClassName, $propertyName);
        $classReflection = new \ReflectionClass($declaringAspectClassName);
        $defaultProperties = $classReflection->getDefaultProperties();
        $this->initialValue = $defaultProperties[$propertyName];
        if ($propertyReflection->isPrivate()) {
            $this->propertyVisibility = 'private';
        } elseif ($propertyReflection->isProtected()) {
            $this->propertyVisibility = 'protected';
        } else {
            $this->propertyVisibility = 'public';
        }
        $this->propertyDocComment = preg_replace('/@(Neos\\\\Flow\\\\Annotations|Flow)\\\\Introduce.+$/mi', 'introduced by ' . $declaringAspectClassName, $propertyReflection->getDocComment());
    }