Ejemplo n.º 1
0
 public function load($filePath)
 {
     if (Lambda::has(zcale_core_web_scriptLoader_targets_SystemScriptLoader::$loadedScripts, $filePath) === false) {
         $classPath = null;
         $s = zcale_PathTools::removeLastElement($filePath, null);
         $classPath = str_replace("/", ".", $s);
         $cls = Type::resolveClass($classPath);
         if (is_object($_t = Type::typeof($cls)) && !$_t instanceof Enum ? $_t !== ValueType::$TNull : $_t != ValueType::$TNull) {
             try {
                 Reflect::callMethod($cls, Reflect::field($cls, "main"), new _hx_array(array()));
             } catch (Exception $__hx__e) {
                 $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
                 $error = $_ex_;
             }
             zcale_core_web_scriptLoader_targets_SystemScriptLoader::$loadedScripts->push($filePath);
             $this->event->dispatch($this->eventKeys->complete);
         } else {
             $this->event->dispatchError($this->eventData, $this, "load", "Class not found: " . _hx_string_or_null($classPath));
         }
     } else {
         $this->event->dispatch($this->eventKeys->complete);
     }
 }