original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Retrieve the track engine
  
  @return \Gems_Tracker_Engine_TrackEngineInterface
docstring_tokens: Retrieve the track engine