rules as $rule ) if ( $rule->loadClass( (string) $class ) ) return TRUE; return FALSE; } /** * @param Rule\AutoLoadRuleInterface $rule * @return void */ public function addRule( Rule\AutoLoadRuleInterface $rule ) { $this->rules[] = $rule; } /** * remove this instance from the spl load stack */ public function unregister() { spl_autoload_unregister( array( $this, 'load' ) ); } }