public function templateFactory($resourceName, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, ITemplate $parentTemplate = null)
    {
        if (isset($this->resources[$resourceName])) {
            /**
             * Interface ITemplate
             *
             * @var ITemplate $class
             */
            $class = $this->resources[$resourceName]['class'];

            return $class::templateFactory($this, $resourceId, $cacheTime, $cacheId, $compileId, $parentTemplate);
        }

        throw new Exception('Unknown resource type : ' . $resourceName);
    }