Пример #1
0
 /**
  * Converts link to URL.
  * @return string
  */
 public function __toString()
 {
     try {
         return (string) $this->component->link($this->destination, $this->params);
     } catch (\Throwable $e) {
     } catch (\Exception $e) {
     }
     if (isset($e)) {
         if (func_num_args()) {
             throw $e;
         }
         trigger_error("Exception in " . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
     }
 }
Пример #2
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     if ($presenter instanceof IPresenter) {
         $this->callStartup();
         if ($presenter->isAjax()) {
             foreach ($this->settings->getSnippets() as $snippet) {
                 $presenter->redrawControl($snippet);
             }
         }
     }
 }
Пример #3
0
 public function __construct(callable $factory)
 {
     parent::__construct();
     $this->factory = $factory;
 }