Creates the descriptor if provided property has annotation @column

@param $property

@return self|$this|EntityDescriptor
9560
private function addDescriptor($property)
    {
        $annotations = $this->inspector
            ->getPropertyAnnotations($property);
        if ($annotations->hasAnnotation('column')) {
            /** @var Column $annotation */
            $annotation = $annotations->getAnnotation('column');
            $descriptor = new FieldDescriptor($annotation->getParameters());
            $this->fields[] = $descriptor->setName($property);
        }
        return $this;
    }
561001
public function withProperty(string $property, $value): self
    {
        return new self(
            $this->class,
            $this->properties->put($property, $value),
            $this->injectionStrategy,
            $this->instanciator
        );
    }
277342
public function getModifier($property)
    {
        $i = $this->indexOf($property);

        if ($i === -1) {
            throw new \InvalidArgumentException("Modifier '{$property}' not found");
        }

        return $this->modifiers[$i];
    }
657870
protected function getAnnotation($entity, $property, $annotation) {
        $classRef = new \ReflectionClass($entity);
        $propertyRef = $classRef->getProperty($property);
        if ($propertyRef) return $this->annoReader->getPropertyAnnotation($propertyRef, $annotation);
        else return null;
    }
76030
public function setPropertyValue($property, $value) {

        if ($value instanceof ClassMapper) {
            $value = $value->getInstance();
        }

        $this
            ->getProperty($property)
            ->setValue($this->instance, $value);

        return $this;
    }
24055
protected function setProperty(ReflectionProperty $property)
    {
        if (mb_strpos($property->getDocComment(), Bean::ANNOTATION_PROPERTY, 0, 'UTF-8') !== false) {
            $this->property = $property;
        } else {
            $msg = "The property must be annotated with '@qtism-bean-property'.";
            throw new BeanException($msg, BeanException::NO_ANNOTATION);
        }
    }
1208982
public function setProperty(PropertyInterface $property)
    {
        $this->property      = $property;
        $this->propertyType  = $property->type();
        $this->propertyIdent = $property->ident();

        $inputType = $property['input_type'];
        if ($inputType) {
            $this->inputType = $inputType;
        }

        $displayType = $property['display_type'];
        if ($displayType) {
            $this->displayType = $displayType;
        }

        return $this;
    }
44613
protected static function createProperty(\ReflectionProperty $reflectionProperty)
    {
        $property = new Property();
        $property->setName($reflectionProperty->getName());
        
        $annotationReader = new AnnotationReader();
        $annotations = $annotationReader->getPropertyAnnotations($reflectionProperty);
        foreach ($annotations as $annotation) {
            $annotationClassName = get_class($annotation);
            if ($annotationClassName == 'Doctrine\ORM\Mapping\Column' || $annotationClassName == 'Doctrine\ORM\Mapping\Id') {
                $property->setAnnotation($annotation);
                $property->setType(Property::PROPERTY_TYPE_COLUMN);
            } elseif ($annotationClassName == 'Doctrine\ORM\Mapping\ManyToOne' || $annotationClassName == 'Doctrine\ORM\Mapping\OneToOne') {
                $property->setAnnotation($annotation);
                $property->setType(Property::PROPERTY_TYPE_REF_ONE);
                $property->setTargetEntity($annotation->targetEntity);
            } elseif ($annotationClassName == 'Doctrine\ORM\Mapping\ManyToMany' || $annotationClassName == 'Doctrine\ORM\Mapping\OneToMany') {
                $property->setAnnotation($annotation);
                $property->setType(Property::PROPERTY_TYPE_REF_MANY);
                $property->setTargetEntity($annotation->targetEntity);
            }
        }
        
        if ($property->getType() == -1) {
            throw new \Exception(
                'Entity "' . $reflectionProperty->getDeclaringClass()->getName()
                . '": defining annotation is missing at property "' . $property->getName() . '"!'
            );
        }
        
        return $property;
    }
1228823
public function field(&$property) : FormObjectFieldNameBuilder
    {
        $typeDefiner  = $this->class->property($property);
        $propertyName = $this->loadTypeDefiner($typeDefiner);

        return FormObjectFieldNameBuilder::callback(function ($fieldName) use ($propertyName) {
            $this->fieldPropertyMap[$fieldName] = $propertyName;
        })->value($property);
    }
806859
public static function ofProperty($class, $property, $key = null)
	{
		$reflector = is_object($class) ? new \ReflectionObject($class) : new \ReflectionClass($class);

		if(!static::cache()->hasProperty($reflector->getName(), $property)) {
			$annotations = static::parser()->parse($reflector->getProperty($property)->getDocComment());
			static::cache()->storeProperty($reflector->getName(), $property, $annotations);
		}
		else {
			$annotations = static::cache()->getProperty($reflector->getName(), $property);
		}

		if($key) {
			return isset($annotations[$key]) ? $annotations[$key] : null;
		}

		return $annotations;
	}
158694
private function getEntityGetter($entity, $property)
    {
        $getter = null;

        $prefixes = ['get', 'is', 'has', ''];

        foreach ($prefixes as $prefix) {
            $test = $prefix.ucfirst($property);
            if (method_exists($entity, $test)) {
                $getter = $test;
                break;
            }
        }

        if (null === $getter) {
            throw new \LogicException("Entity has no getter for property `{$property}`.");
        }

        return $getter;
    }
498886
public function initialize($property = null) {
		// By method
		$initMethod = lcfirst($property) . self::INIT_POSTFIX;
		
		if (method_exists($this, $initMethod)) {
			$this->_data[$property]        = $this->$initMethod();
			$this->_initialized[$property] = true;
			
			return $this;
		}
		
		// By source definition
		if ($this->_sources === null) {
			return $this;
		}
		
		if ($property === null) {
			$properties = array_keys($this->_sources);
		}
		
		foreach ((array) $properties as $property) {
			if (isset($this->_initialized[$property])) {
				continue;
			}

			if (isset($this->_sources[$property])) {
				$this->_initialize($property, $this->_sources[$property]);
				$this->_initialized[$property] = true;
			}
		}
		
		return $this;
	}
681456
public function getEntityColumnType($entity, $property) {
        $classRef = new \ReflectionClass($entity);
        if ($classRef->hasProperty($property)) {
            $propertyRef = $classRef->getProperty($property);
            $columnRef = $this->annoReader->getPropertyAnnotation($propertyRef, 'Doctrine\ORM\Mapping\Column');
        } else {
            /** Can not find the property on the class. Check the all the Column annotation */
            foreach ($classRef->getProperties() as $propertyRef) {
                $columnRef = $this->annoReader->getPropertyAnnotation($propertyRef, 'Doctrine\ORM\Mapping\Column');
                if ($columnRef->name == $property) {
                    break;
                } else {
                    $columnRef = null;
                }
            }
        }
        if ($columnRef === null) {
            $idRef = $this->annoReader->getPropertyAnnotation($propertyRef, 'Doctrine\ORM\Mapping\Id');
            if ($idRef !== null) {
                return "int";
            } else {
                return "string";
            }
        } else {
            return $this->getColumnType($columnRef->type);
        }
    }
378822
protected function doDecorate(Property $property, IElementLocator $locator)
	{
		$proxy_class = $this->getProxyClass($property);

		if ( !$proxy_class ) {
			return null;
		}

		if ( $this->_isBEMBlock($property) || $this->_isBEMElement($property) ) {
			/* @var $annotations BEMAnnotation[] */
			$annotations = $property->getAnnotationsFromPropertyOrClass('@bem');
			$this->_assertAnnotationUsage($annotations, $locator);

			if ( !($annotations[0] instanceof BEMAnnotation) ) {
				return null;
			}

			$name = $this->_isBEMBlock($property) ? $annotations[0]->block : $annotations[0]->element;

			/* @var $proxy IProxy */
			$proxy = new $proxy_class($name, $locator, $this->pageFactory);
			$proxy->setClassName($property->getDataType());

			return $proxy;
		}

		return parent::doDecorate($property, $locator);
	}
1053018
final public function create(array $properties = array())
    {
        $context = $this->getContext();
        $context->properties = $properties;

        if ($this->invokeCommand('before.create', $context) !== false)
        {
            $context->result = $this->_actionCreate($context);
            $this->invokeCommand('after.create', $context);
        }

        $this->_entity = ObjectConfig::unbox($context->result);

        return $this->_entity;
    }
35278
public static function getPropertyAnnotations($class, $property)
    {
        $annotationBag = Bridge\Loader::getInstance()->getPropertyAnnotations($class, str_replace('$', '', $property));
        $annotationBag = self::explodeNamespaces($annotationBag);

        return new ConfigObject($annotationBag);
    }
181868
public function addProperty($name, $property=null) {
		$name = strtolower($name);
		if($property === null)
			$property = 'string';
		if(is_string($property))
			$property = ['type'=>$property];
		if(is_array($property)) {
			foreach($property as $k=>$v) {
				if(is_int($k)) {
					unset($property[$k]);
					$property[$v] = true;
				}
			}

			if(!isset($property['type']) || !$property['type'])
				$property['type'] = 'string';

			$type = $property['type'];
			$property = $this->getContainer()->make('Asgard.Entity.PropertyType.'.$type, [$property], function($params) use($type) {
				$class = '\Asgard\Entity\Property\\'.ucfirst(strtolower($type)).'Property';
				return new $class($params);
			});
		}

		$property->setDefinition($this);
		$property->setName($name);

		if($property->getPosition() === null)
			$property->setPosition(count($this->properties)+1);
		$this->properties[$name] = $property;

		uasort($this->properties, function($a, $b) {
			return $a->getPosition() > $b->getPosition();
		});
	}