本文整理汇总了PHP中Std::parseInt方法的典型用法代码示例。如果您正苦于以下问题:PHP Std::parseInt方法的具体用法?PHP Std::parseInt怎么用?PHP Std::parseInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Std
的用法示例。
在下文中一共展示了Std::parseInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_fields_x
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));
}
示例2: edit
public function edit($param)
{
$fieldNames = new haxe_ds_StringMap();
$typeMap = new haxe_ds_StringMap();
$optionsMap = new haxe_ds_StringMap();
$eF = $this->getEditorFields(null);
$keys = $eF->keys();
$tableNames = new _hx_array(array());
$tableFields = new haxe_ds_StringMap();
while ($keys->hasNext()) {
$k = $keys->next();
haxe_Log::trace($k, _hx_anonymous(array("fileName" => "Clients.hx", "lineNumber" => 55, "className" => "model.Clients", "methodName" => "edit")));
$tableNames->push($k);
$aFields = $eF->get($k);
$cFields = $aFields->map(array(new _hx_lambda(array(&$aFields, &$eF, &$fieldNames, &$k, &$keys, &$optionsMap, &$param, &$tableFields, &$tableNames, &$typeMap), "model_Clients_0"), 'execute'));
$tableFields->set($k, $cFields);
$_g1 = 0;
$_g = $cFields->length;
while ($_g1 < $_g) {
$f = $_g1++;
$fieldNames->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_name"));
if (_hx_array_get($aFields, $f)->get("field_options") !== null) {
$optionsMap->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_options"));
}
$typeMap->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_type"));
unset($f);
}
unset($_g1, $_g);
unset($k, $cFields, $aFields);
}
$editTables = new haxe_ds_StringMap();
$ti = 0;
$_g2 = 0;
while ($_g2 < $tableNames->length) {
$table = $tableNames[$_g2];
++$_g2;
$p = new haxe_ds_StringMap();
$sb = new StringBuf();
$phValues = new _hx_array(array());
$p->set("primary_id", $param->get("primary_id"));
if ($table === "clients") {
$p->set("table", "vicidial_list");
$p->set("jointable", "fly_crm." . _hx_string_or_null($table));
$p->set("joincond", "ON vicidial_list.lead_id=fly_crm.clients.lead_id");
$p->set("fields", Std::string(_hx_string_call($param->get("fields"), "split", array(","))->map(array(new _hx_lambda(array(&$_g2, &$eF, &$editTables, &$fieldNames, &$keys, &$optionsMap, &$p, &$param, &$phValues, &$sb, &$table, &$tableFields, &$tableNames, &$ti, &$typeMap), "model_Clients_1"), 'execute'))->join(",")) . "," . _hx_string_or_null($tableFields->get($table)->map(array(new _hx_lambda(array(&$_g2, &$eF, &$editTables, &$fieldNames, &$keys, &$optionsMap, &$p, &$param, &$phValues, &$sb, &$table, &$tableFields, &$tableNames, &$ti, &$typeMap), "model_Clients_2"), 'execute'))->join(",")));
$p->set("where", "vicidial_list.lead_id|" . Std::string($param->get("lead_id")));
$editTables->set($table, php_Lib::hashOfAssociativeArray($this->doJoin($p, $sb, $phValues)));
} else {
$p->set("table", "fly_crm." . _hx_string_or_null($table));
$p->set("fields", $tableFields->get($table)->join(","));
$p->set("where", "client_id|" . Std::string($param->get("client_id")));
$editTables->set($table, php_Lib::hashOfAssociativeArray($this->doSelect($p, $sb, $phValues)));
}
haxe_Log::trace($p, _hx_anonymous(array("fileName" => "Clients.hx", "lineNumber" => 105, "className" => "model.Clients", "methodName" => "edit")));
unset($table, $sb, $phValues, $p);
}
$this->data = _hx_anonymous(array("fieldNames" => php_Lib::associativeArrayOfHash($fieldNames), "editData" => php_Lib::associativeArrayOfHash($editTables), "typeMap" => php_Lib::associativeArrayOfHash($typeMap), "optionsMap" => php_Lib::associativeArrayOfHash($optionsMap), "recordings" => $this->getRecordings(Std::parseInt($param->get("lead_id")))));
return $this->json_encode();
}
示例3: hpOfString
public function hpOfString($s)
{
$parts = _hx_explode(":", $s);
if ($parts->length === 2) {
return _hx_anonymous(array("host" => new sys_net_Host($parts[0]), "port" => Std::parseInt($parts[1])));
} else {
return _hx_anonymous(array("host" => new sys_net_Host(_hx_substr($parts[1], 2, null)), "port" => Std::parseInt($parts[2])));
}
}
示例4: extractVersion
static function extractVersion($searchString, $s)
{
$index = _hx_index_of($s, $searchString, null);
if ($index < 0) {
return null;
}
$re = new EReg("(\\d+)\\.(\\d+)[^ ();]*", "");
if (!$re->match(_hx_substr($s, $index + strlen($searchString) + 1, null))) {
return null;
}
return _hx_anonymous(array("version" => $re->matched(0), "majorVersion" => Std::parseInt($re->matched(1)), "minorVersion" => Std::parseInt($re->matched(2))));
}
示例5: addProxy
public function addProxy($h)
{
$conf = $this->getConfiguration();
$proxyEnabled = $conf->getProperty(com_wiris_plugin_api_ConfigurationKeys::$HTTPPROXY, "false");
if ($proxyEnabled === "true") {
$host = $conf->getProperty(com_wiris_plugin_api_ConfigurationKeys::$HTTPPROXY_HOST, null);
$port = Std::parseInt($conf->getProperty(com_wiris_plugin_api_ConfigurationKeys::$HTTPPROXY_PORT, "80"));
if ($host !== null && strlen($host) > 0) {
$user = $conf->getProperty(com_wiris_plugin_api_ConfigurationKeys::$HTTPPROXY_USER, null);
$pass = $conf->getProperty(com_wiris_plugin_api_ConfigurationKeys::$HTTPPROXY_PASS, null);
$h->setProxy(com_wiris_std_system_HttpProxy::newHttpProxy($host, $port, $user, $pass));
}
}
}
示例6: get_value
public function get_value()
{
$v = null;
if ($this->table->_values !== null) {
if (_hx_has_field($this->table->_values, $this->refName)) {
if ($this->isInt) {
$v = Std::parseInt(Reflect::field($this->table->_values, $this->refName));
} else {
if ($this->isFloat) {
$v = Std::parseFloat(Reflect::field($this->table->_values, $this->refName));
} else {
$v = Reflect::field($this->table->_values, $this->refName);
}
}
}
} else {
$v = $this->value;
}
return $v;
}
示例7: parse
static function parse($str)
{
$ylength = _hx_index_of($str, "-", null);
if ($ylength < 1 || strlen($str) - $ylength !== 6 && strlen($str) - $ylength !== 15) {
throw new HException("`" . _hx_string_or_null($str) . "` - incorrect date/time format. Should be either `YYYY-MM-DD hh:mm:ss` or `YYYY-MM-DD`");
}
if (strlen($str) - $ylength === 6) {
$str .= " 00:00:00";
}
$year = Std::parseInt(_hx_substr($str, 0, $ylength));
$month = Std::parseInt(_hx_substr($str, $ylength + 1, 2));
$day = Std::parseInt(_hx_substr($str, $ylength + 4, 2));
$hour = Std::parseInt(_hx_substr($str, $ylength + 7, 2));
$minute = Std::parseInt(_hx_substr($str, $ylength + 10, 2));
$second = Std::parseInt(_hx_substr($str, $ylength + 13, 2));
if ($year === null || $month === null || $day === null || $hour === null || $minute === null || $second === null) {
throw new HException("`" . _hx_string_or_null($str) . "` - incorrect date/time format. Should be either `YYYY-MM-DD hh:mm:ss` or `YYYY-MM-DD`");
}
$time = datetime_utils_DateTimeUtils::yearToStamp($year) + datetime_utils_DateTimeMonthUtils::toSeconds($month, _hx_mod($year, 4) === 0 ? datetime_utils_DateTimeUtils_0($day, $hour, $minute, $month, $second, $str, $year, $ylength) : false) + ($day - 1) * 86400 + $hour * 3600 + $minute * 60 + $second - 62135596800.0;
return $time + 62135596800.0;
}
示例8: save
public function save($q)
{
$lead_id = Std::parseInt($q->get("lead_id"));
$user = S::$user;
$log_id = false;
if ($log_id = $this->saveLog($q, null)) {
$cTable = "custom_" . Std::string($q->get("entry_list_id"));
haxe_Log::trace(_hx_string_or_null($cTable) . " log_id:" . Std::string($log_id), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 162, "className" => "model.QC", "methodName" => "save")));
$primary_id = S::$my->real_escape_string($q->get("primary_id"));
$sql = new StringBuf();
$sql->add("UPDATE " . _hx_string_or_null($cTable) . " SET ");
$cFields = S::tableFields("" . _hx_string_or_null($cTable), null);
haxe_Log::trace("" . _hx_string_or_null($cTable) . " fields:" . _hx_string_or_null($cFields->toString()), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 177, "className" => "model.QC", "methodName" => "save")));
$cFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$dbFieldTypes = php_Lib::hashOfAssociativeArray(php_Lib::associativeArrayOfObject(S::$conf->get("dbFieldTypes")));
$sets = new _hx_array(array());
$_g = 0;
while ($_g < $cFields->length) {
$c = $cFields[$_g];
++$_g;
$val = $q->get($c);
if ($val !== null) {
if (Std::is($val, _hx_qtype("String"))) {
$values2bind[$i++] = $val;
} else {
$values2bind[$i++] = $val[0];
}
$type = $dbFieldTypes->get($c);
if (Util::any2bool($type)) {
$bindTypes .= _hx_string_or_null($type);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c) . "=?");
unset($type);
}
unset($val, $c);
}
$sql->add($sets->join(","));
$sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, ""));
$stmt = S::$my->stmt_init();
haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 199, "className" => "model.QC", "methodName" => "save")));
$success = $stmt->prepare($sql->b);
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 203, "className" => "model.QC", "methodName" => "save")));
return false;
}
$success = myBindParam($stmt, $values2bind, $bindTypes);
haxe_Log::trace("success:" . Std::string($success), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 207, "className" => "model.QC", "methodName" => "save")));
if ($success) {
$success = $stmt->execute();
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 213, "className" => "model.QC", "methodName" => "save")));
return false;
}
$sql = new StringBuf();
$uFields = model_QC::$vicdial_list_fields;
$uFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$sql->add("UPDATE vicidial_list SET ");
$sets = new _hx_array(array());
$_g1 = 0;
while ($_g1 < $uFields->length) {
$c1 = $uFields[$_g1];
++$_g1;
$val1 = $q->get($c1);
if ($val1 !== null) {
if (Std::is($val1, _hx_qtype("String"))) {
$values2bind[$i++] = $val1;
} else {
$values2bind[$i++] = $val1[0];
}
$type1 = $dbFieldTypes->get($c1);
if (Util::any2bool($type1)) {
$bindTypes .= _hx_string_or_null($type1);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c1) . "=?");
unset($type1);
}
unset($val1, $c1);
}
$values2bind[$i++] = S::$user;
$bindTypes .= "s";
$sets->push("security_phrase=?");
$values2bind[$i++] = "XX";
$bindTypes .= "s";
$sets->push("state=?");
if (_hx_equal($q->get("status"), "QCOK") || _hx_equal($q->get("status"), "QCBAD")) {
$list_id = 10000;
if (_hx_equal($q->get("status"), "QCOK")) {
$mID = Std::parseInt($q->get("vendor_lead_code"));
if ($mID === null) {
$mID = S::newMemberID();
//.........这里部分代码省略.........
示例9: greek2Latin
static function greek2Latin($g)
{
$index = -1;
if ($g < 100) {
$index = _hx_index_of(com_wiris_util_xml_WCharacterBase::$greekLetters, "@00" . _hx_string_rec($g, "") . "@", null);
} else {
if ($g < 1000) {
$index = _hx_index_of(com_wiris_util_xml_WCharacterBase::$greekLetters, "@0" . _hx_string_rec($g, "") . "@", null);
} else {
$index = _hx_index_of(com_wiris_util_xml_WCharacterBase::$greekLetters, "@" . _hx_string_rec($g, "") . "@", null);
}
}
if ($index !== -1) {
$s = _hx_substr(com_wiris_util_xml_WCharacterBase::$latinLetters, $index + 1, 4);
return Std::parseInt($s);
}
return $g;
}
示例10: save
public function save($q)
{
$lead_id = Std::parseInt($q->get("lead_id"));
$res = S::$my->query("INSERT INTO vicidial_lead_log SELECT * FROM (SELECT NULL AS log_id," . _hx_string_rec($lead_id, "") . " AS lead_id,NOW() AS entry_date) AS ll JOIN (SELECT modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id FROM `vicidial_list`WHERE `lead_id`=" . _hx_string_rec($lead_id, "") . ")AS vl", null);
$log_id = S::$my->insert_id;
if ($log_id > 0) {
$cTable = "custom_" . Std::string($q->get("entry_list_id"));
haxe_Log::trace(_hx_string_or_null($cTable) . " log_id:" . _hx_string_rec($log_id, ""), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 110, "className" => "model.QC", "methodName" => "save")));
if ($this->checkOrCreateCustomTable($cTable, null)) {
$cLogTable = _hx_string_or_null($cTable) . "_log";
$res = S::$my->query("INSERT INTO " . _hx_string_or_null($cLogTable) . " SELECT * FROM (SELECT " . _hx_string_rec($log_id, "") . " AS log_id) AS ll JOIN (SELECT * FROM `" . _hx_string_or_null($cTable) . "`WHERE `lead_id`=" . _hx_string_rec($lead_id, "") . ")AS cl", null);
haxe_Log::trace("INSERT INTO " . _hx_string_or_null($cLogTable) . " ..." . _hx_string_or_null(S::$my->error) . "<", _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 117, "className" => "model.QC", "methodName" => "save")));
if (S::$my->error === "") {
$primary_id = S::$my->real_escape_string($q->get("primary_id"));
$sql = new StringBuf();
$sql->add("UPDATE " . _hx_string_or_null($cTable) . " SET ");
$cFields = S::tableFields("" . _hx_string_or_null($cTable), null);
haxe_Log::trace("" . _hx_string_or_null($cTable) . " fields:" . _hx_string_or_null($cFields->toString()), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 125, "className" => "model.QC", "methodName" => "save")));
$cFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$dbFieldTypes = php_Lib::hashOfAssociativeArray(php_Lib::associativeArrayOfObject(S::$conf->get("dbFieldTypes")));
$sets = new _hx_array(array());
$_g = 0;
while ($_g < $cFields->length) {
$c = $cFields[$_g];
++$_g;
$val = $q->get($c);
if ($val !== null) {
if (Std::is($val, _hx_qtype("String"))) {
$values2bind[$i++] = $val;
} else {
$values2bind[$i++] = $val[0];
}
$type = $dbFieldTypes->get($c);
if (Util::any2bool($type)) {
$bindTypes .= _hx_string_or_null($type);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c) . "=?");
unset($type);
}
unset($val, $c);
}
$sql->add($sets->join(","));
$sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, ""));
$stmt = S::$my->stmt_init();
haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 147, "className" => "model.QC", "methodName" => "save")));
$success = $stmt->prepare($sql->b);
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 151, "className" => "model.QC", "methodName" => "save")));
return false;
}
$success = myBindParam($stmt, $values2bind, $bindTypes);
haxe_Log::trace("success:" . Std::string($success), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 155, "className" => "model.QC", "methodName" => "save")));
if ($success) {
$success = $stmt->execute();
if (!$success) {
haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 161, "className" => "model.QC", "methodName" => "save")));
return false;
}
$sql = new StringBuf();
$uFields = model_QC::$vicdial_list_fields;
$uFields->remove($primary_id);
$bindTypes = "";
$values2bind = null;
$i = 0;
$sql->add("UPDATE vicidial_list SET ");
$sets = new _hx_array(array());
$_g1 = 0;
while ($_g1 < $uFields->length) {
$c1 = $uFields[$_g1];
++$_g1;
$val1 = $q->get($c1);
if ($val1 !== null) {
if (Std::is($val1, _hx_qtype("String"))) {
$values2bind[$i++] = $val1;
} else {
$values2bind[$i++] = $val1[0];
}
$type1 = $dbFieldTypes->get($c1);
if (Util::any2bool($type1)) {
$bindTypes .= _hx_string_or_null($type1);
} else {
$bindTypes .= "s";
}
$sets->push(_hx_string_or_null($c1) . "=?");
unset($type1);
}
unset($val1, $c1);
}
$values2bind[$i++] = S::$user;
$bindTypes .= "s";
$sets->push("security_phrase=?");
if (_hx_equal($q->get("status"), "MITGL")) {
$list_id = 10000;
$mID = Std::parseInt($q->get("vendor_lead_code"));
if ($mID === null) {
//.........这里部分代码省略.........
示例11: decodeString
public function decodeString()
{
$sb = new StringBuf();
$d = $this->c;
$this->nextToken();
while ($this->c !== $d) {
if ($this->c === 92) {
$this->nextToken();
if ($this->c === 110) {
$sb->add("\n");
} else {
if ($this->c === 114) {
$sb->add("\r");
} else {
if ($this->c === 34) {
$sb->add("\"");
} else {
if ($this->c === 39) {
$sb->add("'");
} else {
if ($this->c === 116) {
$sb->add("\t");
} else {
if ($this->c === 92) {
$sb->add("\\");
} else {
if ($this->c === 117) {
$this->nextToken();
$code = com_wiris_util_json_JSon_2($this, $d, $sb);
$this->nextToken();
$code .= com_wiris_util_json_JSon_3($this, $code, $d, $sb);
$this->nextToken();
$code .= com_wiris_util_json_JSon_4($this, $code, $d, $sb);
$this->nextToken();
$code .= com_wiris_util_json_JSon_5($this, $code, $d, $sb);
$dec = Std::parseInt("0x" . $code);
$sb->add(com_wiris_util_json_JSon_6($this, $code, $d, $dec, $sb));
unset($dec, $code);
} else {
throw new HException("Unknown scape sequence '\\" . com_wiris_util_json_JSon_7($this, $d, $sb) . "'");
}
}
}
}
}
}
}
} else {
$sb->add(com_wiris_util_json_JSon_8($this, $d, $sb));
}
$this->nextToken();
}
$this->nextToken();
return $sb->b;
}
示例12: php_Web_0
function php_Web_0(&$param, &$reg, &$res, $data)
{
if ($data === null || strlen($data) === 0) {
return;
}
$_g = 0;
$_g1 = _hx_explode("&", $data);
while ($_g < $_g1->length) {
$part = $_g1[$_g];
++$_g;
if ($reg->match($part)) {
$idx = $reg->matched(2);
$val = urldecode($reg->matched(4));
if ($idx === "") {
$res->push($val);
} else {
$res[Std::parseInt($idx)] = $val;
}
unset($val, $idx);
}
unset($part);
}
}
示例13: execute
//.........这里部分代码省略.........
$this->setContextActionResultWhenFinished($result7);
return $result7;
} else {
if (1 === $uriParts->length && $uriParts[0] === "clientip") {
$this->context->actionContext->action = "clientIP";
$this->context->actionContext->args = new _hx_array(array());
$this->context->actionContext->get_uriParts()->splice(0, 1);
$wrappingRequired8 = null;
$i8 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->clientIP->wrapResult[0];
$wrappingRequired8 = $i8;
$result8 = $this->wrapResult($this->clientIP(), $wrappingRequired8);
$this->setContextActionResultWhenFinished($result8);
return $result8;
} else {
if (1 <= $uriParts->length && $uriParts[0] === "uri") {
$this->context->actionContext->action = "uri";
$this->context->actionContext->args = new _hx_array(array());
$this->context->actionContext->get_uriParts()->splice(0, 1);
$wrappingRequired9 = null;
$i9 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->uri->wrapResult[0];
$wrappingRequired9 = $i9;
$result9 = $this->wrapResult($this->uri(), $wrappingRequired9);
$this->setContextActionResultWhenFinished($result9);
return $result9;
} else {
if (1 === $uriParts->length && $uriParts[0] === "httpmethod") {
$this->context->actionContext->action = "httpMethod";
$this->context->actionContext->args = new _hx_array(array());
$this->context->actionContext->get_uriParts()->splice(0, 1);
$wrappingRequired10 = null;
$i10 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->httpMethod->wrapResult[0];
$wrappingRequired10 = $i10;
$result10 = $this->wrapResult($this->httpMethod(), $wrappingRequired10);
$this->setContextActionResultWhenFinished($result10);
return $result10;
} else {
if (1 === $uriParts->length && $uriParts[0] === "scriptdirectory") {
$this->context->actionContext->action = "scriptDir";
$this->context->actionContext->args = new _hx_array(array());
$this->context->actionContext->get_uriParts()->splice(0, 1);
$wrappingRequired11 = null;
$i11 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->scriptDir->wrapResult[0];
$wrappingRequired11 = $i11;
$result11 = $this->wrapResult($this->scriptDir(), $wrappingRequired11);
$this->setContextActionResultWhenFinished($result11);
return $result11;
} else {
if (1 === $uriParts->length && $uriParts[0] === "authorization") {
$this->context->actionContext->action = "authorization";
$this->context->actionContext->args = new _hx_array(array());
$this->context->actionContext->get_uriParts()->splice(0, 1);
$wrappingRequired12 = null;
$i12 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->authorization->wrapResult[0];
$wrappingRequired12 = $i12;
$result12 = $this->wrapResult($this->authorization(), $wrappingRequired12);
$this->setContextActionResultWhenFinished($result12);
return $result12;
} else {
if (3 === $uriParts->length && $uriParts[0] === "testresponse" && strlen($uriParts[1]) > 0 && strlen($uriParts[2]) > 0) {
$status = Std::parseInt($uriParts[1]);
if ($status === null) {
throw new HException(testsite_Routes_0($this, $method, $params, $status, $uriParts));
}
$charset = $uriParts[2];
$_param_tmp_language = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "language");
$_param_tmp_contentType = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "contentType");
$_param_tmp_content = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "content");
$_param_tmp_cookieName = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "cookieName");
$_param_tmp_cookieVal = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "cookieVal");
$args = _hx_anonymous(array("language" => $_param_tmp_language, "contentType" => $_param_tmp_contentType, "content" => $_param_tmp_content, "cookieName" => $_param_tmp_cookieName, "cookieVal" => $_param_tmp_cookieVal));
$this->context->actionContext->action = "testResponse";
$this->context->actionContext->args = new _hx_array(array($status, $charset, $args));
$this->context->actionContext->get_uriParts()->splice(0, 3);
$wrappingRequired13 = null;
$i13 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->testResponse->wrapResult[0];
$wrappingRequired13 = $i13;
$result13 = $this->wrapResult($this->testResponse($status, $charset, $args), $wrappingRequired13);
$this->setContextActionResultWhenFinished($result13);
return $result13;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
throw new HException(ufront_web_HttpError::pageNotFound(_hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 442, "className" => "testsite.Routes", "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" => "testsite.Routes", "methodName" => "execute")));
}
}
示例14: decodeNumber
public function decodeNumber()
{
$sb = new StringBuf();
$hex = false;
$floating = false;
do {
$sb->add(com_wiris_util_json_JSon_0($this, $floating, $hex, $sb));
$this->nextToken();
if ($this->c === 120) {
$hex = true;
$sb->add(com_wiris_util_json_JSon_1($this, $floating, $hex, $sb));
$this->nextToken();
}
if ($this->c === 46 || $this->c === 69 || $this->c === 101) {
$floating = true;
}
} while ($this->c >= 48 && $this->c <= 58 || $hex && $this->isHexDigit($this->c) || $floating && ($this->c === 46 || $this->c === 69 || $this->c === 101 || $this->c === 45));
if ($floating) {
return Std::parseFloat($sb->b);
} else {
return Std::parseInt($sb->b);
}
}
示例15: makeConst
public function makeConst($v)
{
haxe_Template::$expr_trim->match($v);
$v = haxe_Template::$expr_trim->matched(1);
if (_hx_char_code_at($v, 0) === 34) {
$str = _hx_substr($v, 1, strlen($v) - 2);
return array(new _hx_lambda(array("str" => &$str, "v" => &$v), null, array(), "{\n\t\t\t\treturn \$str;\n\t\t\t}"), 'execute0');
}
if (haxe_Template::$expr_int->match($v)) {
$i = Std::parseInt($v);
return array(new _hx_lambda(array("i" => &$i, "str" => &$str, "v" => &$v), null, array(), "{\n\t\t\t\treturn \$i;\n\t\t\t}"), 'execute0');
}
if (haxe_Template::$expr_float->match($v)) {
$f = Std::parseFloat($v);
return array(new _hx_lambda(array("f" => &$f, "i" => &$i, "str" => &$str, "v" => &$v), null, array(), "{\n\t\t\t\treturn \$f;\n\t\t\t}"), 'execute0');
}
$me = $this;
return array(new _hx_lambda(array("f" => &$f, "i" => &$i, "me" => &$me, "str" => &$str, "v" => &$v), null, array(), "{\n\t\t\treturn \$me->resolve(\$v);\n\t\t}"), 'execute0');
}