This method is called by PageFactory on all properties to decide how to decorate the property.

@param Property $property The property that may be decorated.

@return IProxy
175801
public function decorate(Property $property)
	{
		if ( !$this->canDecorate($property) ) {
			return null;
		}

		$locator = $this->locatorFactory->createLocator($property);

		return $locator !== null ? $this->doDecorate($property, $locator) : null;
	}
593325
private function getSearchableProperty($property)
    {
        $property = Meta\Reflection::normalizeProperty($property);

        foreach ($this->meta->getIndexedProperties() as $p)
        {
            if (Meta\Reflection::normalizeProperty($p->getName()) == $property)
            {
                return $property;
            }
        }

        //Node properties only have indexing problems
        if($this->meta instanceof Node)
        {
            throw new Exception("Property $property is not indexed or does not exist in {$this->meta->getName()}.");
        }

        //Relations have start/end or indexing problems
        else
        {
            throw new Exception("Property noName is either not indexed, not a start/end, or does not exist in {$this->meta->getName()}.");
        }
    }
581270
protected function addPropertyTags(PropertyInterface $property)
    {
        foreach ($property->getTags() as $tag) {
            if (!array_key_exists($tag->getName(), $this->tags)) {
                $this->tags[$tag->getName()] = [
                    'tag' => $tag,
                    'properties' => [$tag->getPriority() => $property],
                    'highest' => $property,
                    'lowest' => $property,
                ];
            } else {
                $this->tags[$tag->getName()]['properties'][$tag->getPriority()] = $property;

                // replace highest priority property
                $highestProperty = $this->tags[$tag->getName()]['highest'];
                if ($highestProperty->getTag($tag->getName())->getPriority() < $tag->getPriority()) {
                    $this->tags[$tag->getName()]['highest'] = $property;
                }

                // replace lowest priority property
                $lowestProperty = $this->tags[$tag->getName()]['lowest'];
                if ($lowestProperty->getTag($tag->getName())->getPriority() > $tag->getPriority()) {
                    $this->tags[$tag->getName()]['lowest'] = $property;
                }
            }
        }
    }
661541
public function setProperty($property)
    {
        $this->_properties[$property->getName()] = $property;

        //if property name is the same as the identity property
        //then set the identity property
        if (
            is_string($this->_identity_property) &&
            $property->getName() == $this->_identity_property
        ) {
            $this->setIdentityProperty($property);
        }

        return $this;
    }
1314283
public function mapTo($property)
    {
        if (!$this->mappingTo) {
            $this->mappingTo = array_flip($this->mapping);
        }

        return isset($this->mappingTo[$property]) ? $this->mappingTo[$property] : $property;
    }
528370
public function addIdentifyingProperty($property)
    {
        if ($property->isSerializable()) {
            $this->_identifying_properties[$property->getName()] = $property;
        }

        //the proeprty as required
        $property->setRequired(true);

        return $this;
    }
353474
public function initialize($property = null) {
		if (! isset($this->_map[0])) {
			return $this;
		}
		
		$key  = $this->_map[0];
		$item = &$this->_data[$key];
		
		if (isset($item[$property])) {
			return $this;
		}
		
		$this->getItem($key)->initialize($property);
		
		return $this;
	}
980637
public function addProperty(Property $property) {
        $properties = $this->getProperties();
        $properties[] = $property;
        $this->setProperties($properties);
    }
760768
protected function invokeGetter(ReflectionProperty $property)
    {
        $methodName = $this->generateGetterName($property->getName());
        if ($this->hasInternalMethod($methodName)) {
            return $this->$methodName();
        }

        throw new UndefinedPropertyException(sprintf(
            'No "%s"() method available for property "%s"', $methodName,
            $property->getName()
        ));
    }
424838
public function removeProperty($property) {
        foreach (array_keys($this->optionalProperties, $property) as $key) {
            unset($this->optionalProperties[$key]);
        }
        return $this->optionalProperties;
    }
307826
protected function getReflectionProperty($class, $property)
    {
        if (!isset($this->propertyReflectors[$class])) {
            $this->propertyReflectors[$class] = [];
        }
        if (!isset($this->propertyReflectors[$class][$property])) {
            $this->propertyReflectors[$class][$property] = new \ReflectionProperty($class, $property);
        }

        return $this->propertyReflectors[$class][$property];
    }
1313258
protected function addChild(PropertyInterface $property)
    {
        if ($property instanceof SectionPropertyInterface) {
            foreach ($property->getChildProperties() as $childProperty) {
                $this->addPropertyTags($childProperty);
            }
        } else {
            $this->addPropertyTags($property);
        }

        $this->properties[$property->getName()] = $property;
    }
232959
public function addProperty(Property $property): void
    {
        $this->properties[(string) $property->getFqsen()] = $property;
    }
1093139
public static function createGetterFromProperty(PropertyInterface $property)
    {
        $method = new self();
        $method->setName('get_' . $property->getName());
        $method->setCode('return $this->' . $property->getName() . ';');

        return $method;
    }
121709
protected function getProperty($resource, $property)
    {
        if($property == '_self') {
            return $resource;
        }

        $propertyPath = explode('.', $property);

        if(count($propertyPath) > 1) {
            $property = array_shift($propertyPath);
            $newResource = $this->getProperty($resource, $property);
            if($newResource !== null) {
                $propertyPath = implode('.', $propertyPath);
                return $this->getProperty($newResource, $propertyPath);
            } else {
                return null;
            }
        } else {
            $method = sprintf('is%s', ucfirst($property));
            if(method_exists($resource, $method)) {
                return call_user_func(array($resource, $method));
            }

            $method = sprintf('get%s', ucfirst($property));
            if(method_exists($resource, $method)) {
                return call_user_func(array($resource, $method));
            }
        }

        throw new PropertyNotExistsException(sprintf(
            'Trying to call "get%s" or "is%s" on class "%s", but method does not exists. Maybe you spelled it wrong or you didn\'t add the getter for property "%s"',
            ucfirst($property),
            ucfirst($property),
            get_class($resource),
            $property
        ));
    }
147196
public static function duplicateProperty($className, Property $property)
    {
        return new self(sprintf(
            'Property "%s" in "%s" was already declared in "%s", but it must be declared only once',
            $property->getName(),
            $className,
            $property->getDeclaringClass()->getClassName()
        ));
    }
1220886
public function remove($property) {

		$property = trim(strtolower($property));

		unset($this->css[$property]);
		
		return $this;
	}