public function toArray($protect = null)
    {
        $protect = is_array($protect)
            ? $protect
            : $this->_protect;

        if ($protect) {
            $new = $this->_params;


            foreach ($protect as $key) {
                unset($new[$key]);
            }

            // Do json encode and decode to convert all levels to arrays
            return json_decode(json_encode($new), true, 512);
        }

        // Do json encode and decode to convert all levels to arrays
        return json_decode(json_encode($this->_params), true, 512);
    }