public function getEngine($name = null) {
        if (is_null($name)) {
            $name = $this->getCurrentName();
        }
        if (array_key_exists($name, $this->engines)) {
            return $this->engines[$name];
        }
        if (!$this->hasConfig($name)) {
            throw new \InvalidArgumentException(
                sprintf(
                    __('%s DOES NOT HAVE CONFIG!')
                    , $name)
            );
        }
        $engine = $this->addEngine($name, $this->getConfig($name));
        $this->changeEngineEvent($engine);
        return $engine;
    }