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