Returns the first error's attribute name

@since 0.0.1
@param {string} $attribute
@return {string|null}
768092
public function isFirstErrorAttribute($attribute) {
		if($this->_firstErrorAttribute === false) {
			$errorAttributes = array_keys($this->firstErrors);
			$this->_firstErrorAttribute = array_shift($errorAttributes);
		}

		return $attribute == $this->_firstErrorAttribute;
	}
1179708
private function getAttributeName($key)
    {
        if (0 === strpos($key, '@') && $this->isValidNodeName($attrName = substr($key, 1))) {
            return $attrName;
        }

        return null;
    }
1066431
public function attributeIsDirty($attribute)
	{
		return $this->_dirty && isset($this->_dirty[$attribute]) && array_key_exists($attribute, $this->_attributes);
	}
529423
public function getAttributeText($attribute) {
		$items = $this->getAttributeItems($attribute, 0, false, true);

		return isset($items[$this->$attribute]) ? $items[$this->$attribute] : null;
	}
248301
public function getAttributeToLdap($attribute)
    {
        return $this->hasAttribute($attribute) ? $this->lcAttributeNameMap[strtolower($attribute)] : $attribute;
    }
1096863
public function guessColumnForQuery( $attribute )
	{
		if ( in_array( $attribute, array_collapse( $this->implicitAttributes ) ) && !is_numeric( $last = last( explode( '.', $attribute ) ) ) )
		{
			return $last;
		}

		return $attribute;
	}
715090
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::PROPEL_ATTR_CACHE_PREPARES:
                return $this->cachePreparedStatements;
                break;
            case self::PROPEL_ATTR_CONNECTION_NAME:
                return $this->connectionName;
                break;
            default:
                return parent::getAttribute($attribute);
        }
    }
927230
protected function getValue($attribute)
    {
        if (! is_null($value = Arr::get($this->data, $attribute))) {
            return $value;
        } else if (! is_null($value = Arr::get($this->files, $attribute))) {
            return $value;
        }
    }
1047031
protected function getAttribute($attribute)
	{
		// The developer may dynamically specify the array of custom attributes
		// on this Validator instance. If the attribute exists in this array
		// it takes precedence over all other ways we can pull attributes.
		if (isset($this->customAttributes[$attribute]))
		{
			return $this->customAttributes[$attribute];
		}

		$key = "validation.attributes.{$attribute}";

		// We allow for the developer to specify language lines for each of the
		// attributes allowing for more displayable counterparts of each of
		// the attributes. This provides the ability for simple formats.
		if (($line = $this->translator->trans($key)) !== $key)
		{
			return $line;
		}

		// If no language line has been specified for the attribute all of the
		// underscores are removed from the attribute name and that will be
		// used as default versions of the attribute's displayable names.
		return str_replace('_', ' ', snake_case($attribute));
	}
643400
function attribute( $attribute )
    {
        if ( $attribute == 'info' )
        {
            return $this->Info;
        }
        else if ( $attribute == 'notification_types' )
        {
            return $this->notificationTypes();
        }

        eZDebug::writeError( "Attribute '$attribute' does not exist", __METHOD__ );
        return null;
    }
940864
protected function getAttributeId($attribute)
	{
		return isset($this->htmlOptions['id'])
			? $this->htmlOptions['id']
			: CHtml::getIdByName(CHtml::resolveName($this->model, $attribute));
	}
1122171
public function attr_first($attr)
    {
        return $this->_nodes ? current($this->_nodes)->getAttribute($attr) : null;
    }
1291175
public function user(?string $attribute = null)
    {
        if ($this->isGuest()) {
            return null;
        }

        $user = auth()->user();

        if ($attribute) {
            return $user->{$attribute};
        }

        return $user;
    }
556991
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::PROPEL_ATTR_CACHE_PREPARES:
                return $this->isCachePreparedStatements;
                break;
            default:
                return $this->connection->getAttribute($attribute);
        }
    }
1159028
public function getErrors($attribute = null): array
    {
        if ($attribute === null) {
            return $this->errors === null ? [] : $this->errors;
        } else {
            return isset($this->errors[$attribute]) ? $this->errors[$attribute] : [];
        }
    }
937
public function getAttribute($attribute)
    {
        return !empty($this->attributes[$attribute]) ? $this->attributes[$attribute] : null;
    }
1162880
protected function extractDistinctValues($attribute)
    {
        $attributeData = ValidationData::extractDataFromPath(
            ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
        );

        $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#'));

        return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
            return (bool) preg_match('#^'.$pattern.'\z#u', $key);
        });
    }