public function registerEngine($identifier, array $config = array())
    {
        $result = false;

        $identifier = $this->getIdentifier($identifier);
        $class      = $this->getObject('manager')->getClass($identifier);

        if(!$class || !array_key_exists('KTemplateEngineInterface', class_implements($class)))
        {
            throw new UnexpectedValueException(
                'Engine: '.$identifier.' does not implement KTemplateEngineInterface'
            );
        }

        $types = call_user_func(array($class, 'getFileTypes'));/*$class::getFileTypes();*/

        if (!empty($types))
        {
            foreach($types as $type)
            {
                if(!$this->isRegistered($type))
                {
                    $identifier->getConfig()->merge($config)->append(array(
                        'debug'      => $this->getConfig()->debug,
                        'cache'      => $this->getConfig()->cache,
                        'cache_path' => $this->getConfig()->cache_path
                    ));

                    $this->__engines[$type] = $identifier;
                }
            }
        }

        return $result;
    }