Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 public function run()
 {
     parent::run();
 }