Smutty_Object
|
+--Smutty_Model_Transaction
public class Smutty_Model_Transaction
extends Smutty_Object
| Field Summary | |
|---|---|
| mixed | any errors found */ |
| mixed | the transactions models */ |
| Constructor Summary | |
|---|---|
constructor |
|
| Method Summary | |
|---|---|
| nothing | add(Smutty_Model model) adds a model to the transaction |
| array | returns any errors found when trying to save the transaction |
| boolean | isValid() checks if all the models in the transaction are valid |
| boolean | save() checks all the models in the transaction for validity before saving them. |
public mixed $errors
any errors found */
public mixed $models
the transactions models */
public Smutty_Model_Transaction()
constructor
public nothing add(Smutty_Model model)
adds a model to the transaction
public array getErrors()
returns any errors found when trying to save the transaction
public boolean isValid()
checks if all the models in the transaction are valid
public boolean save()
checks all the models in the transaction for validity before saving them.
this class allows models to be grouped together into a "transaction", which means you can deal with them as a single unit rather than saving/validating them all individually.
/