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