Creates and returns a property-array.

@param PropertyMetadata $property
@param PropertyValue $propertyValue

@return array
483310
protected function getPropertyData(PropertyMetadata $property, $propertyValue)
    {
        return $this->createProperty(
            $property->getName(),
            $this->exportManager->export($property->getType(), $propertyValue),
            $this->exportManager->getOptions($property->getType(), $this->format),
            $property->getType()
        );
    }
1019074
public function setPropertyValueConditionClassName($propertyValueConditionClassName)
    {
        $event = new SetPropertyValueConditionClassNameEvent($propertyValueConditionClassName, $this);
        $this->dispatchEvent($event);
        $propertyValueConditionClassName = $event->getPropertyValueConditionClassName();

        $this->propertyValueConditionClassName = (string) $propertyValueConditionClassName;
        $this->propertyValueConditionClass     = new \ReflectionClass($this->propertyValueConditionClassName);
        return $this;
    }
1001154
private static function addToResultArray(
        string $propertyName,
        $propertyValue,
        array $propertyNameMapper,
        array $resultArray
    ) {
        $mappedName = $propertyNameMapper[$propertyName]['name'] ?? $propertyNameMapper[$propertyName] ?? $propertyName;

        $resultArray[$mappedName] = self::isNestedData($propertyValue)
            ? self::toArray($propertyValue, $propertyNameMapper[$propertyName]['mapper'] ?? [])
            : $propertyValue;

        return $resultArray;
    }
456712
protected function convertPropertiesToQueryArray(PropertiesInterface $properties)
    {
        $propertiesArray = [];

        $propertyCounter = 0;
        $propertiesArray[Constants::CONTROL_PROP_ID] = [];
        $propertiesArray[Constants::CONTROL_PROP_VALUE] = [];
        foreach ($properties->getProperties() as $property) {
            $propertiesArray[Constants::CONTROL_PROP_ID][$propertyCounter] = $property->getId();

            $propertyValues = $property->getValues();

            if (count($propertyValues) === 1) {
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] =
                    $this->convertPropertyValueToSimpleType(
                        $property->getFirstValue()
                    );
            } elseif (count($propertyValues) > 1) {
                $propertyValueCounter = 0;
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] = [];
                foreach ($propertyValues as $propertyValue) {
                    $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter][$propertyValueCounter] =
                        $this->convertPropertyValueToSimpleType(
                            $propertyValue
                        );
                    $propertyValueCounter ++;
                }
            }

            $propertyCounter ++;
        }

        return $propertiesArray;
    }
535397
public function parse($propertyValue)
    {
        $return = $this->cloneValue($propertyValue);
        $return = $this->createInstanceOfTypeFromValue($return);
        $return = $this->runFilters($return);
        $this->validate($return);

        return $return;
    }
131424
public function propertyPath($data, $propertyPath)
    {
        if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) {
            $propertyPath = new PropertyPath($propertyPath);
        }

        if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \ArrayAccess)) {
            $data = $this->propertyAccessor->getValue($data, $propertyPath);
        }

        return $data;
    }
119682
public function getFieldMeta($property = null, $fallbackValue = "")
    {
        if (is_null($property)) {
            $varReturn = $this->__fieldmeta;
        } elseif (isset($this->__fieldmeta[$property])
            && !is_null($this->__fieldmeta[$property])
        ) {
            $varReturn = $this->__fieldmeta[$property];
        } else {
            $varReturn = $fallbackValue;
        }

        return $varReturn;
    }
518034
public PropertiesBuilder set(String propertyName, Object propertyValue) {
    return set(propertyName, String.valueOf(propertyValue));
  }
284684
public function getMultipleProperties(array $propertyNames)
    {
        $this->parseStyleAttribute();

        $result = [];

        foreach ($propertyNames as $propertyName) {
            if (!is_string($propertyName)) {
                throw new InvalidArgumentException(sprintf('Property name must be a string, %s given', (is_object($propertyName) ? get_class($propertyName) : gettype($propertyName))));
            }

            if (array_key_exists($propertyName, $this->properties)) {
                $result[$propertyName] = $this->properties[$propertyName];
            }
        }

        return $result;
    }
875898
public function getMeta($property = null, $fallbackValue = "")
    {
        if (is_null($property)) {
            $varReturn = $this->__meta;
        } elseif (isset($this->__meta[$property])
            && !is_null($this->__meta[$property])
        ) {
            $varReturn = $this->__meta[$property];
        } else {
            $varReturn = $fallbackValue;
        }

        return $varReturn;
    }
1313489
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        $beanName = $objectAnnotation->getName();
        $beanName = empty($beanName) ? $className : $beanName;
        $scope    = Scope::SINGLETON;

        DefinitionCollector::collect($className, $objectAnnotation, $propertyName, $methodName, $propertyValue);

        return [$beanName, $scope, ""];
    }
953018
private function parsePropertyAnnotations(array $propertyAnnotations, string $className, string $propertyName, $propertyValue)
    {
        $isRef = false;
        $injectProperty = "";

        // 没有任何注解
        if (empty($propertyAnnotations) || !isset($propertyAnnotations[$propertyName])
            || !$this->isParseProperty($propertyAnnotations[$propertyName])
        ) {
            return [null, false];
        }

        // 属性注解解析
        foreach ($propertyAnnotations[$propertyName] as $propertyAnnotation) {
            $annotationClass = get_class($propertyAnnotation);
            if (!in_array($annotationClass, $this->getPropertyAnnotations())) {
                continue;
            }

            // 解析器
            $annotationParser = $this->getAnnotationParser($propertyAnnotation);
            if ($annotationParser === null) {
                $injectProperty = null;
                $isRef = false;
                continue;
            }
            list($injectProperty, $isRef) = $annotationParser->parser($className, $propertyAnnotation, $propertyName, "", $propertyValue);
        }

        return [$injectProperty, $isRef];
    }
536304
public function anyMatch($propertyName, $propertyValues) {
		if ($propertyValues === null || empty($propertyValues) || $propertyValues[0] === null) {
			return $this;
		}

		$queryString = null;
		$lastElemtentKey = count($propertyValues) - 1;
		foreach($propertyValues as $key => $propertyValue) {
			$parameterName = ':' . md5($propertyName . '#' . count($this->where) . $key);
			$this->parameterMap[$parameterName] = $propertyValue;

			if ($key === 0) {
				$queryString .= '(';
			}
			if ($key !== $lastElemtentKey) {
				$queryString .= sprintf("(`%s`) = %s OR ", $propertyName, $parameterName);
			} else {
				$queryString .= sprintf("(`%s`) = %s )", $propertyName, $parameterName);
			}
		}

		$this->where[] = $queryString;

		return $this;
	}
429561
public function toArray($properties = null)
    {
        $array = [];

        if (!empty($this->getMeta())) {
            $array['meta'] = $this->getMeta();
        }

        if (!empty($this->getPropertyContainer())) {
            $array['properties'] = [];

            foreach ($this->getPropertyContainer()->getProperties() as $item) {
                if (method_exists(
                    $item,
                    'toArray'
                )) {
                    $array['properties'][] = $item->toArray();
                }
            }
        }
        if (!empty($this->getDatabaseContainer())) {
            $array['database'] = $this->getDatabaseContainer()->getDatabase()->toArray();
        }

        return $array;
    }
1191199
private function getPropertyMetadata(ResourceMetadata $resourceMetadata, string $resourceClass, string $io, array $visited, array $options): array
    {
        $data = [];

        foreach ($this->propertyNameCollectionFactory->create($resourceClass, $options) as $propertyName) {
            $propertyMetadata = $this->propertyMetadataFactory->create($resourceClass, $propertyName);
            if (
                ($propertyMetadata->isReadable() && self::OUT_PREFIX === $io) ||
                ($propertyMetadata->isWritable() && self::IN_PREFIX === $io)
            ) {
                $normalizedPropertyName = $this->nameConverter ? $this->nameConverter->normalize($propertyName, $resourceClass) : $propertyName;
                $data[$normalizedPropertyName] = $this->parseProperty($resourceMetadata, $propertyMetadata, $io, null, $visited);
            }
        }

        return $data;
    }
1365250
protected function persistEntities($propertyValue)
    {
        if (!$propertyValue instanceof \Iterator && !is_array($propertyValue)) {
            $propertyValue = [$propertyValue];
        }
        foreach ($propertyValue as $possibleEntity) {
            if (is_object($possibleEntity) && $possibleEntity instanceof PersistenceMagicInterface) {
                $this->persistenceManager->isNewObject($possibleEntity) ? $this->persistenceManager->add($possibleEntity) : $this->persistenceManager->update($possibleEntity);

                // TODO: Needed because the originalAsset will not cascade persist. We should find a generic solution to this.
                if ($possibleEntity instanceof ImageVariant) {
                    $asset = $possibleEntity->getOriginalAsset();
                    $this->persistenceManager->isNewObject($asset) ? $this->persistenceManager->add($asset) : $this->persistenceManager->update($asset);
                }
            }
        }
    }
544450
protected function initPropertyArray( $propertyName, $propertyClass){
        if( property_exists( static::class, $propertyName) && is_array( $this->$propertyName)){
            $newProperty = [];
            foreach( $this->$propertyName as $PropertyItem){
                if( is_array( $PropertyItem)){
                    $newProperty[] = new $propertyClass( $PropertyItem);
                }
            }
            $this->$propertyName = $newProperty;
        }
    }