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


PHP Console::create方法代码示例

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


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

示例1: __construct

 public function __construct($host, $port, $ttl)
 {
     $this->console = Console::create('cache');
     $this->ttl = $ttl;
     $this->mem = new Memcache();
     $this->mem->pconnect($host, $port);
     $this->console->log('Connecting:', $host . ':' . $port, '[ttl:' . $ttl . 's]');
 }
开发者ID:voltrue2,项目名称:pie,代码行数:8,代码来源:cache.class.php

示例2: setup

 public static function setup($domain, $prefix, $host, $port, $ttl)
 {
     self::$domain = $domain;
     self::$prefix = $prefix;
     self::$console = Console::create('session');
     self::$ttl = $ttl;
     self::$mem = new Memcache();
     self::$mem->pconnect($host, $port);
     self::$console->log('Connecting:', $host . ':' . $port, '[ttl:' . $ttl . 's]');
 }
开发者ID:voltrue2,项目名称:pie,代码行数:10,代码来源:session.class.php

示例3: __construct

 public function __construct($controllerPath, $cntName, $methodName, $params, $req, $res)
 {
     $this->name = $cntName;
     $this->method = $methodName;
     $this->params = $params;
     $this->reqMethod = $_SERVER['REQUEST_METHOD'];
     $this->request = $req;
     $this->response = $res;
     $this->console = Console::create('router/controllerhub');
     // start operation
     $this->init($controllerPath);
     $this->run();
 }
开发者ID:voltrue2,项目名称:pie,代码行数:13,代码来源:controllerhub.class.php

示例4: __construct

 public function __construct()
 {
     $this->console = Console::create('router');
     $this->reqHook = new Hook('request');
     $this->uri = $_SERVER['REQUEST_URI'];
     // make sure to get rid of query string
     $pos = strpos($this->uri, '?');
     if ($pos !== false) {
         $this->uri = substr($this->uri, 0, $pos);
     }
     // register exception handler
     ExceptionHandler::add('respondException', $this);
 }
开发者ID:voltrue2,项目名称:pie,代码行数:13,代码来源:router.class.php

示例5: __construct

 public function __construct($type, $host, $dbname, $user, $password, $dataName)
 {
     // logger
     $name = $type . '.' . $dbname . ':' . $dataName;
     $this->console = Console::create($name);
     // connect to db
     $connect = $type . ':';
     $connect .= 'host=' . $host . ';';
     $connect .= 'dbname=' . $dbname . ';';
     $connect .= 'charset=utf8';
     // use connection pooling
     $options = array(PDO::ATTR_PERSISTENT => true);
     $this->console->log('Connecting:', $type, $user . '@' . $host . '.' . $dbname, '[password:' . ($password ? 'true' : 'false') . ']');
     $this->cn = new PDO($connect, $user, $password, $options);
 }
开发者ID:voltrue2,项目名称:pie,代码行数:15,代码来源:sql.class.php

示例6: __construct

 public function __construct($dataName)
 {
     $this->dataName = $dataName;
     $this->console = Console::create($this->NAME . $dataName);
 }
开发者ID:voltrue2,项目名称:pie,代码行数:5,代码来源:model.class.php

示例7: __construct

 public function __construct($name)
 {
     $this->console = Console::create($name . '.hook');
 }
开发者ID:voltrue2,项目名称:pie,代码行数:4,代码来源:hook.class.php


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