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