Search attribute index by $name.
@param $name
@return int
190800
public function attrIndex($name)
    {
        if (!isset($this->attrs)) { return -1; }

        for ($i = 0, $len = count($this->attrs); $i < $len; $i++) {
            if ($this->attrs[$i][0] === $name) { return $i; }
        }
        return -1;
    }
853607
public function readAttribute($name) {
        $method = 'get' . ucfirst($name);
        if(method_exists($this, $method)) {
            return $this->$method();
        } else {
            return parent::readAttribute($name);
        }
    }
881598
protected function iget ($name)
	{
		
		// If the attribute doesn't exists
		
		if (!$this->attributeExists ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute does not exist!');
		}
		
		// If no attribute value is set
		
		if (!$this->attributeHasValue ($name))
		{
			
			// If there is a default set to value
			
			if (array_key_exists ('default', static::$attributes[$name]))
			{
				$this->iset ($name, static::$attributes[$name]['default'], FALSE);
			}
			
			// Else there is no value and no default
			
			else
			{
				throw new Exception (get_called_class () . '->' . $name . ' attribute isn\'t set and has no default value!');
			}
			
		}
		
		// Return value
		
		return $this->attributeValues[$name];
			
	}
1159434
public function get($name)
    {
        $name = $this->cleanAttributeName($name);

        return isset($this->props[$name]) ? $this->props[$name] : null;
    }
1076548
public function readAttribute ($name)
	{
		$this->iset ($name, $this->getValue (array (
			'select'	=> $name,
			'where'		=> array (array (static::$pk, $this->iget (static::$pk)))
		)));
	}
1084753
public function findKey($name)
    {
        if (!(is_numeric($name) && $this->exist($name))) {
            $name = $this->search($name);
        }

        return $name;
    }
954203
public function __isset($name) 
    {
        $getter = 'get' . $name;
        if (method_exists($this, $getter)) {
            return $this->$getter() !== null;
        }
        
        $name = strtolower($name);
        
        return array_key_exists($name, $this->attrs);
    }
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;
    }
1063509
public function getAttr(string $name)
    {
        if (!isset($this->attr[$name]))
        {
            return NULL;
        }

        return $this->attr[$name];
    }
1000900
public function getAttribute($name): string
    {
        if ($this->attributes->length === 0) { // Performance optimization
            return '';
        }
        $value = parent::getAttribute($name);
        return $value !== '' ? (strstr($value, 'html5-dom-document-internal-entity') !== false ? $this->updateResult($value) : $value) : '';
    }
426500
public static function attributes_for($name) 
    {
        self::load();
        $data = self::get($name);
        if (!$data) {
            return null;
        }
        return $data;
    }
821965
public function get_id_attribute( $name, $attributes ) {
		if ( array_key_exists( 'id', $this->global_attributes ) ) {
			return $this->global_attributes['id'];
		}

		if ( array_key_exists( 'id', $attributes ) ) {
			return $attributes['id'];
		}

		if ( in_array( $name, $this->labels ) ) {
			return $name;
		}

		return null;
	}
909218
function attribute( $name )
    {
        if ( isset( $this->AttributeVariableMap[$name] ) )
        {
            $memberVariable = $this->AttributeVariableMap[$name];
            return $this->$memberVariable;
        }
        else
        {
            eZDebug::writeError( "Attribute '$name' does not exist", __METHOD__ );
            return null;
        }
    }
1066589
public function hasIndex($name)
    {
        $indexes = $this->getIndexes();

        foreach ($indexes as $index) {
            if ($index->Key_name == $name) {
                return true;
            }
        }

        return false;
    }
524051
public function findAttributes($name)
    {
        $first = ComponentParams::where([
                    'name'     => $name,
                    'resource' => uri(),
                    'brand_id' => brand_id(),
                    'uid'      => auth()->user()->id
                ])->first();
        return is_null($first) ? false : $first->data;
    }
167144
public function getParameterValue($name)
    {
        return (isset($this->attributes[$name])) ? $this->attributes[$name] : null;
    }
318666
public function getDirtyAttribute($name)
    {
        $result = null;

        if ($this->dirtyAttributeExists($name)) {
            $result = $this->dirtyAttributes[$name];
        }

        return $result;
    }