public function run() { $c = static::getModel(); //prepare data if ($c::GET() == null) { $obj = new $c(); $obj->save(); $this->data['obj'] = $obj; } else { $this->data['obj'] = $c::GET(); } $tmp = $c::toJSON(array($this->data['obj'])); $this->data['obj_json'] = $tmp[0]; //load View and render parent::run(); }
public function run() { parent::run(); }