Permalink
Browse files

better Phixd event namespace

  • Loading branch information...
1 parent c51d062 commit d2139f704eb8599dbec6523cbcf5f59c195ec333 @cameronjacobson committed Dec 25, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 examples/events.php
  2. +2 −2 src/Phreezer/Storage.php
View
4 examples/events.php
@@ -22,11 +22,11 @@
'pass' => 'cameron'
]);
-Phixd::on('store.before', function($obj){
+Phixd::on('phreezer.store.before', function($obj){
echo 'BEFORE STORE: '.$obj->c.PHP_EOL;
});
-Phixd::on('fetch.after', function($obj){
+Phixd::on('phreezer.fetch.after', function($obj){
echo 'AFTER FETCH: '.$obj->b.PHP_EOL;
});
View
4 src/Phreezer/Storage.php
@@ -109,7 +109,7 @@ public function store($object)
throw Util::getInvalidArgumentException(1, 'object');
}
- Phixd::emit('store.before', [$object]);
+ Phixd::emit('phreezer.store.before', [$object]);
$this->doStore($this->freezer->freeze($object));
@@ -141,7 +141,7 @@ public function fetch($id)
// Put object into the object cache.
Cache::put($id, $object);
}
- Phixd::emit('fetch.after', [$object]);
+ Phixd::emit('phreezer.fetch.after', [$object]);
return $object;
}

0 comments on commit d2139f7

Please sign in to comment.