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


PHP lmbToolkit::merge方法代码示例

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


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

示例1: setUp

 function setUp()
 {
     lmbToolkit::save();
     $this->toolkit = lmbToolkit::merge(new lmbLogTools());
     $_SERVER['REQUEST_URI'] = null;
     $_SERVER['REQUEST_METHOD'] = null;
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbLogToolsTest.class.php

示例2: testWrite

 function testWrite()
 {
     lmbToolkit::merge(new lmbNetTools());
     lmbToolkit::instance()->setResponse(new lmbHttpResponseForLogTest());
     $writer = new lmbLogFirePHPWriter(new lmbUri('firePHP://localhost/?check_extension=0'));
     $writer->write(new lmbLogEntry(LOG_ERR, 'foo'));
     $headers = lmbToolkit::instance()->getResponse()->getHeaders();
     $this->assertPattern('/Error/', $headers[4]);
     $this->assertPattern('/foo/', $headers[4]);
 }
开发者ID:knevcher,项目名称:limb,代码行数:10,代码来源:lmbLogFirePHPWriterTest.class.php

示例3: setUp

 function setUp()
 {
     lmbToolkit::save();
     $this->toolkit = lmbToolkit::merge(new lmbConfTools());
     $this->application_configs_dir = lmb_var_dir() . '/app/settings';
     lmbFs::mkdir($this->application_configs_dir);
     $this->package_configs_dir = lmb_var_dir() . '/package/settings';
     lmbFs::mkdir($this->package_configs_dir);
     $tests_include_apth = $this->application_configs_dir . ';' . $this->package_configs_dir;
     $this->toolkit->setConfIncludePath($tests_include_apth);
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:11,代码来源:lmbConfToolsTest.class.php

示例4: testSetErrorLevelByDSN

 function testSetErrorLevelByDSN()
 {
     lmbToolkit::merge(new lmbNetTools());
     lmbToolkit::instance()->setResponse(new lmbHttpResponseForLogTest());
     $writer = new lmbLogFirePHPWriter(new lmbUri('firePHP://localhost/?check_extension=0&level=' . LOG_WARNING));
     $result = $writer->write(new lmbLogEntry(LOG_ERR, 'foo'));
     $result = $writer->write(new lmbLogEntry(LOG_NOTICE, 'foonotice'));
     $headers = lmbToolkit::instance()->getResponse()->getHeaders();
     $this->assertPattern('/Error/', $headers[4]);
     $this->assertPattern('/foo/', $headers[4]);
     $this->assertNoPattern('/Notice/', $headers[4]);
     $this->assertNoPattern('/foonotice/', $headers[4]);
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:13,代码来源:lmbLogFirePHPWriterTest.class.php

示例5: testAddVersionToUrl_Safe

 function testAddVersionToUrl_Safe()
 {
     $toolkit = lmbToolkit::merge(new lmbWebAppTools());
     lmb_env_set('LIMB_DOCUMENT_ROOT', null);
     try {
         $url = $toolkit->addVersionToUrl('js/main.js', true);
         $this->assertEqual($url, 'js/main.js?00');
         $this->assertTrue(true);
     } catch (lmbException $e) {
         $this->assertTrue(false);
     }
     lmb_env_set('LIMB_DOCUMENT_ROOT', lmb_env_get('LIMB_VAR_DIR') . '/www');
     lmbFs::rm(lmb_env_get('LIMB_DOCUMENT_ROOT') . '/js/main.js');
     try {
         $url = $toolkit->addVersionToUrl('js/main.js', true);
         $this->assertEqual('js/main.js?00', $url);
         $this->assertTrue(true);
     } catch (lmbException $e) {
         $this->assertTrue(false);
     }
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:21,代码来源:lmbWebAppToolsTest.class.php

示例6: lmb_require

<?php

/*
 * Limb PHP Framework
 *
 * @link http://limb-project.com
 * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
 * @license    LGPL http://www.gnu.org/copyleft/lesser.html
 */
/**
 * @package cms
 * @version $Id: toolkit.inc.php 6598 2007-12-07 08:01:45Z pachanga $
 */
lmb_require('limb/toolkit/src/lmbToolkit.class.php');
lmb_require('limb/cms/src/toolkit/lmbCmsTools.class.php');
lmbToolkit::merge(new lmbCmsTools());
开发者ID:snowjobgit,项目名称:limb,代码行数:16,代码来源:toolkit.inc.php

示例7: lmb_require

<?php

/*
 * Limb PHP Framework
 *
 * @link http://limb-project.com
 * @copyright  Copyright &copy; 2004-2009 BIT(http://bit-creative.com)
 * @license    LGPL http://www.gnu.org/copyleft/lesser.html
 */
/**
 * @package active_record
 * @version $Id$
 */
lmb_require('limb/toolkit/src/lmbToolkit.class.php');
lmb_require('limb/active_record/src/toolkit/lmbARTools.class.php');
lmbToolkit::merge(new lmbARTools());
开发者ID:knevcher,项目名称:limb,代码行数:16,代码来源:toolkit.inc.php

示例8: testMergeSeveral

 function testMergeSeveral()
 {
     lmbToolkit::save();
     lmbToolkit::merge(new TestTools());
     $toolkit = lmbToolkit::save();
     $toolkit->commonMethod();
     $toolkit->commonMethod();
     $this->assertEqual($toolkit->getCommonMethodCalls(), 2);
     $toolkit = lmbToolkit::merge(new TestTools());
     $this->assertEqual($toolkit->getCommonMethodCalls(), 0);
     $toolkit = lmbToolkit::instance();
     $toolkit->commonMethod();
     $this->assertEqual($toolkit->getCommonMethodCalls(), 1);
     $toolkit = lmbToolkit::restore();
     $this->assertEqual($toolkit->getCommonMethodCalls(), 0);
     lmbToolkit::restore();
 }
开发者ID:knevcher,项目名称:limb,代码行数:17,代码来源:lmbToolkitTest.class.php

示例9: setUp

 function setUp()
 {
     lmbToolkit::save();
     $this->toolkit = lmbToolkit::merge(new lmbLogTools());
 }
开发者ID:knevcher,项目名称:limb,代码行数:5,代码来源:lmbLogToolsTest.class.php

示例10: lmb_require

<?php

/*
 * Limb PHP Framework
 *
 * @link http://limb-project.com
 * @copyright  Copyright &copy; 2004-2009 BIT(http://bit-creative.com)
 * @license    LGPL http://www.gnu.org/copyleft/lesser.html
 */
/**
 * @package fs
 * @version $Id$
 */
lmb_require('limb/toolkit/src/lmbToolkit.class.php');
lmb_require('limb/fs/src/lmbFsTools.class.php');
lmbToolkit::merge(new lmbFsTools());
开发者ID:anykey84,项目名称:YaBackup,代码行数:16,代码来源:toolkit.inc.php

示例11: setUp

 function setUp()
 {
     lmbToolkit::save();
     lmbToolkit::merge(new lmbProfileTools());
     $this->toolkit = lmbToolkit::instance();
 }
开发者ID:knevcher,项目名称:limb,代码行数:6,代码来源:lmbProfileToolsTest.class.php

示例12: testSaveAndRestoreToolsMethods

 function testSaveAndRestoreToolsMethods()
 {
     lmbToolkit::save();
     $toolkit = lmbToolkit::setup(new TestTools());
     $this->assertEqual($toolkit->commonMethod(), 'commonMethod1');
     lmbToolkit::save();
     lmbToolkit::merge(new TestTools2());
     $this->assertEqual($toolkit->commonMethod(), 'commonMethod2');
     lmbToolkit::restore();
     $this->assertEqual($toolkit->commonMethod(), 'commonMethod1');
     lmbToolkit::restore();
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:12,代码来源:lmbToolkitTest.class.php

示例13: getMember

        $this->member = $member;
    }
    function getMember()
    {
        return $this->member;
    }
    function setAcl($value)
    {
        $this->acl = $value;
    }
    function getAcl()
    {
        return $this->acl;
    }
}
lmbToolkit::merge(new FakeMemberAndAclTools());
class lmbAllowedTagTest extends lmbBaseMacroTest
{
    function setUp()
    {
        parent::setUp();
        $acl = new lmbAcl();
        $acl->addRole('boy');
        $acl->addRole('man');
        $acl->addResource('girl');
        $acl->allow('boy', 'girl', 'sex');
        $acl->allow('man', 'girl', 'marry');
        $acl->addResource('vodka');
        $acl->allow('man', 'vodka');
        lmbToolkit::instance()->setAcl($acl);
        $this->tags_dir = realpath(dirname(__FILE__) . '/../../../src/macro');
开发者ID:snowjobgit,项目名称:limb,代码行数:31,代码来源:lmbAllowedTagTest.class.php

示例14: testNoSuchController

 function testNoSuchController()
 {
     $this->filter->setDefaultControllerName($default_controller_name = '404');
     $dispatched_params = array('controller' => $exception_controller_name = 'no_such_controller' . time());
     $this->_setUpMocks($dispatched_params);
     $tools = new lmbRequestDispatchingFilterTestTools($exception_controller_name);
     $tools->setController($controller = new lmbRequestDispatchingTestingController($default_controller_name));
     $this->toolkit = lmbToolkit::merge($tools);
     $this->filter->run($this->chain);
     $this->_assertDispatchedOk($controller, 'display', __LINE__);
 }
开发者ID:knevcher,项目名称:limb,代码行数:11,代码来源:lmbRequestDispatchingFilterTest.class.php


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