protected function setDecorator($conf)
    {
        $decoratorClass = null;

        if (is_string($conf)) {
            if (class_exists($conf)) {
                $decoratorClass = new $conf();
            } elseif ($this->serviceManager->has($conf)) {
                $decoratorClass = $this->serviceManager->get($conf);
            }
        }

        if (!is_object($decoratorClass)) {
            throw new \Exception('Class or Service '.$conf. 'not found.');
        }

        if (!$decoratorClass instanceof AbstractDecorator) {
            throw new \Exception(
                sprintf(
                    'Decorator class must instance of AbstractDecorator, but %s given.'
                    ,get_class($decoratorClass)
                )
            );
        }

        $this->helper->setDecorator($decoratorClass);
    }