public function createEngine($url, array $config = array())
    {
        //Find the file type
        if(!$type = pathinfo($url, PATHINFO_EXTENSION)) {
            $type = $url;
        }

        //Engine not supported
        if(!in_array($type, $this->getFileTypes()))
        {
            throw new RuntimeException(sprintf(
                'Unable to find a template engine for the "%s" file format - did you forget to register it ?', $type
            ));
        }

        //Create the engine
        $identifier = $this->getEngine($type);
        $engine     = $this->getObject($identifier, $config);

        if(!$engine instanceof KTemplateEngineInterface)
        {
            throw new UnexpectedValueException(
                'Engine: '.get_class($engine).' does not implement KTemplateEngineInterface'
            );
        }

        return $engine;
    }