save() public method
Saves the current record. This method will call insert() when $isNewRecord is true, or update() when $isNewRecord is false. For example, to save a customer record: $customer = new Customer; // or $customer = Customer::findOne($id);
$customer->name = $name;
$customer->email = $email;
$customer->save();
public boolean save ( $runValidation = true, $attributeNames = null )$runValidation boolean
Whether to perform validation (calling validate()) before saving t