Returns property annotation data from reader.

@param \ReflectionProperty $property

@return Property|object|null
549978
private function getPropertyAnnotationData(\ReflectionProperty $property)
    {
        $result = $this->reader->getPropertyAnnotation($property, self::PROPERTY_ANNOTATION);

        if ($result !== null && $result->name === null) {
            $result->name = Caser::snake($property->getName());
        }

        return $result;
    }
349774
private function loadPropertyType(\ReflectionProperty $property)
    {
        if ($this->extractor === null) {
            return;
        }

        $types = $this->extractor->getTypes($property->class, $property->name);

        if (empty($types)) {
            return;
        }

        $extractedType = current($types);
        $type = $extractedType->getBuiltinType();

        if ($type === 'object') {
            $type = $extractedType->getClassName();
        }

        return $type;
    }
886738
private function findPropertyFromReference(&$property) : PropertyDefinition
    {
        $traceLevel = $this->propertyDefinitionTraceLevel;

        foreach ($this->propertyReferenceMap as $name => &$propertyReference) {
            if (ReferenceComparer::areEqual($property, $propertyReference)) {

                return $this->properties[$name];
            }
        }

        $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $traceLevel + 1)[$traceLevel];
        throw new InvalidPropertyDefinitionException($this->class, $trace['file'], $trace['line']);
    }
1271256
protected function processProperty(\ReflectionProperty $property, Definition $definition)
    {
        $annotations = $this->reader->getPropertyAnnotations($property);

        foreach ($annotations as $annotation)
        {
            if ($annotation instanceof AttributeAnnotation) {
                $attribute = $this->createAttributeByProperty($annotation, $property);

                $definition->addAttribute($attribute);
                continue;
            }
        }
    }
427174
private function getFieldValue($entity, \ReflectionProperty $reflectionProperty)
    {
        $value = null;
        if ($reflectionProperty) {
            $reflectionProperty->setAccessible(true);
            $value = $reflectionProperty->getValue($entity);
        }

        return $value;
    }
615126
protected function getPropertyType($property)
    {
        if (!array_key_exists($property, get_class_vars('ShopgateConfig'))) {
            return 'string';
        }

        $r   = new \ReflectionProperty('ShopgateConfig', $property);
        $doc = $r->getDocComment();
        preg_match_all('#@var ([a-zA-Z-_]*(\[\])?)(.*?)\n#s', $doc, $annotations);

        $value = 'string';
        if (count($annotations) > 0 && isset($annotations[1][0])) {
            $value = $annotations[1][0];
        }

        return $value;
    }
1355381
protected function getObjectPropertyValue(\ReflectionProperty $property, $prop, $data)
    {
        $prop =  $property->getName();

        try {
            $value = $data->{$prop};
        } catch (\Exception $e) {
        }

        if (!is_scalar($value)) {
            $value = $this->ensureBuildable($value);
        }

        return $value;
    }
1037741
public function updateProperty(\ReflectionProperty $reflectionProperty, Schema $property)
    {
        $annotations = $this->annotationsReader->getPropertyAnnotations($reflectionProperty);

        foreach ($annotations as $annotation) {
            if ($annotation instanceof Assert\NotBlank || $annotation instanceof Assert\NotNull) {
                // The field is required
                if (null === $this->schema) {
                    continue;
                }

                $propertyName = $this->getSchemaPropertyName($property);
                if (null === $propertyName) {
                    continue;
                }

                $existingRequiredFields = $this->schema->getRequired() ?? [];
                $existingRequiredFields[] = $propertyName;

                $this->schema->setRequired(array_values(array_unique($existingRequiredFields)));
            } elseif ($annotation instanceof Assert\Length) {
                $property->setMinLength($annotation->min);
                $property->setMaxLength($annotation->max);
            } elseif ($annotation instanceof Assert\Regex) {
                $this->appendPattern($property, $annotation->getHtmlPattern());
            } elseif ($annotation instanceof Assert\Count) {
                $property->setMinItems($annotation->min);
                $property->setMaxItems($annotation->max);
            } elseif ($annotation instanceof Assert\Choice) {
                $property->setEnum($annotation->callback ? call_user_func(is_array($annotation->callback) ? $annotation->callback : [$reflectionProperty->class, $annotation->callback]) : $annotation->choices);
            } elseif ($annotation instanceof Assert\Expression) {
                $this->appendPattern($property, $annotation->message);
            } elseif ($annotation instanceof Assert\Range) {
                $property->setMinimum($annotation->min);
                $property->setMaximum($annotation->max);
            } elseif ($annotation instanceof Assert\LessThan) {
                $property->setExclusiveMaximum($annotation->value);
            } elseif ($annotation instanceof Assert\LessThanOrEqual) {
                $property->setMaximum($annotation->value);
            }
        }
    }
426895
public static function getPropertyAnnotation(\ReflectionProperty $property, $annotationClass, AnnotationReader $reader)
    {
        return $reader->getPropertyAnnotation($property, $annotationClass);
    }
727215
public function getPropertyValues($property)
    {
        $returnValue = null;
        switch ($property) {
            case GenerisRdf::PROPERTY_USER_DEFLG :
                $returnValue = array(DEFAULT_LANG);
                break;
            case GenerisRdf::PROPERTY_USER_UILG :
                $returnValue = array($this->language);
                break;
            case  GenerisRdf::PROPERTY_USER_ROLES :
                $returnValue = $this->taoRoles;
                break;
            case  GenerisRdf::PROPERTY_USER_FIRSTNAME :
                $returnValue = [$this->firstname];
                break;
            case  GenerisRdf::PROPERTY_USER_LASTNAME :
                $returnValue = [$this->lastname];
                break;
            case  OntologyRdfs::RDFS_LABEL :
                $returnValue = [$this->label];
                break;
            default:
                \common_Logger::d('Unkown property ' . $property . ' requested from ' . __CLASS__);
                $returnValue = array();
        }
        return $returnValue;
    }
1334459
public function getPropertyClass(ReflectionProperty $property)
    {
        // Get the content of the @var annotation
        if (preg_match('/@var\s+([^\s]+)/', $property->getDocComment(), $matches)) {
            list(, $type) = $matches;
        } else {
            return null;
        }

        // Ignore primitive types
        if (in_array($type, $this->ignoredTypes)) {
            return null;
        }

        // Ignore types containing special characters ([], <> ...)
        if (! preg_match('/^[a-zA-Z0-9\\\\_]+$/', $type)) {
            return null;
        }

        $class = $property->getDeclaringClass();

        // If the class name is not fully qualified (i.e. doesn't start with a \)
        if ($type[0] !== '\\') {
            // Try to resolve the FQN using the class context
            $resolvedType = $this->tryResolveFqn($type, $class, $property);

            if (!$resolvedType && !$this->ignorePhpDocErrors) {
                throw new AnnotationException(sprintf(
                    'The @var annotation on %s::%s contains a non existent class "%s". '
                        . 'Did you maybe forget to add a "use" statement for this annotation?',
                    $class->name,
                    $property->getName(),
                    $type
                ));
            }
            
            $type = $resolvedType;
        }

        if (!$this->classExists($type) && !$this->ignorePhpDocErrors) {
            throw new AnnotationException(sprintf(
                'The @var annotation on %s::%s contains a non existent class "%s"',
                $class->name,
                $property->getName(),
                $type
            ));
        }

        // Remove the leading \ (FQN shouldn't contain it)
        $type = ltrim($type, '\\');

        return $type;
    }
320574
public static function get_property_null($property) {

        self::fill_properties_cache();

        if (!array_key_exists($property, self::$propertiescache)) {
            throw new coding_exception('Invalid property requested: ' . $property);
        }

        return self::$propertiescache[$property]['null'];
    }
263285
private function getHashMapAnnotationData(\ReflectionProperty $property)
    {
        $result = $this->reader->getPropertyAnnotation($property, self::HASH_MAP_ANNOTATION);

        if ($result !== null && $result->name === null) {
            $result->name = Caser::snake($property->getName());
        }

        return $result;
    }
1356128
protected function RetrievePropertyValueFromData(string $property)
    {
        $isNullable = in_array(
            $property,
            static::DaftObjectNullableProperties(),
            DefinitionAssistant::IN_ARRAY_STRICT_MODE
        );

        if ( ! array_key_exists($property, $this->data) && ! $isNullable) {
            throw Exceptions\Factory::PropertyNotNullableException(static::class, $property);
        } elseif ($isNullable) {
            return $this->data[$property] ?? null;
        }

        return $this->data[$property];
    }
1254372
public static function hasPropertyAnnotation(\ReflectionProperty $property, $annotationClass, AnnotationReader $reader)
    {
        if (null === self::getPropertyAnnotation($property, $annotationClass, $reader)) {
            return false;
        }

        return true;
    }
1127683
private function getPropertyMapping(ReflectionProperty $property)
    {
        $metadata = [];

        foreach ($this->reader->getPropertyAnnotations($property) as $value) {
            if ( ! $value instanceof RiakAnnotation) {
                continue;
            }

            $class = get_class($value);
            $name  = $property->getName();
            $key   = lcfirst(substr($class, strrpos($class, '\\') + 1));

            $metadata[$key] = $name;
        }

        return $metadata;
    }
907007
private function getValue($object, \ReflectionProperty $property)
    {
        $value = null;

        if ($property->isPublic()) {
            $value = $property->getValue($object);
        } else {
            // Try to use accessor if property is not public
            $accessorName = $this->formatter->getPhpAccessor($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($accessorName);

            if (null !== $reflectedMethod) {
                $value = $reflectedMethod->invoke($object);
            }
        }

        return $value;
    }