public function reset()
    {
        if (!is_null($this->current_engine)) {
            $this->current_engine->reset();
        }

        // Unload the engines
        $this->engines = array();
        $this->engines_loaded = false;
        $this->file_extensions = array();

        $this->current_engine = null;
        $this->assigned_variables = array();
        $this->directory = Core::$appDir . DS . 'Layout';
        Logger::log('Reset the layout manager to its default state');
    }