Lookup hierarchy for component specified by class or interface name.
public lookup ( $type, $need = TRUE ) : Nette\ComponentModel\IComponent | ||
return | Nette\ComponentModel\IComponent |
/** * Start download of the file! * @param IDownloader $downloader */ function download(IDownloader $downloader = null) { $this->downloader = $downloader; // Call sendResponse on presenter (used since 2.0 instead of terminate) if ($this->parent instanceof Presenter) { $presenter = $this->parent; } else { $presenter = $this->parent->lookup("Nette/Application/UI/Presenter", true); } $presenter->sendResponse($this); }