Retrieve the track engine

@return \Gems_Tracker_Engine_TrackEngineInterface
185362
public function getTrackEngine()
    {
        static $engine;

        if ($engine instanceof \Gems_Tracker_Engine_TrackEngineInterface) {
            return $engine;
        }

        try {
            $respTrack = $this->getRespondentTrack();
            if ($respTrack instanceof \Gems_Tracker_RespondentTrack) {
                $engine = $respTrack->getTrackEngine();
            }

        } catch (\Exception $ex) {
        }

        if (! $engine instanceof \Gems_Tracker_Engine_TrackEngineInterface) {
            $trackId = $this->_getParam(\Gems_model::TRACK_ID);

            if (! $trackId) {
                if ($this->isMultiTracks()) {
                    throw new \Gems_Exception($this->_('No track engine specified!'));
                }

                $trackId = $this->escort->getTrackId();

                if (! $trackId) {
                    return null;
                }
            }

            $engine = $this->loader->getTracker()->getTrackEngine($trackId);
        }
        $engine->applyToMenuSource($this->menu->getParameterSource());

        return $engine;
    }
706776
private function getDebugLogger()
    {
        foreach ($this->processors as $processor) {
            if ($processor instanceof DebugLoggerInterface) {
                return $processor;
            }
        }

        foreach ($this->handlers as $handler) {
            if ($handler instanceof DebugLoggerInterface) {
                return $handler;
            }
        }
    }
1320062
public function analyticsResourcesAction()
    {
        $manager = $this->get('doctrine.orm.entity_manager');
        $wsCount = $this->workspaceManager->getNbWorkspaces();
        $resourceCount = $manager->getRepository('ClarolineCoreBundle:Resource\ResourceType')
            ->countResourcesByType();

        /** @var \Claroline\CoreBundle\Event\Analytics\PlatformContentItemEvent $event */
        $event = $this->get("claroline.event.event_dispatcher")->dispatch(
            'administration_analytics_platform_content_item_add',
            'Analytics\PlatformContentItem'
        );

        return array(
            'wsCount' => $wsCount,
            'resourceCount' => $resourceCount,
            'otherItems' => $event->getItems()
        );
    }
450760
protected function getViewTrackTitle()
    {
        $trackEngine = $this->getTrackEngine();

        if ($this->isMultiTracks()) {
            $respondent = $this->getRespondent();

            // Set params
            return sprintf(
                    $this->_('%s track assignments for respondent nr %s: %s'),
                    $trackEngine->getTrackName(),
                    $this->_getParam(\MUtil_Model::REQUEST_ID1),
                    $this->getRespondent()->getFullName()
                    );
        } else {
            return sprintf(
                    $this->_('%s track overview'),
                    $trackEngine->getTrackName()
                    );
        }
    }
73480
public function getEngine()
    {
        if (is_null($this->_engine)) {
            $template = new Template($this->engineOptions);
            $this->_engine = $template->initialize();
        }
        return $this->_engine;
    }
520285
public function getEngine($type)
    {
        $engine = false;

        if(isset($this->__engines[$type])) {
            $engine = $this->__engines[$type];
        }

        return $engine;
    }
209470
public function getToken()
    {
        static $token;

        if ($token instanceof \Gems_Tracker_Token) {
            return $token;
        }

        $token   = null;
        $tokenId = $this->getTokenId();

        if ($tokenId) {
            $token = $this->loader->getTracker()->getToken($tokenId);
        }
        if ($token && $token->exists) {
            // Set variables for the menu
            $token->applyToMenuSource($this->menu->getParameterSource());

            return $token;
        }

        throw new \Gems_Exception($this->_('No existing token specified!'));
    }
1032361
public function getResolver()
    {
        if (!$this->resolver) {
            $self = $this;

            $this->resolver = new EngineResolver();

            $this->resolver->register(
                'blade',
                function () use ($self) {
                    return $self->getCompiler();
                }
            );
        }

        return $this->resolver;
    }
591645
public function getEngine($new = false)
    {
        if (!$this->engine || $new) {
            $this->loader = null;
            $this->compiler = null;
            $this->cache = null;

            $edge = new Edge($this->getLoader(), $this->getCompiler(), $this->getCache());

            foreach (GlobalContainer::getExtensions() as $name => $extension) {
                $edge->addExtension($extension, $name);
            }

            foreach ($this->getExtensions() as $name => $extension) {
                $edge->addExtension($extension, $name);
            }

            foreach (GlobalContainer::getGlobals() as $key => $value) {
                $edge->addGlobal($key, $value);
            }

            $this->engine = $edge;
        }

        return $this->engine;
    }
451493
function(ext) {
      ext = ext || this.option('view engine');
      if (ext && ext[0] !== '.') {
        ext = '.' + ext;
      }
      return this._.engines.getEngine(ext);
    }
318866
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;
    }
1282254
public function getPath()
    {
        $controller = str_replace('\\', '/', $this->get('controller'));

        $path = (empty($controller) ? '' : $controller.'/').$this->get('name').'.'.$this->get('format').'.'.$this->get('engine');

        return empty($this->parameters['bundle']) ? 'views/'.$path : '@'.$this->get('bundle').'/Resources/views/'.$path;
    }
794079
public function getPanel() {
		$template = new FileTemplate();
		$template->registerFilter(new Engine);
		$template->registerHelperLoader('Nette\\Templating\\Helpers::loader');
		$template->setFile(__DIR__ . '/MailPanel.latte');
		$template->baseUrl = $this->request->getUrl()->getBaseUrl();
		$template->messages = $this->mailer->getMessages($this->messagesLimit);

		return (string) $template;
	}
558792
protected function getEngine()
    {
        Template::addPath(dirname(__DIR__).'/templates');
        $template = new Template();
        $template->addExtension(HtmlExtension::class);
        return $template->initialize();
    }
738682
static public function getEngine()
    {
        // Get instance if already created.
        $instanceName = "eZSearchPlugin_" . $GLOBALS["eZCurrentAccess"]["name"];
        if ( isset( $GLOBALS[$instanceName] ) )
        {
            return $GLOBALS[$instanceName];
        }

        $ini = eZINI::instance();

        $searchEngineString = 'ezsearch';
        if ( $ini->hasVariable( 'SearchSettings', 'SearchEngine' ) == true )
        {
            $searchEngineString = $ini->variable( 'SearchSettings', 'SearchEngine' );
        }

        $directoryList = array();
        if ( $ini->hasVariable( 'SearchSettings', 'ExtensionDirectories' ) )
        {
            $extensionDirectories = $ini->variable( 'SearchSettings', 'ExtensionDirectories' );
            if ( is_array( $extensionDirectories ) )
            {
                $directoryList = eZExtension::expandedPathList( $extensionDirectories, 'search/plugins' );
            }
        }

        $kernelDir = array( 'kernel/search/plugins' );
        $directoryList = array_merge( $kernelDir, $directoryList );

        foreach( $directoryList as $directory )
        {
            $searchEngineFile = implode( '/', array( $directory, strtolower( $searchEngineString ), strtolower( $searchEngineString ) ) ) . '.php';

            if ( file_exists( $searchEngineFile ) )
            {
                eZDebugSetting::writeDebug( 'kernel-search-ezsearch', 'Loading search engine from ' . $searchEngineFile, 'eZSearch::getEngine' );

                include_once( $searchEngineFile );
                $GLOBALS[$instanceName] = new $searchEngineString();
                return $GLOBALS[$instanceName];
            }
        }

        eZDebug::writeDebug( 'Unable to find the search engine:' . $searchEngineString, 'eZSearch' );
        eZDebug::writeDebug( 'Tried paths: ' . implode( ', ', $directoryList ), 'eZSearch' );
        return false;
    }
742771
public function getImporter()
    {
        return $this->loader->getImportLoader()->getImporter(
                $this->getRequest()->getControllerName(),
                $this->getModel()
                );
    }
296576
public function getSessionMachine()
	{
		if ($this->session_machine === null) {
			throw new RuntimeException('Session machine not ready ‒ '.__METHOD__.' called too soon.');
		}
		return $this->session_machine;
	}