diff options
author | Chris Cornutt <enygma@phpdeveloper.org> | 2015-06-12 16:49:31 -0500 |
---|---|---|
committer | Chris Cornutt <enygma@phpdeveloper.org> | 2015-06-12 16:49:31 -0500 |
commit | 137aaa9cdcae372c622d7875c7f159b9e977ebaf (patch) | |
tree | 4f1c4996ffc6a4c65fed5777c6705f87727b3874 /src | |
parent | 6234124bbd9088d577a0382474da48a1f2bada7b (diff) | |
download | gatekeeper-137aaa9cdcae372c622d7875c7f159b9e977ebaf.zip gatekeeper-137aaa9cdcae372c622d7875c7f159b9e977ebaf.tar.gz gatekeeper-137aaa9cdcae372c622d7875c7f159b9e977ebaf.tar.bz2 |
fixing calls to self:: and correcting call to modelFactory
Diffstat (limited to 'src')
-rw-r--r-- | src/Psecio/Gatekeeper/Handler/FindBy.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Psecio/Gatekeeper/Handler/FindBy.php b/src/Psecio/Gatekeeper/Handler/FindBy.php index 67fda5b..96296e5 100644 --- a/src/Psecio/Gatekeeper/Handler/FindBy.php +++ b/src/Psecio/Gatekeeper/Handler/FindBy.php @@ -1,6 +1,7 @@ <?php namespace Psecio\Gatekeeper\Handler; +use Psecio\Gatekeeper\Gatekeeper as g; class FindBy extends \Psecio\Gatekeeper\Handler { @@ -35,9 +36,9 @@ class FindBy extends \Psecio\Gatekeeper\Handler preg_match('/By(.+)/', $name, $matches); if (empty($matches) && strtolower(substr($name, -1)) === 's') { - return self::handleFindByMultiple($name, $args, $matches); + return $this->handleFindByMultiple($name, $args, $matches); } else { - return self::handleFindBySingle($name, $args, $matches); + return $this->handleFindBySingle($name, $args, $matches); } return $instance; @@ -88,7 +89,7 @@ class FindBy extends \Psecio\Gatekeeper\Handler if (!class_exists($collectionNs)) { throw new Exception\ModelNotFoundException('Collection type '.$model.' could not be found'); } - $model = self::modelFactory($model.'Model'); + $model = g::modelFactory($model.'Model'); $collection = new $collectionNs($this->getDb()); $collection = $this->getDb()->find($model, $data, true); |