Returns the value of the attribute. If the value isn't set, it returns the fallback;
@param string $attribute
@return array
356228
public function getAttribute(string $attribute): array
    {
        // Determine if the attribute is present
        if (! array_key_exists($attribute, $this->attributes)) {
            return [];
        }

        // Return the value of the attribute
        return $this->attributes[$attribute];
    }
164767
public function get($attribute = null, $default = null)
    {
        if (is_null($attribute)) {
            return $this->attributes;
        }

        if (array_key_exists($attribute, $this->attributes)) {
            return $this->attributes[$attribute];
        }

        return $default;
    }
521180
protected function convertAttribute($attribute)
    {
        try {
            return (string) $attribute;
        } catch (\Exception $e) {
            switch (true) {
                // Handle DateTime attribute pass.
                case $attribute instanceof \DateTime:
                    return $attribute->format('Y-m-d H:i:s');

                // Handle callables.
                case $attribute instanceof \Closure:
                    return $this->convertAttribute($attribute());

                // Handle arrays using json by default or print_r if error occurred.
                case is_array($attribute):
                    $json = json_encode($attribute);

                    return json_last_error() === JSON_ERROR_NONE
                        ? $json
                        : print_r($attribute);

                // Handle all other object.
                case is_object($attribute):
                    return get_class($attribute);

                // For all unknown.
                default:
                    return '?';
            }
        }
    }
641730
private function getAttributeOrFallback($locale, $attribute)
    {
        $value = $this->getTranslation($locale)->$attribute;
        $usePropertyFallback = $this->useFallback() && $this->usePropertyFallback();
        if (empty($value) && $usePropertyFallback) {
            return $this->getTranslation($this->getFallbackLocale(), true)->$attribute;
        }
        return $value;
    }
90907
public function getHtml($attribute = null)
        {
            if(null !== $attribute) {
                $attribute = strval($attribute);
                if(\Thin\Arrays::exists($attribute, $this->attributes)) {
                    return $attribute . '="' . implode(' ', $this->attributes[$attribute]) . '"';
                }
            } else {
                $return = array();
                foreach(array_keys($this->attributes) as $attrib) {
                    $return[] = $this->getHtml($attrib);
                }
                return implode(' ', $return);
            }

            return '';
        }
248301
public function getAttributeToLdap($attribute)
    {
        return $this->hasAttribute($attribute) ? $this->lcAttributeNameMap[strtolower($attribute)] : $attribute;
    }
240724
public function attr($attribute)
    {
        if (!$this->attributes instanceof EntityAttributeContainer) {
            $this->attributes = $this->createEntityAttributeContainer();
        }

        return $this->attributes->attr($attribute);
    }
324616
public function getTableAttribute($attribute)
    {
        if (! array_key_exists($attribute, $this->tableAttributes)) {
            throw new \Exception("Table attribute '{$attribute}' does not exist.");
        }

        return $this->tableAttributes[$attribute];
    }
311218
protected function skipNullValue(array $attributes)
    {
        $attr = [];

        foreach ($attributes as $key => $value) {
            if (null !== $value) {
                $attr[$key] = \is_array($value)
                    ? $this->skipNullValue($value)
                    : $value;
            }
        }

        return $attr;
    }
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);
        }
    }
442651
public function on($attribute)
	{
		$errors = $this->$attribute;

		return $errors && count($errors) == 1 ? $errors[0] : $errors;
	}
1269655
public function getAttribute($attribute)
    {
        //Check this attribute is support
        if (isset($this->input_map[$attribute])) {
            return $this->input_map[$attribute];
        } else {
            throw new AttributeInvalidException('Attribute not supported by this library');
        }
    }
653343
public function getAttribute($attribute, $fallback = null)
    {
        if ($attribute === 'class') {
            return implode(' ', $this->classes);
        }

        return $this->attributes[$attribute] ?? $fallback;
    }
872587
public function getAttributeValue($name){
        $returnValue = null;
        if($this->hasAttribute($name)){
            $returnValue = $this->attributes[$name]->getValue();
        }
        return $returnValue;
    }
1153614
private function getAttributeOrFallback($locale, $attribute)
    {
        $translation = $this->getTranslation($locale);

        if (
            (
                ! $translation instanceof Model ||
                empty($translation->$attribute)
            ) &&
            $this->usePropertyFallback()
        ) {
            $translation = $this->getTranslation($this->getFallbackLocale(), false);
        }

        if ($translation instanceof Model) {
            return $translation->$attribute;
        }

        return null;
    }
27655
public function getAttributeForVue($attribute) {
		return [
			'name' => Html::getInputName($this, $attribute),
			'value' => $this->$attribute,
			'id' => Html::getInputId($this, $attribute),
			'label' => $this->getAttributeLabel($attribute),
			'hint' => $this->getAttributeHint($attribute),
			'error' => $this->isFirstErrorAttribute($attribute),
		];
	}
1126090
public function getAttribute($attribute)
    {
        $ret = '';
        if (isset($this->attributeHash[$attribute])) {
            $ret = $this->attributeHash[$attribute];
        }

        return $ret;
    }