Mongolid\Model\Attributes::getAttribute PHP Method

getAttribute() public method

Get an attribute from the model.
public getAttribute ( string $key ) : mixed
$key string The attribute to be accessed.
return mixed
    public function getAttribute(string $key)
    {
        $inAttributes = array_key_exists($key, $this->attributes);
        if ($inAttributes) {
            return $this->attributes[$key];
        } elseif ($key == 'attributes') {
            return $this->attributes;
        }
    }