Skip to content

Commit

Permalink
Made it possible to use short observer names with namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelmer Schreuder committed May 22, 2011
1 parent c9cb119 commit 38c28c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ public function observe($event)
{
if ( ! class_exists($observer))
{
$observer_class = 'Observer_'.$observer; // TODO: needs to work with namespaces
$observer_class = \Inflector::get_namespace($observer).'Observer_'.\Inflector::denamespace($observer);
if ( ! class_exists($observer_class))
{
throw new InvalidObserver($observer);
Expand Down

0 comments on commit 38c28c9

Please sign in to comment.