@param \NilPortugues\Api\Mapping\Mapping[] $mappings
@param string                              $propertyName
@param string                              $type

@return bool
347554
public static function isAttributeProperty(array &$mappings, $propertyName, $type)
    {
        return Serializer::CLASS_IDENTIFIER_KEY !== $propertyName
        && !in_array($propertyName, RecursiveFormatterHelper::getIdProperties($mappings, $type));
    }
86080
public static void addNewMapping(final Class<?> type, final String property, final String mapping) {
        allowedColmns.computeIfAbsent(type, k -> new HashMap<>());
        allowedColmns.get(type).put(property, mapping);
    }
777453
public function entityTo(string $propertyName)
    {
        $idString = implode(':', [$this->definition->getClassName(), __CLASS__, $this->relationCount++]);
        $this->readDefinition->relation($propertyName)
            ->asCustom(new EmbeddedObjectRelation($idString, new EmbeddedMapperProxy($this->mapper)));
    }
263254
public function addMapping($attributeName, $mappings)
    {
        if (!is_array($mappings)) {
            $mappings = [$mappings];
        }
        if (!$this->hasMapping($attributeName)) {
            $this->mappingsContainer[$attributeName] = [];
        }
        if ($this->mappingsContainer[$attributeName] !== null) {
            foreach ($mappings as $mapping) {
                $this->mappingsContainer[$attributeName][] = $mapping;
            }
        }
        return $this;
    }
1029379
public function resolvePropertyTypeInfo(Property $property): ?VarTypeInfo
    {
        $types = [];

        $propertyDefault = $property->props[0]->default;
        if ($propertyDefault !== null) {
            $types[] = $this->nodeToStringTypeResolver->resolver($propertyDefault);
        }

        $classNode = $property->getAttribute(AttributeKey::CLASS_NODE);
        if (! $classNode instanceof Class_) {
            throw new ShouldNotHappenException();
        }

        $propertyName = $this->nameResolver->resolve($property);
        if ($propertyName === null) {
            return null;
        }

        /** @var Assign[] $propertyAssignNodes */
        $propertyAssignNodes = $this->betterNodeFinder->find([$classNode], function (Node $node) use (
            $propertyName
        ): bool {
            if ($node instanceof Assign && $node->var instanceof PropertyFetch) {
                // is property match
                return $this->nameResolver->isName($node->var, $propertyName);
            }

            return false;
        });

        foreach ($propertyAssignNodes as $propertyAssignNode) {
            $types = array_merge(
                $types,
                $this->nodeTypeResolver->resolveSingleTypeToStrings($propertyAssignNode->expr)
            );
        }

        $types = array_filter($types);

        return new VarTypeInfo($types, $this->typeAnalyzer, $types, true);
    }
1007396
public function relation(string $propertyName) : RelationAliasDefiner
    {
        $this->verifyClassDefined(__METHOD__);
        $this->verifyMapperDefined(__METHOD__);

        if (!isset($this->relations[$propertyName])) {
            throw InvalidArgumentException::format(
                'Invalid property to load from parent %s: property must be mapped to a relation, \'%s\' given',
                $this->mapper->getObjectType(), $propertyName
            );
        }

        /** @var IToOneRelation $relation */
        $relation   = $this->relations[$propertyName];
        $definition = new self($this->orm);
        $definition->from($relation->getMapper());

        return new RelationAliasDefiner($definition, function ($alias, callable $relationReferenceLoader) use ($relation
        ) {
            if ($relation instanceof IToOneRelation) {
                $relation = $relation->withReference($relationReferenceLoader($relation));
            } elseif ($relation instanceof IToManyRelation) {
                $relation = $relation->withReference($relationReferenceLoader($relation));
            }

            if (is_string($alias)) {
                $relationDefiner = $this->readDefinition->relation($alias);
            } else {
                $relationDefiner = $this->readDefinition->accessorRelation(function () {
                }, $alias);
            }

            $relationDefiner->asCustom($relation);
            $this->loadRelationColumns($relation);
        });
    }
130124
public static function addPropertyAnnotations($className, $propertyName, ...$annotations)
    {
        if(isset(static::$annotations[$className]['Properties'][$propertyName]))
        {
            static::$annotations[$className]['Properties'][$propertyName] = array_merge(static::$annotations[$className]['Properties'][$propertyName], $annotations);
        }
        else
        {
            static::$annotations[$className]['Properties'][$propertyName] = $annotations;
        }
        foreach($annotations as $annotation)
        {
            static::$annotationRelation[get_class($annotation)]['Property'][] = [
                'type'      =>  'Property',
                'class'     =>  $className,
                'property'  =>  $propertyName,
                'annotation'=>  $annotation,
            ];
        }
    }
812859
public function allowProperties(string ...$propertyNames)
    {
        foreach ($propertyNames as $propertyName) {
            $this->propertiesToBeMapped[$propertyName] = $propertyName;
        }
        return $this;
    }
1062082
public static function maps(array $mappings, $key = 'default')
	{
		self::$mappings = array_merge_recursive(self::$mappings, [ $key => $mappings ]);
	}
759317
private function Flow_Proxy_LazyPropertyInjection($propertyObjectName, $propertyClassName, $propertyName, $setterArgumentHash, callable $lazyInjectionResolver)
    {
        $injection_reference = &$this->$propertyName;
        $this->$propertyName = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getInstance($propertyObjectName);
        if ($this->$propertyName === null) {
            $this->$propertyName = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getLazyDependencyByHash($setterArgumentHash, $injection_reference);
            if ($this->$propertyName === null) {
                $this->$propertyName = \Neos\Flow\Core\Bootstrap::$staticObjectManager->createLazyDependency($setterArgumentHash, $injection_reference, $propertyClassName, $lazyInjectionResolver);
            }
        }
    }
1288114
public function setProperty($propertyName, $value)
    {
        if (!is_object($this->contentObjectProxy)) {
            switch ($this->getNodeType()->getPropertyType($propertyName)) {
                case 'references':
                    $nodeIdentifiers = [];
                    if (is_array($value)) {
                        foreach ($value as $nodeIdentifier) {
                            if ($nodeIdentifier instanceof NodeInterface || $nodeIdentifier instanceof AbstractNodeData) {
                                $nodeIdentifiers[] = $nodeIdentifier->getIdentifier();
                            } elseif (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $nodeIdentifier) !== 0) {
                                $nodeIdentifiers[] = $nodeIdentifier;
                            }
                        }
                    }
                    $value = $nodeIdentifiers;
                    break;
                case 'reference':
                    $nodeIdentifier = null;
                    if ($value instanceof NodeInterface || $value instanceof AbstractNodeData) {
                        $nodeIdentifier = $value->getIdentifier();
                    } elseif (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $value) !== 0) {
                        $nodeIdentifier = $value;
                    }
                    $value = $nodeIdentifier;
                    break;
            }

            $this->persistRelatedEntities($value);

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

            $this->properties[$propertyName] = $value;

            $this->addOrUpdate();
        } elseif (ObjectAccess::isPropertySettable($this->contentObjectProxy->getObject(), $propertyName)) {
            $contentObject = $this->contentObjectProxy->getObject();
            ObjectAccess::setProperty($contentObject, $propertyName, $value);
            $this->updateContentObject($contentObject);
        }
    }
328720
public function getPropertyMappingConfigurationForPropertyPaths(array $propertyPaths, $className = '')
	{
		$propertyMappingConfiguration = new PropertyMappingConfiguration();
		$propertyMappingConfiguration->allowAllProperties();
		$propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);

		foreach ($propertyPaths as $propertyPath) {
			$propertyMappingConfiguration->forProperty($propertyPath)->allowAllProperties();
			$propertyMappingConfiguration->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);
		}
		return $propertyMappingConfiguration;
	}
152489
protected function map(
        $propertyName,
        $columnName = null,
        \Closure $fromArrayCallback = null,
        \Closure $toArrayCallback = null
    ) {
        if (!$columnName) {
            $columnName = $propertyName;
        }

        if ($columnName instanceof \Closure) {
            $fromArrayCallback = $columnName;
            $columnName        = null;
        }

        if ($columnName) {
            $this->columnsToProperties[$columnName] = $propertyName;
            $this->columns[]                        = $columnName;
        }
        $this->properties[] = $propertyName;

        if ($fromArrayCallback) {
            $this->propertiesFromArrayCallbacks[$propertyName] = $fromArrayCallback;
        }

        if ($toArrayCallback) {
            $this->propertiesToArrayCallbacks[$propertyName] = $toArrayCallback;
        }

        return $this;
    }
640887
public function createMapping(array $mapping, $index, $type)
    {
        $request = $this->createRequestInstance(self::INDEX_CREATE_MAPPING, $index, $type);
        $request->setBody($mapping);

        return $this->client->send($request);
    }
807119
private function formatMappings(array $propertyMappings)
    {
        $output = array();

        foreach ($propertyMappings as $propertyName => $mapping) {
            $output[] = $this->formatField(sprintf('  %s', $propertyName), '');

            foreach ($mapping as $field => $value) {
                $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
            }
        }

        return $output;
    }
71731
public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration)
    {
        $specificTargetType = $this->objectContainer->getImplementationClassName($targetType);

        if (Core::get()->classExists($specificTargetType)) {
            $propertyTags = $this->reflectionService->getPropertyTagValues($specificTargetType, $propertyName, 'var');

            if (!empty($propertyTags)) {
                return current($propertyTags);
            }
        }

        return parent::getTypeOfChildProperty($targetType, $propertyName, $configuration);
    }
950769
public function property(string $propertyName): PropertyColumnDefiner
    {
        $this->verifyProperty(__METHOD__, $propertyName);

        return new PropertyColumnDefiner($this, $propertyName, function (
            Column $column,
            callable $phpToDbPropertyConverter = null,
            callable $dbToPhpPropertyConverter = null,
            bool $ignoreNullabilityMismatch = false
        ) use ($propertyName) {
            $this->propertyColumnMap[$propertyName] = $column->getName();
            $this->addColumn($column);
            $this->mappedProperties[$propertyName] = true;

            $propertyType = $this->class->getProperty($propertyName)->getType();
            $columnType   = $column->getType()->getPhpType();

            if ($ignoreNullabilityMismatch) {
                $propertyType = $propertyType->nonNullable();
                $columnType   = $columnType->nonNullable();
            }

            if ($phpToDbPropertyConverter && $dbToPhpPropertyConverter) {
                $this->phpToDbPropertyConverterMap[$propertyName] = $phpToDbPropertyConverter;
                $this->dbToPhpPropertyConverterMap[$propertyName] = $dbToPhpPropertyConverter;
            } elseif (!$propertyType->equals($columnType)) {
                throw IncompatiblePropertyMappingException::format(
                    'Invalid property to column mapping: cannot bind %s to column \'%s\' as the types are incompatible, '
                    . 'property type %s must match the column type %s',
                    $this->class->getClassName() . '::$' . $propertyName, $column->getName(),
                    $propertyType->asTypeString(), $columnType->asTypeString()
                );
            }
        });
    }