Get the Attribute of an model
@param string $key
@return mixed
508634
public function getAttribute($key, $translated = false)
    {
        if (false === $translated) {
            return parent::getAttribute($key);
        }
        
        $defaultLanguage = Session::get('default_language');
        $languageId = request()->get('language_id', $defaultLanguage->id);

        if (in_array($key, $this->getTranslatedAttributes())
            && $defaultLanguage->id != $languageId
        ) {
            $translatedModel = $this->translations()
                ->whereLanguageId($languageId)
                ->first();
            if ($translatedModel === null) {
                return null;
            }
            return $translatedModel->attributes[$key];
        }
        
        return parent::getAttribute($key);
    }
268454
public function getAttribute($key)
    {

        // query whether the identifier exists or not
        if (isset($this[$uid = $this->maskKey($key)])) {
            return $this[$uid];
        }
    }
249300
public function getAttribute($key)
    {
        if (isset($this->mutations[$key]))
        {
            return $this->mutations[$key];
        }

        if (array_key_exists($key, $mutatables = static::getMutatables()))
        {
            return $this->mutateExtensionAttribute($key, $mutatables[$key]);
        }

        return parent::getAttribute($key);
    }
1075418
public function getAttribute($key)
    {
        if ( ! isset($this->attributes[$key])) {
            return None::create();
        }

        return new Some($this->attributes[$key]);
    }
1031909
public static function get($key)
    {
        $noInitModel = static::buildNoInitModel();
        $model = static::find()->where([$noInitModel->idAttribute => $key])->one();
        if ($model) {
            return $model->value;
        }
        return null;
    }
1021949
public function getAttribute($key)
    {
        if (isset($this->repositories[$key])) {
            $className = str_replace('\\', '', $this->repositories[$key]);

            if ($repository = $this->cache->get("repositories.{$className}.{$this->id}.{$key}")) {
                return $repository;
            }

            $class = $this->repositories[$key];

            return $this->cache->set(
                "repositories.{$className}.{$this->id}.{$key}",
                new $class(
                    $this->http,
                    $this->cache,
                    $this->factory,
                    $this->getRepositoryAttributes()
                )
            );
        }

        if ($str = $this->checkForMutator($key, 'get')) {
            $result = $this->{$str}();

            return $result;
        }

        if (! isset($this->attributes[$key])) {
            return;
        }

        return $this->attributes[$key];
    }
1242897
public function &getAttributeValue(string $key)
    {
        if ($key !== 'layout') {
            return parent::getAttributeValue($key);
        }

        if ( ! isset($this->attributes[$key]) || ! is_array($this->attributes[$key])) {
            $null = null;
            return $null;
        }

        // If object is an array, interpret it by type and make the corresponding data object.
        $this->decorateLayoutAttribute($key);

        return $this->attributes[$key];
    }
1027251
public function getAttribute($key)
    {
        $key = $this->reFormatForCompatibility($key);

        return (property_exists($this, $key)) ? $this->{$key} : null;
    }
155640
public function getNodeAttribute($key)
    {
        if (array_key_exists($key, $this->nodeAttributes)) {
            return $this->nodeAttributes[$key];
        }

        return new DataObject();
    }
755738
protected function getAttributeValue($key)
    {
        if (array_key_exists($key, $this->attributes)) {
            return $this->attributes[$key];
        }

        return null;
    }
1060275
public function getAttribute($key)
    {
        if ($this->isKeyReturningTranslationText($key)) {
            if ($translation = $this->getTranslation()) {
                return $translation->$key;
            }

            # fallback: try to find default locale values
            if ($translation = $this->getTranslation(\localizer\getDefault()->id())) {
                return $translation->$key;
            }

            return null;
        }

        return parent::getAttribute($key);
    }
1222383
public function getAttribute($key)
    {
        if ($this->isBaseAttribute($key))
        {
            return parent::getAttribute($key);
        } else
        {
            return $this->getSource()->getAttribute($key);
        }
    }
1057376
public function getAttribute($key)
    {
        try {
            return $this->_stmt->getAttribute($key);
        } catch (PDOException $e) {
            // require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
1165082
public function getAttribute($key)
    {
        if (method_exists($this, $key)) {
            return $this->getRelationshipFromMethod($key);
        }

        return parent::getAttribute($this->getSnakeKey($key));
    }
711486
protected function getEntityAttributeRelation(string $key)
    {
        $key = $this->getEntityAttributeName($key);

        if ($this->relationLoaded($key)) {
            return $this->getRelation($key);
        }

        return $this->getRelationValue($key);
    }
1204491
public function get($key)
    {
        if ($this->isAcceptable($key)) {
            $key = $this->modelKey($key);
        }

        if ($this->has($key)) {
            return $this->objects[$key];
        }

        return null;
    }
368460
public function getAttribute($key)
    {
        $value = parent::getAttribute($key);

        if ($key === 'name') {
            $value = str_replace($this->multiMarker, '', $value);
        }

        return $value;
    }