public function setOptions($options)
    {
        if (!is_array($options) && !($options instanceof \Traversable)) {
            return $this;
        }

        foreach ($options as $name => $option) {
            switch (strtolower(strtr($name, '-', ''))) {
                case 'pathmanager':
                    $this->setPathManager($option);
                    break;

                case 'subdirectories':
                    if (is_array($option)) {
                        $this->addSubdirectories($option);
                    }

                    break;
            }
        }

        return $this;
    }