Parses class property

@param string $fullClassName Name of the class
@param string $propertyName Name of the property

@return array Pair of [Property and PropertyProperty] nodes
220
public static function parseClassProperty($fullClassName, $propertyName)
    {
        $class      = self::parseClass($fullClassName);
        $classNodes = $class->stmts;

        foreach ($classNodes as $classLevelNode) {
            if ($classLevelNode instanceof Property) {
                foreach ($classLevelNode->props as $classProperty) {
                    if ($classProperty->name->toString() == $propertyName) {
                        return [$classLevelNode, $classProperty];
                    }
                }
            }
        }

        throw new \InvalidArgumentException("Property $propertyName was not found in the $fullClassName");
    }
699331
public static function getInjectValue($className, $propertyName)
    {
        list($annotations, $configs) = static::getInjects($className);
        if(isset($configs[$propertyName]))
        {
            return $configs[$propertyName];
        }
        else
        {
            $annotation = $annotations[0] ?? null;
            if($annotation)
            {
                return $annotation->getRealValue();
            }
            else
            {
                return null;
            }
        }
    }
714810
protected function parseBooleanShortcut($propertyString)
    {
        $value = true;
        $key = $propertyString;

        if ($propertyString[0] == '!') {
            $value = false;
            $key = mb_substr($propertyString, 1);
        }

        return [$key, $value];
    }
403775
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        $name     = $objectAnnotation->getName();
        $scope    = $objectAnnotation->getScope();
        $ref      = $objectAnnotation->getRef();
        $beanName = empty($name) ? $className : $name;

        return [$beanName, $scope, $ref];
    }
567318
public function getByName($propertyName)
    {
        $foundList = new self();
        $list = $this->getIterator();
        foreach ($list as $property) {
            if ((is_array($propertyName) && in_array($property->getName(), $propertyName))
                || ($property->getName() === $propertyName)
            ) {
                $foundList->add($property);
            }
        }

        return $foundList;
    }
595580
protected function _fullModelClass() {
        $baseClassName = $this->modelClassName();
        $classNamePattern = $this->modelClassNamePattern();
        if ($classNamePattern && strpos($classNamePattern, '{type}') !== false) {
            $fullClassName = str_replace("{type}", $baseClassName, $classNamePattern);
        } elseif ($classNamePattern) {
            $fullClassName = "{$classNamePattern}{$baseClassName}";
        } else {
            $fullClassName = "\\{$baseClassName}";
        }
        return $fullClassName;
    }
795682
public function parseClassName($className)
    {
        if (!preg_match('/^\\\\?(.*?)\\\\?([a-zA-Z0-9_]+)$/', $className, $matches)) {
            throw new \Exception('Invalid class name "' . $className . '" given');
        }

        return array(
            'namespace' => $matches[1],
            'classname' => $matches[2],
            'fqcn'      => $className
        );
    }
333444
public function parser(
        string $className,
        $objectAnnotation = null,
        string $propertyName = '',
        string $methodName = '',
        $propertyValue = null
    ) {
        $collector = ControllerCollector::getCollector();

        if (!isset($collector[$className])) {
            return;
        }

        // Collect requestMapping
        ControllerCollector::collect($className, $objectAnnotation, $propertyName, $methodName, $propertyValue);
    }
312015
private function getPropertyInfo(string $propertyName, string $className, int $specVersion = 2): stdClass
    {
        foreach ($this->getProperties($className, $specVersion) as $classPropertyName => $property) {
            if ($classPropertyName === $propertyName) {
                return $property;
            }
        }

        throw new \InvalidArgumentException(sprintf('The property "%s" for the class "%s" doesn\'t exist.', $propertyName, $className));
    }
1066066
protected function split($fullName)
    {
        $names = explode(" ", trim($fullName), 2);

        $this->firstName = trim($names[0]);
        $this->lastName = trim($names[1]);
    }
497768
public function parse($className) {


        try {
            $class = new \ReflectionClass($className);
        } catch (\ReflectionException $e) {
            return new ClassAnnotations($className, array(), array(), array());
        }


        // get the master annotations
        $classComment = $class->getDocComment();
        $classAnnotations = $this->getCommentAnnotations($classComment);
        $classAnnotations["comment"] = array(new Annotation("comment", $this->cleanComment($classComment)));


        $fieldAnnotations = array();
        $properties = $class->getProperties();

        foreach ($properties as $property) {

            if ($property->isStatic())
                continue;


            $fieldComment = $this->getCommentAnnotations($property->getDocComment());
            $fieldAnnotations[$property->getName()] = $fieldComment;

            $fieldAnnotations[$property->getName()]["comment"] = array(new Annotation("comment", $this->cleanComment($property->getDocComment())));

        }


        $methodAnnotations = array();
        $methods = $class->getMethods();

        foreach ($methods as $method) {

            if ($method->isStatic() || $method->isPrivate() || $method->isProtected())
                continue;
            $methodComment = $this->getCommentAnnotations($method->getDocComment());
            $methodAnnotations[$method->getName()] = $methodComment;

            if ($method->getDeclaringClass()->getName() != $className) {
                $methodAnnotations[$method->getName()]["inherited"] = 1;
            }

            $methodAnnotations[$method->getName()]["comment"] = array(new Annotation("comment", $this->cleanComment($method->getDocComment())));


        }


        return new ClassAnnotations($className, $classAnnotations, $fieldAnnotations, $methodAnnotations);

    }
57935
private function generateClassName($fullClassName)
    {
        $namespace = $this->getClassNamespace($fullClassName);

        $className = $fullClassName;

        if ($namespace) {
            $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName));
        }

        return $className;
    }
521221
private function getPropertyInfo(string $propertyName, string $className): stdClass
    {
        foreach ($this->getProperties($className) as $property) {
            if ($property->{'hydra:title'} === $propertyName) {
                return $property;
            }
        }

        throw new \InvalidArgumentException(sprintf('Property "%s" of class "%s" does\'nt exist', $propertyName, $className));
    }
119030
protected function parseClassname($classname, $forceLatest = false)
    {
        $version = $forceLatest ? $this->latest : $this->current;

        if (!empty($this->resources)) {
            $path = $this->resources . "\\v{$version}\\" . str_after($classname, $this->resources . "\\");
        } else {
            $path = "v{$version}\\" . $classname;
        }

        $path = "\\{$this->path}\\{$path}";

        return $path;
    }
1123315
private function isEnvArrayValue(string $className, string $propertyName)
    {
        $rc   = new \ReflectionClass($className);
        $rp   = $rc->getProperty($propertyName);
        $doc  = $rp->getDocComment();
        $tags = DocumentHelper::tagList($doc);
        if (isset($tags['var']) && $tags['var'] == 'array') {
            return true;
        }

        return false;
    }
241497
final public static function className(string $fullName = null): string
    {
        $fullName = $fullName ?: self::fullName();
        $fullName = str_replace('\\', '/', $fullName);

        return basename($fullName);
    }
346512
protected function saveBlock($fullClassName)
    {
        // ensure all classes start with trailing slash class name definition like `\foo\bar\Class`
        $fullClassName = '\\'  . ltrim($fullClassName, '\\');
        $model = Block::find()->where(['class' => $fullClassName])->one();
        
        $blockObject = $this->createBlockObject($fullClassName);
        
        $blockGroupId = $this->getBlockGroupId($blockObject);
        
        if (!in_array($blockGroupId, $this->blockGroupIds)) {
            $this->blockGroupIds[] = $blockGroupId;
        }
        
        $log = "block {$fullClassName}: ";
        if (!$model) {
            $model = new Block();
            $model->group_id = $blockGroupId;
            $model->class = $fullClassName;
            if ($model->save()) {
                $log .= "Added to database";
            } else {
                $log .= "Error while saving";
            }
        } elseif ($model->group_id != $blockGroupId) {
            $log .= 'Updated group id"';
            $model->updateAttributes(['group_id' => $blockGroupId]);
        } else {
            $log .= 'remains the same, nothing to update';
        }
        $this->addLog($log);
        
        return $model->id;
    }