public function __construct(View $t) { error_log(__METHOD__); $this->t = $t; $this->g = $t->g; db::$tbl = self::TABLE; $this->in = util::esc($this->in); $this->b = $this->{$t->g->in['m']}(); }
public function __construct(View $t) { error_log(__METHOD__); util::acl($this->acl); $this->t = $t; $this->g = $t->g; $this->o = $t->g->in['o']; $this->in = util::esc($this->in); db::$tbl = $this->o; $this->b = $this->{$t->g->in['m']}(); // $this->b .= $this->{$t->g->in['m']}(); }
public function __construct($g) { error_log(__METHOD__); $this->g = $g; util::cfg($g); $g->in = util::esc($g->in); $g->in['l'] = util::ses('l', $g->in['l']); $g->in['o'] = util::ses('o', $g->in['o']); $g->in['t'] = util::ses('t', $g->in['t']); $theme = 'themes_' . $g->in['t'] . '_view'; $t = $this->t = class_exists($theme) ? new $theme($g) : new View($g); $m = new Model($t); // throwaway returned object foreach ($g->out as $k => $v) { $g->out[$k] = method_exists($t, $k) ? $t->{$k}() : $v; } }