sfContext::getController PHP Method

getController() public method

Retrieve the controller.
public getController ( ) : sfController
return sfController The current sfController implementation instance.
    public function getController()
    {
        return isset($this->factories['controller']) ? $this->factories['controller'] : null;
    }

Usage Example

コード例 #1
0
 /**
  * Initializes the cache manager.
  *
  * @param sfContext $context  Current application context
  * @param sfCache   $cache    An sfCache instance
  */
 public function initialize($context, sfCache $cache)
 {
     $this->context = $context;
     $this->dispatcher = $context->getEventDispatcher();
     $this->controller = $context->getController();
     // empty configuration
     $this->cacheConfig = array();
     // cache instance
     $this->cache = $cache;
     // routing instance
     $this->routing = $context->getRouting();
 }
All Usage Examples Of sfContext::getController