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


PHP Q::changeIni方法代码示例

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


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

示例1: __construct

 function __construct()
 {
     $dsn = Q::ini('db_dsn_pool/default');
     if (empty($dsn)) {
         Q::changeIni('db_dsn_pool/default', Q::ini('db_dsn_mysql'));
     }
     parent::__construct();
 }
开发者ID:BGCX262,项目名称:zys-blog-svn-to-git,代码行数:8,代码来源:links.php

示例2: setUp

 protected function setUp()
 {
     $dsn = Q::ini('db_dsn_pool/default');
     if (empty($dsn)) {
         Q::changeIni('db_dsn_pool/default', Q::ini('db_dsn_mysql'));
     }
     $this->dbo = QDB::getConn();
     $this->dbo->connect();
 }
开发者ID:Debenson,项目名称:openwan,代码行数:9,代码来源:abstract.php

示例3: setUp

 protected function setUp()
 {
     $dsn = Q::ini('db_dsn_pool/default');
     if (empty($dsn)) {
         Q::changeIni('db_dsn_pool/default', Q::ini('db_dsn_mysql'));
     }
     $conn = QDB::getConn();
     $params = array('name' => 'posts', 'pk' => 'post_id', 'conn' => $conn);
     $this->table = new QDB_Table($params);
 }
开发者ID:Debenson,项目名称:openwan,代码行数:10,代码来源:table.php

示例4: setUp

 protected function setUp()
 {
     $rules = Helper_YAML::load(FIXTURE_DIR . '/mvc/routes.yaml');
     foreach ($rules as $route_name => $rule) {
         $index = 0;
         foreach ($rule['tests_url'] as $test) {
             $this->_tests_url["{$route_name}-{$index}"] = $test;
             $index++;
         }
         unset($rules[$route_name]['tests_url']);
         $index = 0;
         foreach ($rule['tests_args'] as $test) {
             $this->_tests_args["{$route_name}:{$index}"] = $test;
             $index++;
         }
         unset($rules[$route_name]['tests_args']);
     }
     Q::changeIni('routes', $rules);
 }
开发者ID:Debenson,项目名称:openwan,代码行数:19,代码来源:router.php

示例5: testChangeAndReadMultiValues

 /**
  * 修改和读取多个值
  */
 function testChangeAndReadMultiValues($path = 'test-multi-values')
 {
     $values = array('value', 1234, -333, 3.54, true, 'key1' => 'value');
     Q::changeIni($path, $values);
     $this->assertEquals($values, Q::ini($path), "Q::ini('{$path}') multi values");
 }
开发者ID:Debenson,项目名称:openwan,代码行数:9,代码来源:config.php

示例6: date_default_timezone_set

<?php

// $Id: ut_common.php 2252 2009-02-17 14:31:24Z dualface $
/**
 * 单元测试公用初始化文件
 */
date_default_timezone_set('Asia/Shanghai');
error_reporting(E_ALL | E_STRICT);
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/TestSuite.php';
require dirname(__FILE__) . '/../../library/q.php';
Q::changeIni('runtime_cache_dir', dirname(__FILE__) . '/../../tmp');
Q::changeIni('log_writer_dir', dirname(__FILE__) . '/../../tmp');
define('FIXTURE_DIR', dirname(dirname(__FILE__)) . DS . 'fixture');
/**
 * 载入数据库连接信息
 */
$dsn_pool = Helper_YAML::load(FIXTURE_DIR . '/database.yaml');
Q::replaceIni('db_dsn_pool', $dsn_pool);
PHPUnit_Util_Filter::addDirectoryToFilter(dirname(dirname(__FILE__)));
abstract class QTest_UnitTest_Abstract extends PHPUnit_Framework_TestCase
{
    protected function assertEmpty($var, $msg = '')
    {
        $this->assertTrue(empty($var), $msg);
    }
    protected function assertNotEmpty($var, $msg = '')
    {
        $this->assertTrue(!empty($var), $msg);
    }
}
开发者ID:Debenson,项目名称:openwan,代码行数:31,代码来源:ut_common.php

示例7: dirname

<?php

/**
 * 创建开发者手册
 */
require dirname(__FILE__) . '/../library/q.php';
$dir = dirname(__FILE__);
Q::import($dir);
Q::import($dir . '/command');
Q::import($dir . '/command/book');
Q::import($dir . '/_vendor/zf');
Q::changeIni('vendor_dir', dirname(__FILE__) . DS . '_vendor');
if (!isset($argv[2])) {
    echo <<<EOT

php gen_book.php <source_dir> <output_dir> [mode]

syntax:
    mode: "online", "offline" or "chm", online is default



EOT;
    exit(-1);
}
$source_dir = $argv[1];
$output_dir = $argv[2];
if (isset($argv[3])) {
    $mode = strtolower(trim($argv[3]));
} else {
    $mode = 'online';
开发者ID:Debenson,项目名称:openwan,代码行数:31,代码来源:gen_book.php


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