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


PHP Zend_Application::bootstrap方法代码示例

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


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

示例1: qsBootstrap

 public function qsBootstrap()
 {
     $this->application->bootstrap();
     $bootstrap = $this->application->getBootstrap();
     $frontController = $bootstrap->getResource('FrontController');
     $frontController->setParam('bootstrap', $bootstrap);
     $configApplication = $this->application->bootstrap('config');
     $requestConfig = $configApplication->getOption('request');
     $this->requestParameterName = $requestConfig['parameter'];
 }
开发者ID:rukzuk,项目名称:rukzuk,代码行数:10,代码来源:ControllerTestCase.php

示例2: _before

 public function _before(\Codeception\TestCase $test)
 {
     $this->bootstrap = new \Zend_Application($this->config['env'], getcwd() . DIRECTORY_SEPARATOR . $this->config['config']);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
     $db = $this->bootstrap->getBootstrap()->getResource('db');
     if ($db instanceof \Zend_Db_Adapter_Abstract) {
         $this->db = $db;
         $this->db->getProfiler()->setEnabled(true);
         $this->db->getProfiler()->clear();
     }
 }
开发者ID:BatVane,项目名称:Codeception,代码行数:12,代码来源:ZF1.php

示例3: setUp

 public function setUp()
 {
     $application = new Zend_Application('testing', APPLICATION_PATH . '/configs/application.ini');
     $bootstrap = $application->bootstrap()->getBootstrap();
     $this->em = $bootstrap->getResource('entityManager');
     parent::setUp();
 }
开发者ID:JernejKorosec,项目名称:z2d2,代码行数:7,代码来源:ModelTestCase.php

示例4: testBootstrap

 public function testBootstrap()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application.ini');
     $rediska = $application->bootstrap()->getBootstrap()->getResource('rediska');
     $this->assertType('Rediska', $rediska);
     $this->assertEquals('Rediska_Test_', $rediska->getOption('namespace'));
 }
开发者ID:grenzr,项目名称:sfRediskaPlugin,代码行数:7,代码来源:Resource.php

示例5: testBootstrap

 public function testBootstrap()
 {
     $application = new Zend_Application('tests', REDISKA_TESTS_PATH . '/Test/Zend/Application/application.ini');
     $rediska = $application->bootstrap()->getBootstrap()->getResource('rediska');
     $this->assertType('Rediska', $rediska);
     $this->assertEquals('Rediska_Test_', $rediska->getOption('namespace'));
 }
开发者ID:utachkin,项目名称:Rediska,代码行数:7,代码来源:Resource.php

示例6: setUpBeforeClass

 /**
  * Prepares the environment before running ALL tests.
  */
 public static function setUpBeforeClass()
 {
     // Inicializa o ZF
     $inifile = getenv('TRAVIS') !== false ? 'application.travis.ini' : 'application.ini';
     $bootstrap = new Zend_Application('testing', TEST_ROOT . '/assets/application/configs/' . $inifile);
     $bootstrap->bootstrap();
 }
开发者ID:realejo,项目名称:library-zf1,代码行数:10,代码来源:BaseTestCase.php

示例7: setUp

 /**
  * Overwrite standard setUp method, no database connection needed.  Will
  * create a file listing of class files instead.
  *
  * @return void
  */
 public function setUp()
 {
     require_once 'Zend/Application.php';
     set_include_path('../modules' . PATH_SEPARATOR . get_include_path());
     // Do test environment initializiation.
     $application = new Zend_Application(APPLICATION_ENV, array("config" => array(APPLICATION_PATH . '/application/configs/application.ini', APPLICATION_PATH . '/tests/config.ini')));
     $application->bootstrap();
 }
开发者ID:belapp,项目名称:opus4-application,代码行数:14,代码来源:RequireTest.php

示例8: testNewInstance

 public function testNewInstance()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application4.ini');
     $application->bootstrap()->getBootstrap()->getResource('session');
     $rediska = Zend_Session::getSaveHandler()->getRediska();
     $this->assertEquals('default', $rediska->getOption('name'));
     $this->assertEquals(array(), Rediska_Manager::getAll());
 }
开发者ID:r-kovalenko,项目名称:Rediska,代码行数:8,代码来源:ResourceTest.php

示例9: testCleanWithNoIdsToClean

 public function testCleanWithNoIdsToClean()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application5.ini');
     /* @var Zend_Cache_Manager $manager */
     $manager = $application->bootstrap()->getBootstrap()->getResource('cachemanager');
     $actual = $manager->getCache('test')->clean(Zend_Cache::CLEANING_MODE_ALL);
     $this->assertFalse($actual);
 }
开发者ID:r-kovalenko,项目名称:Rediska,代码行数:8,代码来源:ResourceTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $app = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . "/configs/application.ini");
     $app->bootstrap('translate');
     $this->translate = $app->getBootstrap()->getResource('translate');
     $this->translate->setLocale(new Zend_Locale('vi_VN'));
 }
开发者ID:hungtrinh,项目名称:ProfileManager,代码行数:8,代码来源:VietnameseTest.php

示例11: _before

 public function _before(\Codeception\TestCase $test)
 {
     // Create application, bootstrap, and run
     $this->bootstrap = new \Engine_Application(array('environment' => APPLICATION_ENV, 'bootstrap' => array('path' => APPLICATION_PATH_COR . DS . 'modules' . DS . APPLICATION_NAME . DS . 'Bootstrap.php', 'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap'), 'autoloaderNamespaces' => array('Zend' => APPLICATION_PATH_LIB . DS . 'Zend', 'Engine' => APPLICATION_PATH_LIB . DS . 'Engine', 'Facebook' => APPLICATION_PATH_LIB . DS . 'Facebook', 'Bootstrap' => APPLICATION_PATH_BTS, 'Plugin' => APPLICATION_PATH_PLU, 'Widget' => APPLICATION_PATH_WID)));
     \Zend_Session::$_unitTestEnabled = true;
     \Engine_Application::setInstance($this->bootstrap);
     \Engine_Api::getInstance()->setApplication($this->bootstrap);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
 }
开发者ID:BatVane,项目名称:Codeception,代码行数:10,代码来源:SocialEngine.php

示例12: testNewInstance

 public function testNewInstance()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application4.ini');
     $manager = $application->bootstrap()->getBootstrap()->getResource('cachemanager');
     $manager->getCache('test')->save('1', 'test');
     $rediska = new Rediska(array('redisVersion' => '2.0', 'addToManager' => false));
     $one = $rediska->get('test');
     $this->assertEquals('1', $one[0]);
     $this->assertEquals(array(), Rediska_Manager::getAll());
 }
开发者ID:J3FF3,项目名称:Rediska,代码行数:10,代码来源:ResourceTest.php

示例13: testDefaultAndAnother

 public function testDefaultAndAnother()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application4.ini');
     $application->bootstrap()->getBootstrap()->getResource('rediska');
     $default = Rediska_Manager::get('default');
     $this->assertEquals('defaultInstance', $default->getOption('namespace'));
     $another = Rediska_Manager::get('another');
     $this->assertEquals('anotherInstance', $another->getOption('namespace'));
     $this->assertEquals(2, count(Rediska_Manager::getAll()));
     $this->assertEquals($default, Zend_Registry::get('rediska'));
 }
开发者ID:r-kovalenko,项目名称:Rediska,代码行数:11,代码来源:ResourceTest.php

示例14: bootstrap

 public static function bootstrap()
 {
     // Define path to application directory
     defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
     // Define application environment
     defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing');
     !defined('UPLOAD_PATH') ? define('UPLOAD_PATH', realpath(dirname(__FILE__) . '/../public/upload')) : null;
     defined('HTTP_PATH') || define('HTTP_PATH', realpath(dirname(__FILE__)) . '/../public');
     require_once 'Zend/Application.php';
     $application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
     $application->bootstrap();
 }
开发者ID:KasaiDot,项目名称:FansubCMS,代码行数:12,代码来源:Bootstrap.php

示例15: _before

 public function _before(\Codeception\TestCase $test)
 {
     \Zend_Session::$_unitTestEnabled = true;
     $this->bootstrap = new \Zend_Application($this->config['env'], Configuration::projectDir() . $this->config['config']);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
     $db = $this->bootstrap->getBootstrap()->getResource('db');
     if ($db instanceof \Zend_Db_Adapter_Abstract) {
         $this->db = $db;
         $this->db->getProfiler()->setEnabled(true);
         $this->db->getProfiler()->clear();
     }
 }
开发者ID:gargallo,项目名称:tfs-test,代码行数:13,代码来源:ZF1.php


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