Set engine

@param string $engine
@return Template
511471
public function setEngine(string $engine)
  {
    if (in_array($engine, ['modulus', 'blade'])) {
      $this->engine = $engine;
      return $this;
    }

    $this->exception('Engine "' . $engine . '" does not exist.');
  }
66168
public function getEngine($name): TemplateEngine
    {
        $this->loadTemplateEngines();
        if (isset($this->engines[$name])) {
            return $this->engines[$name];
        }
        throw new LayoutException('Could not return engine. Engine does not exist', 1);
    }
1331647
public function iCreateAFactoryForEngineWithNoOptions($engine)
    {
        $this->factory = new Slick\Template\Template(['engine' => $this->engines[$engine]]);
    }
281152
function defaultEngine (engine) {
    // set engine
    if (defined(engine)) {
        getGlobal().defaultEngine = engine
        // return class when setting
        return ImmutableCoreModel
    }
    // return engine
    return getGlobal().defaultEngine
}
73817
public function setTemplate($template)
    {
        if (is_string($template)) {
            $template = new TemplateView($template);
        }
        $template->mergeData([
            'layout' => $this
        ]);
        $this->addChild(new Part($template, 'template'));
        return $this;
    }
938487
protected function setEngine(SessionHandlerInterface $handler)
    {
        if (!headers_sent() && session_status() !== \PHP_SESSION_ACTIVE) {
            session_set_save_handler($handler, false);
        }

        return $this->_engine = $handler;
    }
571052
public static function setActiveTheme($activeTheme) {
		self::$activeTheme = $activeTheme ?? '';
		$engineInstance = Startup::$templateEngine;
		if ($engineInstance instanceof Twig) {
			$engineInstance->setTheme ( $activeTheme, self::THEMES_FOLDER );
		} else {
			throw new ThemesException ( 'Template engine must be an instance of Twig for themes activation!' );
		}
	}
771528
public function setEmail($email)
    {
        $email = (string) $email;

        if ($this->exists() && $this->email !== $email) {
            $this->updated['email'] = true;
        }

        $this->email = $email;

        return $this;
    }
677752
public function set_template($template)
	{
		// make sure the template is a View
		if (is_string($template))
		{
			$this->template = $this->view($template);
		}
		else
		{
			$this->template = $template;
		}

		// return the template view for chaining
		return $this->template;
	}
637724
static function getEngine($template)
    {
        foreach (self::$engines as $pattern => $engine){
            if (fnmatch($pattern, $template)){
                if (is_string($engine)){
                    self::$engines[$pattern] = new $engine();
                }
                return self::$engines[$pattern];
            }
        }
        return null;
    }
818473
function load_engine()
    {
        if ($this->engine) {
            return $this->engine;
        }

        // load config/localization
        $this->load_env();

        return $this->engine = new enigma_engine($this);
    }
638229
public function setEngine($engine)
    {
        if (!$this->engine instanceof Edge) {
            throw new \InvalidArgumentException('Engine should be instance of Edge');
        }

        $this->engine = $engine;

        return $this;
    }
874612
public function searchEngine(EngineInterface $engine = null)
    {
        if ($engine !== null) {
            $this->_engine = $engine;
        }

        return $this->_engine;
    }
1054053
public function getEngine(string $engine) : Engine
    {
        if (!array_key_exists($engine, $this->engines)) {
            throw new \OutOfBoundsException(
                'Rendering Engine "' . $engine . '" does not exist in data'
            );
        }

        return $this->engines[$engine];
    }
139368
public function setEngine($name): bool
    {
        $this->loadTemplateEngines();
        if (isset($this->engines[$name])) {
            $this->current_engine = $this->engines[$name];
            Logger::log('Set the Template Engine to '.$name);

            return true;
        }
        throw new LayoutException('Could not set engine. Engine does not exist', 1);
    }
677947
public static function create($engine, $args = null)
    {
        $engine = strtolower($engine);
        if (self::validEngine($engine)) {
            return (isset($args)) ? self::createWithArgs($engine, $args) : self::createWithArgs($engine, array());
        }
        throw new \Franzip\SerpFetcher\Exceptions\UnsupportedEngineException('Invalid SerpFetcher $engine: unknown/unsupported Search Engine. Supported engines are: \'google\', \'ask\', \'bing\', \'yahoo\'');
    }
562460
function setEngine(Engine, config) {
    initialized = false;
    engine = new Engine(config);

    init(config);
  }