public function observe($class)
    {
        $className = is_string($class) ? $class : get_class($class);

        if (!class_exists($className)) {
            return;
        }

        foreach ($this->getObservableAbilities() as $ability) {
            if (method_exists($class, $ability)) {
                $this->registerAbility($ability, $className . '@' . $ability);
            }
        }
    }
public function observe($class)
    {
        $className = is_string($class) ? $class : get_class($class);

        if (!class_exists($className)) {
            return;
        }

        foreach ($this->getObservableAbilities() as $ability) {
            if (method_exists($class, $ability)) {
                $this->registerAbility($ability, $className . '@' . $ability);
            }
        }
    }
public function observe ( $ class ) { $ className = is_string ( $ class ) ? $ class : get_class ( $ class ) ; if ( ! class_exists ( $ className ) ) { return ; } foreach ( $ this -> getObservableAbilities ( ) as $ ability ) { if ( method_exists ( $ class , $ ability ) ) { $ this -> registerAbility ( $ ability , $ className . '@' . $ ability ) ; } } }
Register an observer with the Component.

@param $class
Register an observer with the Component .