Retrieves the model attribute.

@param string $name

@return mixed

@throws PropertyDoesNotExistException If property isn't found.
511041
public function get_attribute( $name ) {
		if ( $method = $this->has_map_method( $name ) ) {
			return $this->attributes[ self::OBJECT_KEY ]->{$this->{$method}()};
		}

		if ( $method = $this->has_compute_method( $name ) ) {
			return $this->{$method}();
		}

		if ( isset( $this->attributes[ self::TABLE_KEY ][ $name ] ) ) {
			return $this->attributes[ self::TABLE_KEY ][ $name ];
		}

		if ( isset( $this->defaults[ $name ] ) ) {
			return $this->defaults[ $name ];
		}

		return null;
	}
770517
public function getProperty($name)
    {
        //Handle computed properties
        if(!$this->hasProperty($name) && !empty($name))
        {
            $getter  = 'getProperty'.KStringInflector::camelize($name);
            $methods = $this->getMethods();

            if(isset($methods[$getter])) {
                parent::offsetSet($name, $this->$getter());
            }
        }

        return parent::offsetGet($name);
    }
353268
public function getAttribute($name)
    {
        try {
            return parent::__get($name);
        } catch (UnknownPropertyException $ignore) {
        }

        $path = explode('.', $name);
        $ref = &$this->_dynamicAttributes;

        foreach ($path as $key) {
            if (!isset($ref[$key])) {
                return null;
            }
            $ref = &$ref[$key];
        }

        return $ref;
    }
1160016
public function getMoufProperty($name) {
    	$moufProperties = $this->getMoufProperties();
    	if (isset($moufProperties[$name])) {
    		return $moufProperties[$name];
    	} else {
    		return null;
    	}
    	
    }
179239
public function getReference($name)
    {
        if (!isset($this->_manager)) {
            throw new RepositoryException('Model is not handled by a managed repository');
        }
        if (array_key_exists($name, $this->_references)) {
            $ref = $this->_references[$name];
            $repo = $this->_manager->getByClass($ref['model']);
            if (!$repo) {
                throw new RepositoryException('Referenced model is not handled by a managed repository');
            }
            return ($repo->find($ref['key'], $this->{$ref['attribute']}) ?: null);
        }
        return null;
    }
873639
public function getAttribute($name) {

	    $key = strtolower($name);

	    if('value' === $key) {
	        return $this->getValue();
        }
        if('name' === $key) {
            return $this->getName();
        }


	    if(array_key_exists($key, $this->attributes)) {

	        return $this->attributes[strtolower($name)];

        }

	    return null;

    }
1155233
public function getEnumByAttribute($name)
    {
        /**
         * @var $property RelatedPropertyModel
         */
        $value = $this->getAttribute($name);
        $property = $this->getRelatedProperty($name);

        if ($property && $property->property_type == PropertyType::CODE_LIST) {
            if ($property->handler->isMultiple) {
                if ($property->enums) {
                    $result = [];

                    foreach ($property->enums as $enum) {
                        if (in_array($enum->id, $value)) {
                            $result[$enum->code] = $enum;
                        }

                    }

                    return $result;
                }
            } else {
                if ($property->enums) {
                    $enums = (array)$property->enums;

                    foreach ($enums as $enum) {
                        if ($enum->id == $value) {
                            return $enum;
                        }
                    }
                }

                return "";
            }
        }

        return null;
    }
979898
public function getAttribute($name)
    {
        foreach ($this->attributes as $attribute) {
            if ($attribute->getName() == $name) {
                return $attribute;
            }
        }

        return false;
    }
791089
public function getAttribute($name)
    {
        if (mb_strpos($name, '.')) {
            return $this->getAttributeByPath($name);
        }

        if ($this->attribute_map->hasKey($name)) {
            return $this->attribute_map->getItem($name);
        } else {
            throw new RuntimeException('Type has no attribute: ' . $name);
        }
    }
1102592
public function getPropertyByName($name)
    {
        foreach ($this->properties as $property) {
            if ($property->getName() === $name) {
                return $property;
            }
        }
    }
593140
protected function get_model_value_attribute( $name ) {
		$key = $this->transform_key( $name );

		if ( method_exists( $this->model, 'get' ) ) {
			return $this->model->get( $key );
		}

		return data_get( $this->model, $this->transform_key( $name ) );
	}
121010
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        $this->fieldDoesNotExist($name);
    }
1247628
public static function model($name = "default")
    {
        if (!isset(self::$instance[$name])) {
            return null;
        }

        return self::$instance[$name];
    }
754826
public function getAttribute($name)
    {
        if(strlen($name) < 1)
        {
            throw new HTMLTagException("Attribute name is empty");
        }

        if(!isset($this->tag_attributes[strtolower($name)]))
        {
            return null;
        }

        return $this->tag_attributes[strtolower($name)];
    }
1239666
public function getAttribute($name)
    {
        $result = null;

        if ($this->attributeExists($name)) {
            $result = $this->attributes[$name];
        }

        return $result;
    }
1259272
public function attribute( $name )
    {
        if ( !$this->hasAttribute( $name ) )
        {
            eZDebug::writeError( "Attribute '$name' does not exist", __METHOD__ );
            return null;
        }

        if ( $name == 'tags' )
            return $this->tags();
        else if ( $name == 'tags_count' )
            return $this->tagsCount();
        else if ( $name == 'permission_array' )
            return $this->getPermissionArray();
        else if ( $name == 'tag_ids' )
            return $this->IDArray;
        else if ( $name == 'keywords' )
            return $this->KeywordArray;
        else if ( $name == 'parent_ids' )
            return $this->ParentArray;
        else if ( $name == 'locales' )
            return $this->LocaleArray;
        else if ( $name == 'id_string' )
            return $this->idString();
        else if ( $name == 'keyword_string' )
            return $this->keywordString();
        else if ( $name == 'meta_keyword_string' )
            return $this->metaKeywordString();
        else if ( $name == 'parent_string' )
            return $this->parentString();
        else if ( $name == 'locale_string' )
            return $this->localeString();

        return null;
    }
891675
protected function getAttribute($name)
    {
        if (isset($this->data[$name])) {
            return $this->data[$name];
        }

        return null;
    }