Exemplo n.º 1
0
 /**
  * Save data model
  *
  * @return bool
  */
 public function save()
 {
     $storage = new Storage();
     $data = [];
     foreach ($this->getAttributes() as $name => $val) {
         $data[$name] = $val;
     }
     $storage->add($data);
     return true;
 }
Exemplo n.º 2
0
 public function actionList()
 {
     $storage = new Storage();
     return $this->render('list', ['data' => $storage->get()]);
 }