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

        return $this->attr;
    }