当前位置: 首页>>代码示例>>PHP>>正文


PHP Std类代码示例

本文整理汇总了PHP中Std的典型用法代码示例。如果您正苦于以下问题:PHP Std类的具体用法?PHP Std怎么用?PHP Std使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Std类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 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")));
     }
 }
开发者ID:kevinresol,项目名称:mvc-platform-test,代码行数:25,代码来源:DefaultUfrontController.class.php

示例2: demo

 public function demo()
 {
     $this->cache->append("<html><head></head><body>");
     $pg = new system_base_Paginator("http://localhost:8888/?front/demo/", 200, 5);
     $pg->generate_links(_hx_anonymous(array("separator" => " ", "sideband_width" => 6)));
     haxe_Log::trace($pg->get_current_links(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 38, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     $this->cache->append("<img src='http://localhost:8888/?_load/sxy.jpg'> </img>");
     $this->route = system_application_controllers_Front_0($this, $pg);
     haxe_Log::trace("src=\"" . "http://localhost:8888/" . "?_load/" . "sxy.jpg" . "\"", _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 43, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     $rb = new system_base_Attributes("red bold", "test", null, null, null, null, null, null, null, null, null);
     haxe_Log::trace($rb->insert_attributes(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 46, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace("<a href=\"" . Std::string("http://" . "www.google.com") . "\"" . $rb->insert_attributes() . ">" . system_application_controllers_Front_1($this, $pg, $rb) . "</a>", _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 48, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace(system_base_Wet_base::$cache_path, _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 49, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace($_SERVER['SERVER_NAME'], _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 50, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace(system_base_Wet_base::get_file_etag(system_base_Wet_base::$views_path . "simple_view.wtv"), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 52, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace(system_base_Wet_base::get_file_etag(system_base_Wet_base::$views_path . "simple_view2.wtv"), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 53, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace(system_application_controllers_Front_2($this, $pg, $rb), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 54, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     haxe_Log::trace(system_application_controllers_Front_3($this, $pg, $rb), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 55, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     system_base_Wet_base::set_file_etag(system_base_Wet_base::$views_path . "simple_view2.wtv");
     haxe_Log::trace(haxe_Timer::stamp(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 57, "className" => "system.application.controllers.Front", "methodName" => "demo")));
     $this->cache->inject_style(".red {color:red}", null);
     $this->cache->inject_style(".bold", "font-weight: bold;");
     $this->cache->append("<span class='bold red'>This is a test run...</span>");
     $this->cache->append("This is a working copy" . Std::string($this->params));
     $this->cache->append("</body></html>");
 }
开发者ID:marcdraco,项目名称:Webrathea,代码行数:26,代码来源:Front.class.php

示例3: LoadModules

 public function LoadModules()
 {
     Std::Out();
     Std::Out('[Info] [Modules] Loading');
     Std::Out('[Info] [Modules] Available languages: ' . implode(', ', $this->GetAvailableLanguages(false)));
     $Modules = Config::Get('Modules');
     if (is_array($Modules)) {
         $Loaded = array();
         $Keys = array_keys($Modules);
         foreach ($Keys as $Key) {
             foreach ($Modules[$Key] as $Module) {
                 if (is_string($Module)) {
                     $Module = array($Module, $Module);
                 }
                 if (is_array($Module) && !empty($Module[0]) && !empty($Module[1])) {
                     $Name = strtolower($Module[0]);
                     $Loaded[$Key][$Name] = $this->LoadModule($Key, $Name, $Module[1]);
                 } else {
                     Std::Out('[Warning] [Modules] Config must be Key::Name or Key::[Name, AliasOf]');
                     Std::Out("{$Key}::", false);
                     Std::Out(var_export($Module, true));
                 }
             }
         }
         Std::Out('[Info] [Modules] Ready!');
         // ($N loaded modules)
         return $Loaded;
     }
     Std::Out('[Warning] [Modules] Config file is not an array');
     return false;
 }
开发者ID:RhuanGonzaga,项目名称:WhatsBot,代码行数:31,代码来源:ModuleManagerLoader.php

示例4: setTimeout

 public function setTimeout($timeout)
 {
     $s = Std::int($timeout);
     $ms = Std::int(($timeout - $s) * 1000000);
     $r = stream_set_timeout($this->__s, $s, $ms);
     sys_net_Socket::checkError($r, 0, "Unable to set timeout");
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:7,代码来源:Socket.class.php

示例5: hprint

 static function hprint($v)
 {
     $GLOBALS['%s']->push("php.Lib::print");
     $__hx__spos = $GLOBALS['%s']->length;
     echo Std::string($v);
     $GLOBALS['%s']->pop();
 }
开发者ID:ConfidantCommunications,项目名称:JoomlaHaxe,代码行数:7,代码来源:Lib.class.php

示例6: toString

 public function toString()
 {
     $str = "";
     if ($this->scheme !== null) {
         $str .= $this->scheme;
     }
     if ($this->opaque !== null) {
         $str .= $this->opaque;
     } else {
         if ($this->registry !== null) {
             $str .= $this->registry;
         } else {
             if ($this->host !== null) {
                 $str .= "//";
             }
             if ($this->userinfo !== null) {
                 $str .= $this->userinfo . "@";
             }
             if ($this->host !== null) {
                 $str .= $this->host;
             }
             if ($this->port !== null && ($this->scheme !== null && !_hx_equal($this->port, Reflect::field(sinatra_utils_URI::$SCHEME_DEFAULT_PORT, $this->scheme)))) {
                 $str .= ":" . Std::string($this->port);
             }
         }
         $str .= $this->path;
         if ($this->query !== null) {
             $str .= "?" . $this->query;
         }
     }
     if ($this->fragment !== null) {
         $str .= "#" . $this->fragment;
     }
     return $str;
 }
开发者ID:slaskis,项目名称:hxsinatra,代码行数:35,代码来源:URI.class.php

示例7: formatMessage

 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)) . "\"))";
 }
开发者ID:kevinresol,项目名称:mvc-platform-test,代码行数:27,代码来源:BrowserConsoleLogger.class.php

示例8: delete

 public function delete($whichEntries)
 {
     $iii = new _hx_array($whichEntries);
     $_g = 0;
     while ($_g < $iii->length) {
         $thisEntry = $iii[$_g];
         ++$_g;
         $db = JFactory::getDbo();
         $a = $db->quoteName("#__joomlahaxe");
         $query = $db->getQuery(true);
         $query->from($a);
         $query->delete();
         $query->where("id = " . Std::string($thisEntry));
         $db->setQuery($query);
         try {
             $db->execute();
         } catch (Exception $__hx__e) {
             $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
             $e = $_ex_;
             php_Lib::hprint($e);
             die;
             return false;
         }
         unset($thisEntry, $query, $e, $db, $a);
     }
     return true;
 }
开发者ID:ConfidantCommunications,项目名称:JoomlaHaxe,代码行数:27,代码来源:JoomlahaxeModelJoomlahaxes.class.php

示例9: toInt

 static function toInt($x)
 {
     if (($x >> 30 & 1) !== _hx_shift_right($x, 31)) {
         throw new HException("Overflow " . Std::string($x));
     }
     return $x & -1;
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:7,代码来源:Int32.class.php

示例10: Execute

 public function Execute(WhatsApp\Message $Message, array $Params = array())
 {
     if ($Message->Time >= $this->WhatsBot->GetStartTime()) {
         if ($this->IsEnabled() === self::ENABLED) {
             if (is_readable($this->XPath)) {
                 $LangSection = "{$this->Key}_{$this->AliasOf}";
                 $this->WhatsApp->SetLangSection($LangSection);
                 $Lang = new Lang($LangSection);
                 $ModuleManager = $this->ModuleManager;
                 $WhatsBot = $this->WhatsBot;
                 $WhatsApp = $this->WhatsApp;
                 extract($Params);
                 $Return = (include $this->XPath);
                 if ($Return !== 1) {
                     return $Return;
                 }
                 return self::EXECUTED;
             }
             Std::Out("[Warning] [Modules] Can't execute {$this->Key}::{$this->Name} ({$this->AliasOf}). {$this->PathExtension} file is not readable");
             return self::NOT_READABLE;
         }
         return self::NOT_ENABLED;
     }
     return self::EXECUTED;
 }
开发者ID:hasanalom,项目名称:WhatsBot,代码行数:25,代码来源:PHPModule.php

示例11: Execute

 public function Execute(WhatsApp\Message $Message, array $Params = array())
 {
     try {
         if ($Message->Time >= $this->WhatsBot->GetStartTime()) {
             if ($this->IsEnabled() === self::ENABLED) {
                 if (is_readable($this->XPath)) {
                     $LangSection = "{$this->Key}_{$this->AliasOf}";
                     $this->WhatsApp->SetLangSection($LangSection);
                     $this->Lua->LinkObject(new Lang($LangSection), true, true, true);
                     $this->Lua->AssignVariables($Params);
                     $this->Lua->LinkObject($Message, true, false, false);
                     $Return = $this->Lua->Include($this->XPath);
                     if ($Return === false) {
                         return INTERNAL_ERROR;
                     }
                     if ($Return === null) {
                         return self::EXECUTED;
                     }
                     return $Return;
                 }
                 Std::Out("[Warning] [Modules] (Lua) Can't execute {$this->Key}::{$this->Name} ({$this->AliasOf}). {$this->PathExtension} file is not readable");
                 return self::NOT_READABLE;
             }
             return self::NOT_ENABLED;
         }
         return self::EXECUTED;
     } catch (Exception $Exception) {
         Std::Out("[Warning] [Modules] (Lua) Can't execute {$this->Key}::{$this->Name} ({$this->AliasOf}). " . get_class($Exception) . 'thrown (' . $Exception->GetMessage() . ')');
         return INTERNAL_ERROR;
     }
 }
开发者ID:RhuanGonzaga,项目名称:WhatsBot,代码行数:31,代码来源:LuaModule.php

示例12: math2Img

 public function math2Img($str, $prop)
 {
     $img = "<img";
     $output = array();
     $prop["centerbaseline"] = "false";
     $prop["accessible"] = "true";
     $prop["metrics"] = "true";
     $src = $this->render->createImage($str, $prop, $output);
     $img .= " src=\"" . $src . "\"";
     $alt = com_wiris_system_PropertiesTools::getProperty($output, "alt", null);
     $width = com_wiris_system_PropertiesTools::getProperty($output, "width", null);
     $height = com_wiris_system_PropertiesTools::getProperty($output, "height", null);
     $baseline = com_wiris_system_PropertiesTools::getProperty($output, "baseline", null);
     $dpi = Std::parseFloat($this->plugin->getConfiguration()->getProperty(com_wiris_plugin_api_ConfigurationKeys::$WIRIS_DPI, "96"));
     $mml = $this->plugin->getConfiguration()->getProperty(com_wiris_plugin_api_ConfigurationKeys::$FILTER_OUTPUT_MATHML, "false") === "true";
     $f = 96 / $dpi;
     $dwidth = $f * Std::parseFloat($width);
     $dheight = $f * Std::parseFloat($height);
     $dbaseline = $f * Std::parseFloat($baseline);
     $alt = $this->html_entity_encode($alt);
     $img .= " class=\"Wirisformula\"";
     $img .= " alt=\"" . $alt . "\"";
     $img .= " width=\"" . _hx_string_rec($dwidth, "") . "\"";
     $img .= " height=\"" . _hx_string_rec($dheight, "") . "\"";
     $d = $dbaseline - $dheight;
     $img .= " style=\"vertical-align:" . _hx_string_rec($d, "") . "px\"";
     if ($mml) {
         $tag = $this->plugin->getConfiguration()->getProperty(com_wiris_plugin_api_ConfigurationKeys::$EDITOR_MATHML_ATTRIBUTE, "data-mathml");
         $img .= " " . $tag . "=\"" . $this->save_xml_encode($str) . "\"";
     }
     $img .= "/>";
     return $img;
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:33,代码来源:TextFilter.class.php

示例13: 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));
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:7,代码来源:AgcApi.class.php

示例14: asSurpriseTypedError

 static function asSurpriseTypedError($err, $msg = null, $p = null)
 {
     if ($msg === null) {
         $msg = "Failure: " . Std::string($err);
     }
     return tink_core__Future_Future_Impl_::sync(tink_core_Outcome::Failure(ufront_web_HttpError::wrap($err, $msg, $p)));
 }
开发者ID:kevinresol,项目名称:mvc-platform-test,代码行数:7,代码来源:SurpriseTools.class.php

示例15: ufError

 public function ufError($msg, $pos = null)
 {
     if ($this->context !== null) {
         $this->context->messages->push(_hx_anonymous(array("msg" => $msg, "pos" => $pos, "type" => ufront_log_MessageType::$MError)));
     } else {
         haxe_Log::trace("Error: " . Std::string($msg), $pos);
     }
 }
开发者ID:kevinresol,项目名称:mvc-platform-test,代码行数:8,代码来源:Controller.class.php


注:本文中的Std类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。