Builds an attribute from a class property if it is set.

@param string $property

@return string
346540
public function buildAttribute($property)
    {
        $attribute = '';
        if (isset($this->$property)) {
            $attribute .= ' ' . $property . '="';
            if (is_bool($this->$property)) {
                $attribute .= ($this->$property) ? 'true' : 'false';
            } else {
                $attribute .= SolrRequest::escapeXml($this->$property);
            }
            $attribute .= '"';
        }
        return $attribute;
    }
240724
public function attr($attribute)
    {
        if (!$this->attributes instanceof EntityAttributeContainer) {
            $this->attributes = $this->createEntityAttributeContainer();
        }

        return $this->attributes->attr($attribute);
    }
678596
protected function getProperty($property)
	{
		// Get the raw value.
		$value = array_key_exists($property, $this->properties) ? $this->properties[$property] : null;

		return $value;
	}
655279
protected function valProp($property)
    {
        // Validate the property structure
        $this->valPropStructure($property);

        // If the property has values
        if (count($property->values)) {
            // Validate the property name
            $property->name = $this->valPropName($property);

            // Validate the property values
            $property->values = $this->valPropValues($property->values);

            // If the property has significant values
            if (count($property->values)) {
                return $property;
            }
        }

        return null;
    }
52722
public function get($property = null)
    {
        if ($property === null || $property == '') {
            return $this->config;
        }

        $tree = explode('.', $property);
        $node = $this->config;
        foreach ($tree as $workingNode) {
            if (!array_key_exists($workingNode, $node)) {
                $actualNode = null;
                foreach ($node as $testNodeKey => $testNode) {
                    if (\URLify::filter($testNodeKey) == $workingNode) {
                        $actualNode = $testNodeKey;
                    }
                }
                if ($actualNode === null) {
                    throw new \InvalidArgumentException('The property "'.$property
                        .'" was not found. Failed while getting node "'.$workingNode.'"');
                }
                $workingNode = $actualNode;
            }
            $node = $node[$workingNode];
        }

        return $node;
    }
318876
public static function get_property_type($property) {

        self::fill_properties_cache();

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

        return self::$propertiescache[$property]['type'];
    }
433738
public function setProperty(PhpProperty $property) {
		$property->setParent($this);
		$this->properties->set($property->getName(), $property);

		return $this;
	}
1017989
public static function createSetter($entity, $property)
    {
        $setter = 'set' . ucfirst($property);
        if (false === is_callable([$entity, $setter])) {
            throw new \InvalidArgumentException(
                sprintf('No setter found for property %s in class %s', $property, get_class($entity))
            );
        }

        return $setter;
    }
483071
public function getAutocodeProperty($property)
    {
        return isset($this->autocodeProperties[$property])
            ? $this->autocodeProperties[$property]
            : null;
    }
200657
private function getPropertySettings($property)
    {
        $data = [];
        $settings = [
            'minimum' => 'min',
            'maximum' => 'max',
        ];
        foreach ($settings as $setting => $name) {
            if (isset($property[$setting])) {
                $data[] = $name.':'.$property[$setting];
            }
        }

        return implode(' | ', $data);
    }
420145
private function getRootProperty($property)
    {
        return ($pos = strpos($property, '.')) !== false ? substr($property, 0, $pos) : $property;
    }
228059
protected function generateHelpText($property)
    {
        $propInfo   = $this->getEnvironment()->getDataDefinition()->getPropertiesDefinition()->getProperty($property);
        $label      = $propInfo->getDescription();
        $widgetType = $propInfo->getWidgetType();

        if (null === $label
            || ('password' === $widgetType)
            || !\is_string($label)
            || !$GLOBALS['TL_CONFIG']['showHelp']
        ) {
            return '';
        }

        return '<p class="tl_help tl_tip">' . $label . '</p>';
    }
769952
public function getRelationMappedToProperty(string $property)
    {
        InvalidArgumentException::verify(is_string($property), 'property must be a string');
        $relations = $this->getRelationMappings();

        foreach ($relations as $mapping) {
            $accessor = $mapping->getAccessor();

            if ($accessor instanceof PropertyAccessor) {
                if ($accessor->getPropertyName() === $property) {

                    return $mapping->getRelation();
                }
            }
        }

        return null;
    }
750718
private function getIntegritySpecification(string $property)
    {
        $constraints = $this->validProperties[$property];

        if (!is_array($constraints)) {
            $constraints = $this->parseIntegritySpecification($this->validProperties[$property]);
        }

        return $constraints;
    }
392171
public static function property($property = null)
	{
		$property = strtolower($property);
		return array_key_exists($property, static::$properties) ? static::$properties[$property] : null;
	}
507433
protected function valPropName($property)
    {
        $propertyName = trim($property->name);

        // If the property name is empty
        if (!strlen($propertyName)) {
            throw new InvalidArgumentException(
                InvalidArgumentException::EMPTY_PROPERTY_NAME_STR,
                InvalidArgumentException::EMPTY_PROPERTY_NAME
            );
        }

        return $propertyName;
    }
1372685
public function addProperty(string $property) : self
    {
        $property = strtolower($property);
        if (!in_array($property, $this->properties, true)) {
            $this->properties[] = $property;
        }

        return $this;
    }