當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。