示例#1
0
文件: Widget.php 项目: cwcw/cms
 /**
  * Set the default event dispatcher class
  *
  * @param string $defaultEventDispatcherClass
  * @return void
  */
 public static function setDefaultEventDispatcherClass($defaultEventDispatcherClass)
 {
     if (!is_string($defaultEventDispatcherClass)) {
         return;
     }
     try {
         $r = new ReflectionClass($defaultEventDispatcherClass);
         if ($r->isSubclassOf('Streamwide_Event_Dispatcher_Interface') && $r->isInstantiable()) {
             self::$_defaultEventDispatcherClass = $defaultEventDispatcherClass;
         }
     } catch (Exception $e) {
     }
 }