Register hook on getAttribute method.

@codeCoverageIgnore

@return \Closure
321298
public function getAttribute()
    {
        return function ($next, $value, $args) {
            $key = $args->get('key');

            if ($this->hasMapping($key)) {
                $value = $this->mapAttribute($key);
            }

            return $next($value, $args);
        };
    }
1370476
public function getCanonicalAttribute()
    {
        if ($canonical = $this->canonicalUrl) {
            return $canonical;
        }

        if (method_exists($this, 'baseCanonical')) {
            return $this->baseCanonical();
        }

        return url()->current();
    }
243468
public function getAttribute($name = null)
    {
        return is_null($name) ? $this->attributes : Arr::get($this->attributes, $name);
    }
3441
public function getAttributes()
    {
    	// Sequence validation
    	$this->ensureAuthenticationCallSuccessful();
    	// This is likely a duplicate check that could be removed....
        if ( empty($this->_user) ) {
            // if no user is set, there shouldn't be any attributes also...
            phpCAS::error(
                'this method should be used only after '.__CLASS__
                .'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()'
            );
        }
        return $this->_attributes;
    }
1157112
protected function getAttributeLatitude()
    {
        $attribute = array_get($this->formFieldData->options(), 'latitude_name', 'latitude');

        if ( ! $attribute) {
            $attribute = false;
        }

        return $attribute;
    }
657908
public function getAttribute($attr)
    {
        return isset($this->attributes[$attr]) ? $this->attributes[$attr] : null;
    }
853117
public function getAttribute($key)
    {
        if (method_exists($this, $key)) {
            return $this->getRelationValue($key);
        }

        return parent::getAttribute($this->getSnakeKey($key));
    }
1091721
public function _getAttributeRenderer()
    {
        $this->attributeRenderer = $this->getLayout()->createBlock(
            \Dotdigitalgroup\Email\Block\Adminhtml\Config\Select::class,
            '',
            ['data' => ['is_render_to_js_template' => true]]
        );

        return $this->attributeRenderer;
    }
629489
public function getSelectedContextAttribute()
    {
        if (isset($this->context)) {
            return $this->context;
        }
        switch ($this->selected_context_type) {
            case 'Member':
                return $this->context = new MemberContext($this);
            default:
                abort(401, 'Context not selected.');
        }
    }
540187
protected function _getAttributeMap()
	{
		if( !isset( $this->_attributesMap ) )
		{
			$this->_attributesMap = array();

			foreach( $this->_attributes as $attribute ) {
				$this->_attributesMap[ $attribute->getCode() ] = $attribute;
			}
		}

		return $this->_attributesMap;
	}
1263593
public function getAttr($key = null)
    {
        if (null !== $key) {
            return isset($this->attr[$attribute]) ? $this->attr[$attribute] : null;
        }

        return $this->attr;
    }
663301
public function getAttribute( $key ){
		if( !array_key_exists( $key, $this->attributes ) )
			return NULL;
		return $this->attributes[$key];
	}
871085
public function setAllAttributes()
    {
        $methods            = get_class_methods($this);
        $attributeMethods   = array();

        // Get all attribute related getters
        foreach ($methods as $method) {
            if (strpos($method, 'getAttribute') !== false && $method !== 'getAttributes') {
                $attributeMethods[] = $method;
            }
        }

        // Call all attribute related getters
        foreach ($attributeMethods as $attributeMethod) {
            $name   = strtolower(str_replace('getAttribute', '', $attributeMethod));
            $value  = $this->$attributeMethod();

            $this->_setAttributeProperty($name, $value);
        }

        return $this;
    }
143213
public function getAttributes()
    {
        if ($this->_attributes === null) {
            $this->_attributes = $this->defaultAttributes();
        }
        return $this->_attributes;
    }
970182
public function remember($attribute, $closure)
    {
        $key = $attribute.'_'.$this->location;

        if (!Cache::has($key)) {
            $result = $closure();
            Cache::forever($key, $result);
        }

        return Cache::get($key);
    }
808263
public function getTagAttribute()
    {
        return ImageElement::img()
            ->isSelfClosing()
            ->src($this->getUrlAttribute() ?: false)
            ->alt($this->getAttribute('title') ?: false);
    }
1149176
public function getParsedMarkupAttribute()
    {
        if (array_key_exists('parsedMarkup', $this->attributes)) {
            return $this->attributes['parsedMarkup'];
        }

        return $this->attributes['parsedMarkup'] = $this->parseMarkup();
    }