static function get_ROOT_DIR() { if (zcale_core_path_targets_ServerPath::$rootDir === null) { zcale_core_path_targets_ServerPath::$rootDir = zcale_PathTools::removeEndDelimiter(Sys::getCwd(), null); } return zcale_core_path_targets_ServerPath::$rootDir; }
public function addScript($path, $code = null) { if ($code === null) { $code = ""; } $item = _hx_anonymous(array("path" => zcale_PathTools::removeFrontDelimiter($path, null), "code" => $code)); $this->scripts->push($item); return $this; }
public function boot($mainClass) { if ($this->completed === false) { $this->index = new zcale_server_html_views_HtmlIndex(); $this->index->mainFilePath = "/" . _hx_string_or_null(zcale_core_boot_targets_ServerBoot_0($this, $mainClass)); $this->index->set_title(zcale_PathTools::lastElement($this->index->mainFilePath, null)); $this->tracer = $this->index; $this->init(); } else { $this->event->dispatch($this->eventKeys->complete); } }
public function setIframesIndex() { $iframes = new zcale_server_html_views_Iframes(); $params = zcale_core_path_targets_ServerPath::get_PARAMS(); $params->remove("run"); $phpUrl = _hx_string_or_null(zcale_core_path_targets_ServerPath::get_ROOT_URL()) . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_RELATIVE()) . "?" . _hx_string_or_null(zcale_PathTools::paramsToString($params)); $jsUrl = _hx_string_or_null(zcale_core_path_targets_ServerPath::get_ROOT_URL()) . "?run=" . "js" . "&/#!" . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_RELATIVE()) . "?" . _hx_string_or_null(zcale_PathTools::paramsToString($params)); $flashUrl = _hx_string_or_null(zcale_core_path_targets_ServerPath::get_ROOT_URL()) . "?run=" . "fl" . "&/#!" . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_RELATIVE()) . "?" . _hx_string_or_null(zcale_PathTools::paramsToString($params)); $iframes->addIframe($phpUrl)->addIframe($jsUrl)->addIframe($flashUrl); $this->html->head->addStyle("html, body { height: 100%; }"); $this->html->body->add($iframes->toString()); }
function zcale_tests_PathTest_0() { $str = ""; $str .= "\n Path.DIR: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_DIR()); $str .= "\n Path.URL: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_URL()); $str .= "\n Path.ROOT_URL: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_ROOT_URL()); $str .= "\n Path.ROOT_DIR: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_ROOT_DIR()); $str .= "\n Path.FILE_DIR: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_FILE_DIR()); $str .= "\n Path.RELATIVE: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_RELATIVE()); $str .= "\n Path.PARAMS_STRING: " . _hx_string_or_null(zcale_core_path_targets_ServerPath::get_PARAMS_STRING()); $str .= "\n PathTools.paramsToString( Path.PARAMS ): " . _hx_string_or_null(zcale_PathTools::paramsToString(zcale_core_path_targets_ServerPath::get_PARAMS())); zcale_Core::trace($str); }
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); } }
static function splitPath($path, $delimiter = null) { if ($delimiter === null) { $delimiter = "/"; } $path = zcale_PathTools::removeFrontDelimiter($path, $delimiter); $path = zcale_PathTools::removeEndDelimiter($path, $delimiter); return _hx_explode($delimiter, $path); }
function zcale_core_web_ModuleLoader_0(&$__hx__this, &$_g, &$moduleSequence, &$path) { $str = null; $str1 = zcale_PathTools::lastElement($path, "."); $str = _hx_substr($str1, 0, 1); return _hx_deref(new EReg("^[A-Z]+\$", ""))->match($str); }