Nette\Application\Application::getPresenter PHP Method

getPresenter() public method

Returns current presenter.
public getPresenter ( ) : Nette\Application\IPresenter
return Nette\Application\IPresenter
    public function getPresenter()
    {
        return $this->presenter;
    }

Usage Example

Example #1
0
 /**
  * @return \Nette\Application\IPresenter|\Nette\Application\UI\Presenter
  * @throws \Kdyby\Console\InvalidStateException
  */
 public function getPresenter()
 {
     if (!($presenter = $this->app->getPresenter())) {
         throw new Kdyby\Console\InvalidStateException("There is currently no presenter");
     }
     return $presenter;
 }
All Usage Examples Of Nette\Application\Application::getPresenter