public function __construct($app = null) { if (!is_object($this->app)) { if (is_object($app)) { $this->app = $app; } else { $this->app = mw(); } } $this->adapter_current = $this->adapter_default = new MicroweberTemplate($app); }