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


PHP Configuration类代码示例

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


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

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     $configuration = new Configuration();
     self::$selenium_test_page_path = $configuration->getSeleniumTestPagePath();
     self::$selenium_execution_context = new SeleniumExecutionContext("firefox", "file://" . self::$selenium_test_page_path, "jQuery");
     self::$selenium_driven_user = new SeleniumDrivenUser(self::$selenium_execution_context);
 }
开发者ID:xto,项目名称:SUTA,代码行数:7,代码来源:SeleniumDrivenUserExpectations.php

示例2: __construct

 /**
  * Constructor
  * 
  * Inits the appropriate endpoint and httpconnector objects 
  * Sets all of the Profiles class properties
  * 
  * @param \Beanstream\Configuration $config
  */
 function __construct(Configuration $config)
 {
     //init endpoint
     $this->_endpoint = new Endpoints($config->getPlatform(), $config->getApiVersion());
     //init http connector
     $this->_connector = new HttpConnector(base64_encode($config->getMerchantId() . ':' . $config->getApiKey()));
 }
开发者ID:walkthenight,项目名称:walkthenight-wordpress,代码行数:15,代码来源:Profiles.php

示例3: run

 public function run()
 {
     $config = new Configuration();
     $config->name = 'beer_of_the_day_modification_date';
     $config->value = Carbon::now()->format('Y-m-d');
     $config->save();
 }
开发者ID:hopshoppub,项目名称:hopshop.dev,代码行数:7,代码来源:ConfigTableSeeder.php

示例4: assertConfiguration

 protected function assertConfiguration(Configuration $config, $srcDir, array $cloverXml, $jsonPath, $excludeNoStatements = false)
 {
     $this->assertEquals($srcDir, $config->getSrcDir());
     $this->assertEquals($cloverXml, $config->getCloverXmlPaths());
     $this->assertEquals($jsonPath, $config->getJsonPath());
     $this->assertEquals($excludeNoStatements, $config->isExcludeNoStatements());
 }
开发者ID:Innovacionlechuga,项目名称:leaguewrap,代码行数:7,代码来源:ConfiguratorTest.php

示例5: reminderInvoker

 public static function reminderInvoker(Folder $folder)
 {
     $configuration = new Configuration();
     //parameter to know the max gap between last parsing done on the folder.
     $invokeMinutes = $configuration->getConfiguration(ConfigurationKeys::$reminderInvokeMinutes);
     //parameter to know the max gap between notifications
     $intervalMinutes = $configuration->getConfiguration(ConfigurationKeys::$reminderIntervalMinutes);
     $invokeMinutes = intval($invokeMinutes);
     $intervalMinutes = intval($intervalMinutes);
     $parsedSinceMinutes = self::getDatesDifferenceInMinutes($folder->getLastParsedOn(), date("Y-m-d H:i:s"));
     if ($parsedSinceMinutes > 0) {
         //OK we have some minutes passed with no parsing undertook
         if ($parsedSinceMinutes > $invokeMinutes) {
             //if reminder already sent, check interval and send again
             if ($folder->getLastRemindedOn() != null) {
                 $lastRemindedSince = self::getDatesDifferenceInMinutes($folder->getLastRemindedOn(), date("Y-m-d H:i:s"));
                 if ($lastRemindedSince > $intervalMinutes) {
                     self::sendNotification($folder);
                     FolderDataStore::getInstance()->updateLastReminderDate($folder->getSeq());
                 }
             } else {
                 self::sendNotification($folder);
                 FolderDataStore::getInstance()->updateLastReminderDate($folder->getSeq());
             }
         } else {
             //time still there to remind
         }
     }
 }
开发者ID:munishsethi777,项目名称:eliveui,代码行数:29,代码来源:ReminderMgr.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->opo_app_config = Configuration::load();
     $vs_external_app_config_path = $this->opo_app_config->get('external_applications');
     $this->opo_external_app_config = Configuration::load($vs_external_app_config_path);
 }
开发者ID:samrahman,项目名称:providence,代码行数:7,代码来源:BaseMediaPlugin.php

示例7: testSetOptionsWithValidOptions

 public function testSetOptionsWithValidOptions()
 {
     $key = 'steam-api-key';
     $options = array(Configuration::STEAM_KEY => $key);
     $this->configuration->setOptions($options);
     $this->assertEquals($key, $this->configuration->getSteamKey());
 }
开发者ID:m1105,项目名称:steam-api-php,代码行数:7,代码来源:ConfigurationTest.php

示例8: testGetInstanceWithWrongConfiguredParameterThrowsException

 public function testGetInstanceWithWrongConfiguredParameterThrowsException()
 {
     $this->setExpectedException('rg\\injektor\\InjectionException', 'Invalid argument without class typehint class: [rg\\injektor\\DICTestClassNoTypeHint] method: [__construct] argument: [two]');
     $config = new Configuration(null, '');
     $config->setClassConfig('rg\\injektor\\DICTestClassNoTypeHint', array('params' => array('one' => array('value' => 'foo'))));
     $dic = $this->getContainer($config);
     $dic->getInstanceOfClass('rg\\injektor\\DICTestClassNoTypeHint');
 }
开发者ID:mdio,项目名称:injektor,代码行数:8,代码来源:DependencyInjectionContainerNegativeTest.php

示例9: __construct

 public function __construct(Configuration $configuration, DatabaseVersion $dbVersion, DeltaDirectory $deltaDirectory)
 {
     $this->dbName = $configuration->dbName();
     $this->dbUsername = $configuration->dbUsername();
     $this->dbPassword = $configuration->dbPassword();
     $this->dbVersion = $dbVersion;
     $this->deltaDirectory = $deltaDirectory;
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:8,代码来源:MysqlAdmin.class.php

示例10: build

 public function build(Configuration $config)
 {
     $serviceConfig = $config->get(Configuration::SERVICE);
     $serviceClass = $this->getServiceClass($serviceConfig);
     $serverUrl = $this->extractParameter(AbstractServiceManager::SERVER_URL, $serviceConfig);
     $watchedServices = $this->getWatchedServices($serviceConfig);
     return new $serviceClass($serverUrl, $config->getConfigDir(), $watchedServices);
 }
开发者ID:kpacha,项目名称:config,代码行数:8,代码来源:ServiceManagerBuilder.php

示例11: testVerify

 /**
  * @covers Airbrake\Configuration::verify
  */
 public function testVerify()
 {
     $this->object->set('apiKey', null);
     try {
         $this->object->verify();
     } catch (\Exception $e) {
         $this->assertInstanceOf('Airbrake\\Exception', $e);
     }
 }
开发者ID:airbrake,项目名称:airbrake-php,代码行数:12,代码来源:ConfigurationTest.php

示例12: add

 public function add($key, $value, $ns = 'conf')
 {
     $config = new Configuration();
     $config->setKey($ns . ':' . $key);
     $config->setValue($value);
     $config->save();
     $this->confTab[$ns][$key] = $value;
     unset($_SESSION['configuration']);
 }
开发者ID:thib3113,项目名称:yana-server,代码行数:9,代码来源:Configuration.class.php

示例13: testNonDefaultValuesDefine

 public function testNonDefaultValuesDefine()
 {
     $name = uniqid('name');
     $realValue = uniqid('realValue');
     $default = uniqid('value');
     $config = new Configuration([$name => $realValue]);
     $config->define($name, $default);
     $expected = $realValue;
     $this->assertEquals(constant($name), $expected, 'The parameter is not defined properly with real value');
 }
开发者ID:tailored-tunes,项目名称:php-env-config,代码行数:10,代码来源:ConfigurationTest.php

示例14: testGetPassPhraseWithUsePasswordGetter

 /**
  * Test get pass phrase with use PasswordGetter system
  */
 public function testGetPassPhraseWithUsePasswordGetter()
 {
     $configuration = new Configuration('name', 'localhost', 80);
     $configuration->setUser('user');
     $passwordGetter = $this->getMockForAbstractClass('Deployer\\Server\\Password\\PasswordGetterInterface');
     $passwordGetter->expects($this->once())->method('getPassword')->with('localhost', 'user')->will($this->returnValue('some-pass-phrase'));
     $configuration->setPassPhrase($passwordGetter);
     $passPhrase = $configuration->getPassPhrase();
     $this->assertEquals('some-pass-phrase', $passPhrase, 'Pass phrases mismatch');
 }
开发者ID:acorncom,项目名称:deployer,代码行数:13,代码来源:ConfigurationTest.php

示例15: getTempDirectory

 /**
  * Returns a writable directory for temporary files
  *
  * @return String
  * @see Configuration::setTempDirectory()
  * @throws NoTempDirectoryException
  */
 public function getTempDirectory()
 {
     if (!is_null($this->configuration->getTempDirectory())) {
         return $this->configuration->getTempDirectory();
     }
     if (is_null($this->cachedTempDirectory)) {
         $this->cachedTempDirectory = $this->findTempDirectory();
     }
     return $this->cachedTempDirectory;
 }
开发者ID:bmdevel,项目名称:bav,代码行数:17,代码来源:FileUtil.php


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