ManaPHP\Mvc\Model::save PHP Метод

save() публичный Метод

Creating a new robot $robot = new Robots(); $robot->type = 'mechanical'; $robot->name = 'Boy'; $robot->year = 1952; $robot->save(); Updating a robot name $robot = Robots::findFirst("id=100"); $robot->name = "Biomass"; $robot->save();
public save ( array $data = null, array $whiteList = null ) : void
$data array
$whiteList array
Результат void
    public function save($data = null, $whiteList = null)
    {
        if ($this->_exists()) {
            $this->update($data, $whiteList);
        } else {
            $this->create($data, $whiteList);
        }
    }