Beispiel #1
0
 public final function __construct(Nano_Dispatcher $dispatcher)
 {
     $this->dispatcher = $dispatcher;
     $this->helper = Nano::helper();
     $this->plugins = new SplObjectStorage();
     $this->plugins->addAll(Nano::config('plugins'));
 }
Beispiel #2
0
 public static function file($fileName, array $variables = array(), $throw = true)
 {
     if (!file_exists($fileName)) {
         if ($throw) {
             throw new Exception('View ' . $fileName . ' not exists');
         }
         return null;
     }
     extract($variables);
     $helper = Nano::helper();
     ob_start();
     include $fileName;
     $result = ob_get_contents();
     ob_end_clean();
     return $result;
 }
Beispiel #3
0
 protected function htmlField(Setting $setting, $name, $value)
 {
     return Nano::helper()->ui()->textareaField($name, $setting->title, $value, self::CSS, $setting->description);
 }
Beispiel #4
0
 public function captureEnd()
 {
     Nano::helper()->placeholder()->stop(self::PLACEHOLDER);
 }