diff options
author | Chris Cornutt <enygma@phpdeveloper.org> | 2015-07-17 19:10:56 -0500 |
---|---|---|
committer | Chris Cornutt <enygma@phpdeveloper.org> | 2015-07-17 19:10:56 -0500 |
commit | 685a9c11689a43837618f6fd163835239ea50f1b (patch) | |
tree | 0bed7385d507fffa513e5bdf9b48316a086f771b | |
parent | 21b7f39e87fd6b46b97892db145aba0c5072f9b7 (diff) | |
download | gatekeeper-685a9c11689a43837618f6fd163835239ea50f1b.zip gatekeeper-685a9c11689a43837618f6fd163835239ea50f1b.tar.gz gatekeeper-685a9c11689a43837618f6fd163835239ea50f1b.tar.bz2 |
adding "save" method shortcut to the mysql base model
-rw-r--r-- | src/Psecio/Gatekeeper/Model/Mysql.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Psecio/Gatekeeper/Model/Mysql.php b/src/Psecio/Gatekeeper/Model/Mysql.php index 436ede1..a61ca23 100644 --- a/src/Psecio/Gatekeeper/Model/Mysql.php +++ b/src/Psecio/Gatekeeper/Model/Mysql.php @@ -94,4 +94,15 @@ class Mysql extends \Modler\Model parent::load($loadData, $enforceGuard); return true; } + + /** + * Save the current model instance (gets datasource and calls save) + * + * @return boolean Success/fail result of save + */ + public function save() + { + $ds = \Psecio\Gatekeeper\Gatekeeper::getDatasource(); + return $ds->save($this); + } }
\ No newline at end of file |