コード例 #1
0
 public function execute()
 {
     $uriParts = $this->context->actionContext->get_uriParts();
     $this->setBaseUri($uriParts);
     $params = $this->context->request->get_params();
     $method = $this->context->request->get_httpMethod();
     $this->context->actionContext->controller = $this;
     $this->context->actionContext->action = "execute";
     try {
         $this->context->actionContext->action = "showMessage";
         $this->context->actionContext->args = new _hx_array(array());
         $this->context->actionContext->get_uriParts()->splice(0, 0);
         $wrappingRequired = null;
         $i = haxe_rtti_Meta::getFields(_hx_qtype("ufront.app.DefaultUfrontController"))->showMessage->wrapResult[0];
         $wrappingRequired = $i;
         $result = $this->wrapResult($this->showMessage(), $wrappingRequired);
         $this->setContextActionResultWhenFinished($result);
         return $result;
         throw new HException(ufront_web_HttpError::pageNotFound(_hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 442, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute"))));
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         return ufront_core_SurpriseTools::asSurpriseError($e, "Uncaught error while executing " . Std::string($this->context->actionContext->controller) . "." . _hx_string_or_null($this->context->actionContext->action) . "()", _hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 445, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute")));
     }
 }
コード例 #2
0
 public function call($path, $params)
 {
     if ($path->length < 2) {
         throw new HException("Invalid path '" . _hx_string_or_null($path->join(".")) . "'");
     }
     $inf = $this->objects->get($path[0]);
     if ($inf === null) {
         throw new HException("No such object " . _hx_string_or_null($path[0]));
     }
     $o = $inf->obj;
     $m = Reflect::field($o, $path[1]);
     if ($path->length > 2) {
         if (!$inf->rec) {
             throw new HException("Can't access " . _hx_string_or_null($path->join(".")));
         }
         $_g1 = 2;
         $_g = $path->length;
         while ($_g1 < $_g) {
             $i = $_g1++;
             $o = $m;
             $m = Reflect::field($o, $path[$i]);
             unset($i);
         }
     }
     if (!Reflect::isFunction($m)) {
         throw new HException("No such method " . _hx_string_or_null($path->join(".")));
     }
     return Reflect::callMethod($o, $m, $params);
 }
コード例 #3
0
 public function toString()
 {
     if ($this->prefix === "") {
         return $this->name;
     }
     return _hx_string_or_null($this->prefix) . "." . _hx_string_or_null($this->name);
 }
コード例 #4
0
 public function __construct($e)
 {
     if (!php_Boot::$skip_constructor) {
         parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 69, "className" => "system.base.NoSuchDbexception", "methodName" => "new")));
         system_base_Error::wipe(_hx_string_or_null($e) . ": " . "The database type you have requested is not available.");
     }
 }
コード例 #5
0
 static function toString($this1)
 {
     $years = $this1->getYears();
     $months = $this1->getMonths();
     $days = $this1->getDays();
     $hours = $this1->getHours();
     $minutes = $this1->getMinutes();
     $seconds = $this1->getSeconds();
     $parts = new _hx_array(array());
     if ($years !== 0) {
         $parts->push("" . _hx_string_rec($years, "") . "y");
     }
     if ($months !== 0) {
         $parts->push("" . _hx_string_rec($months, "") . "m");
     }
     if ($days !== 0) {
         $parts->push("" . _hx_string_rec($days, "") . "d");
     }
     if ($hours !== 0) {
         $parts->push("" . _hx_string_rec($hours, "") . "hrs");
     }
     if ($minutes !== 0) {
         $parts->push("" . _hx_string_rec($minutes, "") . "min");
     }
     if ($seconds !== 0) {
         $parts->push("" . _hx_string_rec($seconds, "") . "sec");
     }
     return _hx_string_or_null($this1->negative ? "-" : "") . "(" . _hx_string_or_null($parts->length === 0 ? "0sec" : $parts->join(", ")) . ")";
 }
コード例 #6
0
 static function formatMessage($m)
 {
     $type = null;
     $_g = $m->type;
     switch ($_g->index) {
         case 0:
             $type = "log";
             break;
         case 1:
             $type = "info";
             break;
         case 2:
             $type = "warn";
             break;
         case 3:
             $type = "error";
             break;
     }
     $extras = null;
     if (_hx_field($m, "pos") !== null && $m->pos->customParams !== null) {
         $extras = ", " . _hx_string_or_null($m->pos->customParams->join(", "));
     } else {
         $extras = "";
     }
     $msg = "" . _hx_string_or_null($m->pos->className) . "." . _hx_string_or_null($m->pos->methodName) . "(" . _hx_string_rec($m->pos->lineNumber, "") . "): " . Std::string($m->msg) . _hx_string_or_null($extras);
     return "console." . _hx_string_or_null($type) . "(decodeURIComponent(\"" . _hx_string_or_null(rawurlencode($msg)) . "\"))";
 }
コード例 #7
0
ファイル: Body.class.php プロジェクト: adrianmm44/zcale
 public function toString()
 {
     $html = "\n" . "<body>";
     $html .= _hx_string_or_null($this->content);
     $html .= "\n" . "</body>";
     return $html;
 }
コード例 #8
0
ファイル: Html.class.php プロジェクト: adrianmm44/zcale
 public function toString()
 {
     $html = "<!DOCTYPE html>";
     $html .= "\n" . "<html lang=\"" . "en" . "\">";
     $html .= _hx_string_or_null($this->head->toString());
     $_g = 0;
     $_g1 = $this->scripts;
     while ($_g < $_g1->length) {
         $script = $_g1[$_g];
         ++$_g;
         if ($script->path !== null) {
             $this->body->add("<script type=\"text/javascript\" src=\"" . _hx_string_or_null($script->path) . "\"></script>");
         } else {
             $this->body->add("<script type=\"text/javascript\">" . _hx_string_or_null($script->code) . "</script>");
         }
         unset($script);
     }
     if ($this->swfobjects->length > 0) {
         $this->body->add("<script type=\"text/javascript\" src=\"" . "/js" . "swfobject.js\"></script>");
         $this->body->add("<script type=\"text/javascript\">");
         $_g2 = 0;
         $_g11 = $this->swfobjects;
         while ($_g2 < $_g11->length) {
             $swfobject = $_g11[$_g2];
             ++$_g2;
             $this->body->add("\t" . "swfobject.embedSWF(\"" . _hx_string_or_null($swfobject->path) . "\", \"" . _hx_string_or_null($swfobject->id) . "\", \"" . _hx_string_or_null($swfobject->width) . "\", \"" . _hx_string_or_null($swfobject->height) . "\", \"" . "9" . "\", \"" . "/swf" . "expressInstall.swf\", " . _hx_string_or_null(haxe_Json::phpJsonEncode($swfobject->flashvars, null, null)) . " );");
             unset($swfobject);
         }
         $this->body->add("</script>");
     }
     $html .= _hx_string_or_null($this->body->toString());
     $html .= "\n" . "</html>";
     return $html;
 }
コード例 #9
0
ファイル: ServerBoot.class.php プロジェクト: adrianmm44/zcale
 public function init()
 {
     $this->completed = true;
     $params = zcale_core_path_targets_ServerPath::get_PARAMS();
     if ($params->exists("remoteData") === true) {
         $this->printHtml = false;
         $this->remoteCall($params->get("remoteData"));
     } else {
         if ($params->exists("run") === true) {
             $_g = $params->get("run");
             switch ($_g) {
                 case "js":
                     $this->index->target = 1;
                     $this->index->mainFilePath = "/js" . _hx_string_or_null($this->index->mainFilePath) . ".js";
                     break;
                 case "fl":
                     $this->index->target = 2;
                     $this->index->mainFilePath = "/swf" . _hx_string_or_null($this->index->mainFilePath) . ".swf";
                     break;
                 case "tt":
                     $this->index->target = 3;
                     break;
                 default:
                     $this->event->dispatch($this->eventKeys->complete);
                     break;
             }
         } else {
             $this->event->dispatch($this->eventKeys->complete);
         }
     }
     if ($this->printHtml === true) {
         Sys::hprint($this->index->toString());
     }
 }
コード例 #10
0
 public function readAll($bufsize = null)
 {
     if ($bufsize === null) {
         $bufsize = 8192;
     }
     $buf = haxe_io_Bytes::alloc($bufsize);
     $total = new haxe_io_BytesBuffer();
     try {
         while (true) {
             $len = $this->readBytes($buf, 0, $bufsize);
             if ($len === 0) {
                 throw new HException(haxe_io_Error::$Blocked);
             }
             if ($len < 0 || $len > $buf->length) {
                 throw new HException(haxe_io_Error::$OutsideBounds);
             }
             $total->b .= _hx_string_or_null(substr($buf->b, 0, $len));
             unset($len);
         }
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         if (($e = $_ex_) instanceof haxe_io_Eof) {
         } else {
             throw $__hx__e;
         }
     }
     return $total->getBytes();
 }
コード例 #11
0
 public function get_description()
 {
     $buf = new StringBuf();
     $buf->add($this->value);
     if ($this->expires !== null) {
         if (ufront_web_HttpCookie::$tzOffset === null) {
             ufront_web_HttpCookie::$tzOffset = intval(date('Z', $this->expires->__t));
         }
         $gmtExpires = Date::fromTime($this->expires->getTime() + ufront_web_HttpCookie::$tzOffset);
         $zeroPad = array(new _hx_lambda(array(&$buf, &$gmtExpires), "ufront_web_HttpCookie_0"), 'execute');
         $day = ufront_web_HttpCookie::$dayNames[$gmtExpires->getDay()];
         $date = call_user_func_array($zeroPad, array($gmtExpires->getDate()));
         $month = ufront_web_HttpCookie::$monthNames[$gmtExpires->getMonth()];
         $year = $gmtExpires->getFullYear();
         $hour = call_user_func_array($zeroPad, array($gmtExpires->getHours()));
         $minute = call_user_func_array($zeroPad, array($gmtExpires->getMinutes()));
         $second = call_user_func_array($zeroPad, array($gmtExpires->getSeconds()));
         $dateStr = "" . _hx_string_or_null($day) . ", " . _hx_string_or_null($date) . "-" . _hx_string_or_null($month) . "-" . _hx_string_rec($year, "") . " " . _hx_string_or_null($hour) . ":" . _hx_string_or_null($minute) . ":" . _hx_string_or_null($second) . " GMT";
         ufront_web_HttpCookie::addPair($buf, "expires", $dateStr, null);
     }
     ufront_web_HttpCookie::addPair($buf, "domain", $this->domain, null);
     ufront_web_HttpCookie::addPair($buf, "path", $this->path, null);
     if ($this->secure) {
         ufront_web_HttpCookie::addPair($buf, "secure", null, true);
     }
     return $buf->b;
 }
コード例 #12
0
ファイル: AgcApi.class.php プロジェクト: axelhuizinga/gem
 public function update_fields_x($param)
 {
     $state = $param->get("state");
     $lead_id = Std::parseInt($param->get("lead_id"));
     $agcResponse = S::$my->query("UPDATE vicidial_list SET state=\"" . _hx_string_or_null($state) . "\" WHERE lead_id=" . Std::string($lead_id), null);
     return $this->json_response(model_AgcApi_0($this, $agcResponse, $lead_id, $param, $state));
 }
コード例 #13
0
ファイル: Column.class.php プロジェクト: adrianmm44/zcale
 public function toString()
 {
     $str = _hx_string_or_null($this->table->toString()) . "." . _hx_string_or_null($this->name);
     if ($this->alias !== null) {
         $str .= " AS " . _hx_string_or_null($this->alias);
     }
     return $str;
 }
コード例 #14
0
ファイル: AgcApi.class.php プロジェクト: axelhuizinga/gem
 public function external_status($param)
 {
     $status = $param->get("dispo");
     $url = "http://xpress.mein-dialer.com/agc/api.php?source=flyCRM&user="******"&pass="******"&function=external_status&value=" . _hx_string_or_null($status) . "&agent_user="******"agent_user"));
     haxe_Log::trace($url, _hx_anonymous(array("fileName" => "AgcApi.hx", "lineNumber" => 71, "className" => "model.AgcApi", "methodName" => "external_status")));
     $agcResponse = haxe_Http::requestUrl($url);
     return $this->json_response(_hx_index_of($agcResponse, "SUCCESS", null) === 0 ? "OK" : $agcResponse);
 }
コード例 #15
0
	static function logFirePHP($message) {
		if(!property_exists("GLOBALS", "firephp")) {
			ob_start();
			require_once '/libFirePHPCore/FirePHP.class.php';
			$GLOBALS['firephp'] = FirePHP::getInstance(true);
		}
		$GLOBALS["firephp"]->log("[PHP] " . _hx_string_or_null($message));
	}
コード例 #16
0
 public function writeBytes($buf, $pos, $len)
 {
     if ($pos < 0 || $len < 0 || $pos + $len > $buf->length) {
         throw new HException(haxe_io_Error::$OutsideBounds);
     }
     $this->b->b .= _hx_string_or_null(substr($buf->b, $pos, $len));
     return $len;
 }
コード例 #17
0
 static function insert($this1, $table, $columns = null)
 {
     $str = "INSERT INTO " . Std::string($table);
     if ($columns !== null) {
         $str .= " (" . _hx_string_or_null(zcale_sys_db_SqlTools::joinColumns($columns)) . ")";
     }
     return $str;
 }
コード例 #18
0
ファイル: Boot.class.php プロジェクト: kostyll/ekode
function _hx_add($a, $b)
{
    if (!_hx_is_numeric($a) || !_hx_is_numeric($b)) {
        return _hx_string_or_null($a) . _hx_string_or_null($b);
    } else {
        return $a + $b;
    }
}
コード例 #19
0
 public function toString()
 {
     $ret = "Error: " . _hx_string_or_null($this->message);
     if (_hx_field($this, "pos") !== null) {
         $ret .= " " . _hx_string_or_null($this->printPos());
     }
     return $ret;
 }
コード例 #20
0
 public function __construct($dbname)
 {
     if (!php_Boot::$skip_constructor) {
         parent::__construct();
         $this->dbname = strtolower($dbname);
         $this->key = _hx_string_or_null($dbname) . ":decl_type";
     }
 }
コード例 #21
0
 public function __construct($message, $Http_Code = null, $info = null)
 {
     if (!php_Boot::$skip_constructor) {
         parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 41, "className" => "system.base.General_error", "methodName" => "new")));
         $message1 = null;
         $message1 = Std::string($message);
         haxe_Log::trace("DEPRECATED FUNCTION: " . _hx_string_or_null($message1), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 449, "className" => "system.base.Wet_base", "methodName" => "echo")));
     }
 }
コード例 #22
0
ファイル: Debug.class.php プロジェクト: axelhuizinga/gem
 static function _trace($v, $i = null)
 {
     $info = null;
     if ($i !== null) {
         $info = _hx_string_or_null($i->fileName) . ":" . _hx_string_or_null($i->methodName) . ":" . _hx_string_rec($i->lineNumber, "") . ":";
     } else {
         $info = "";
     }
     file_put_contents(me_cunity_php_Debug::$logFile, _hx_string_or_null($info) . ":" . _hx_string_or_null(Std::is($v, _hx_qtype("String")) || Std::is($v, _hx_qtype("Int")) || Std::is($v, _hx_qtype("Float")) ? $v : print_r($v, 1)) . "\n", FILE_APPEND);
 }
コード例 #23
0
ファイル: ServerPath.class.php プロジェクト: adrianmm44/zcale
 static function get_PARAMS_STRING()
 {
     if (zcale_core_path_targets_ServerPath::$paramsString === null) {
         zcale_core_path_targets_ServerPath::$paramsString = php_Web::getParamsString();
         if (strlen(zcale_core_path_targets_ServerPath::$paramsString) > 0) {
             zcale_core_path_targets_ServerPath::$paramsString = "?" . _hx_string_or_null(zcale_core_path_targets_ServerPath::$paramsString);
         }
     }
     return zcale_core_path_targets_ServerPath::$paramsString;
 }
コード例 #24
0
 static function formatMsg($m)
 {
     $extras = null;
     if (_hx_field($m, "pos") !== null && $m->pos->customParams !== null) {
         $extras = ", " . _hx_string_or_null($m->pos->customParams->join(", "));
     } else {
         $extras = "";
     }
     $type = _hx_substr(Type::enumConstructor($m->type), 1, null);
     return "" . _hx_string_or_null($type) . ": " . _hx_string_or_null($m->pos->className) . "." . _hx_string_or_null($m->pos->methodName) . "(" . _hx_string_rec($m->pos->lineNumber, "") . "): " . Std::string($m->msg) . _hx_string_or_null($extras);
 }
コード例 #25
0
 public function __construct($e, $sql = null)
 {
     if (!php_Boot::$skip_constructor) {
         parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 78, "className" => "system.base.BadSQLException", "methodName" => "new")));
         $strings = null;
         $strings = _hx_string_call($e, "split", array(";"));
         haxe_Log::trace(system_base_Sql_colour::pretify($sql), _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 81, "className" => "system.base.BadSQLException", "methodName" => "new")));
         haxe_Log::trace(system_base_Sql_colour::pretify($strings[0]), _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 82, "className" => "system.base.BadSQLException", "methodName" => "new")));
         system_base_Error::wipe("SQL said: " . _hx_string_or_null($strings[1]));
     }
 }
コード例 #26
0
 static function insertScriptsBeforeBodyTag($content, $scripts)
 {
     $script = $scripts->join("");
     $bodyCloseIndex = _hx_last_index_of($content, "</body>", null);
     if ($bodyCloseIndex === -1) {
         $content .= _hx_string_or_null($script);
     } else {
         $content = _hx_string_or_null(_hx_substring($content, 0, $bodyCloseIndex)) . _hx_string_or_null($script) . _hx_string_or_null(_hx_substr($content, $bodyCloseIndex, null));
     }
     return $content;
 }
コード例 #27
0
ファイル: Head.class.php プロジェクト: adrianmm44/zcale
 public function toString()
 {
     $html = "\n" . "<head>";
     if ($this->title !== null) {
         $html .= "\n\t" . "<title>" . _hx_string_or_null($this->title) . "</title>" . "\n";
     }
     $html .= "\n\t" . "<meta charset=\"" . "utf-8" . "\"/>";
     if (strlen($this->style) > 0) {
         $html .= "\n\n\t" . "<style type=\"text/css\">" . _hx_string_or_null($this->style) . "\n\t" . "</style>";
     }
     return _hx_string_or_null($html) . "\n" . "</head>";
 }
コード例 #28
0
 static function toOutcome($option, $pos = null)
 {
     switch ($option->index) {
         case 0:
             $value = _hx_deref($option)->params[0];
             return tink_core_Outcome::Success($value);
             break;
         case 1:
             return tink_core_Outcome::Failure(new tink_core_TypedError(404, "Some value expected but none found in " . _hx_string_or_null($pos->fileName) . "@line " . _hx_string_rec($pos->lineNumber, ""), _hx_anonymous(array("fileName" => "Outcome.hx", "lineNumber" => 37, "className" => "tink.core.OutcomeTools", "methodName" => "toOutcome"))));
             break;
     }
 }
コード例 #29
0
 public function toString()
 {
     $url = "/" . _hx_string_or_null($this->segments->join("/"));
     $qs = $this->queryString();
     if (strlen($qs) > 0) {
         $url .= "?" . _hx_string_or_null($qs);
     }
     if (null !== $this->fragment) {
         $url .= "#" . _hx_string_or_null($this->fragment);
     }
     return $url;
 }
コード例 #30
0
 public function toString()
 {
     if (!php_Boot::$skip_constructor) {
         if (!$this->updated) {
             return $this->value;
         }
         if (!$this->conflicted) {
             return _hx_string_or_null($this->lvalue) . "::" . _hx_string_or_null($this->rvalue);
         }
         return _hx_string_or_null($this->pvalue) . "||" . _hx_string_or_null($this->lvalue) . "::" . _hx_string_or_null($this->rvalue);
     }
 }