Пример #1
0
 public function __construct()
 {
     if (Option::Get('cache-autostash')) {
         Stash::Set(Option::Get('cache-stash-name'), $this);
     }
     $this->LoadDrivers();
     return;
 }
Пример #2
0
 public function __Construct($opt = null)
 {
     /*//
     	handle object construction.
     	//*/
     $opt = new Nether\Object($opt, ['Theme' => Option::Get('surface-theme'), 'ThemeRoot' => Option::Get('surface-theme-root'), 'Style' => Option::Get('surface-theme-style'), 'AutoCapture' => Option::Get('surface-auto-capture'), 'AutoStash' => Option::Get('surface-auto-stash'), 'AutoRender' => Option::Get('surface-auto-render')]);
     $this->Storage['stdout'] = '';
     // pull in default settings.
     $this->AutoRender = php_sapi_name() === 'cli' ? false : $opt->AutoRender;
     $this->Theme = $opt->Theme;
     $this->ThemeRoot = $opt->ThemeRoot;
     $this->Style = $opt->Style;
     // if auto stashing is enabled.
     if (is_string($opt->AutoStash) && class_exists('Nether\\Stash')) {
         if (!Stash::Has($opt->AutoStash)) {
             Stash::Set($opt->AutoStash, $this);
         }
     }
     // begin capture if autocapture is enabled and this is not the
     // command line interface.
     if ($opt->AutoCapture && php_sapi_name() !== 'cli') {
         $this->Start();
     }
     return;
 }