public function metadataMask()
    {
        $attribs = array_keys($this->getAllAttributes());

        $visible = $this->getVisible();
        $hidden = $this->getHidden();
        if (0 < count($visible)) {
            $attribs = array_intersect($visible, $attribs);
        } elseif (0 < count($hidden)) {
            $attribs = array_diff($attribs, $hidden);
        }

        return $attribs;
    }