• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Configuration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: testGlobbingSupport

 public function testGlobbingSupport()
 {
     $basePath = getcwd() . DS;
     $configuration = new Configuration($this->fixture('phpunit-globbing.xml'));
     /** @var SuitePath[][] $suites */
     $suites = $configuration->getSuites();
     $this->assertEquals($basePath . 'test' . DS . 'fixtures' . DS . 'globbing-support-tests' . DS . 'some-dir', $suites["ParaTest Fixtures"][0]->getPath());
     $this->assertEquals($basePath . 'test' . DS . 'fixtures' . DS . 'globbing-support-tests' . DS . 'some-dir2', $suites["ParaTest Fixtures"][1]->getPath());
     return $suites;
 }
开发者ID:luispabon,项目名称:paratest,代码行数:10,代码来源:ConfigurationTest.php


示例17: set

 /**
  * @static
  * @param $name
  * @param $value
  * @return void
  */
 public static function set($name, $value = null)
 {
     $configuration = ConfigurationPeer::retrieveByName($name);
     if (!$configuration) {
         $configuration = new Configuration();
         $configuration->setName($name);
     }
     $configuration->setValue($value);
     $configuration->save();
 }
开发者ID:ratibus,项目名称:Crew,代码行数:16,代码来源:Configuration.php


示例18: getConnectionSettings

 function getConnectionSettings()
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/conf/configuration.class.php';
     $configuration = new Configuration();
     extract($configuration->getDatabaseConnectionSettings());
     $this->host = $host;
     $this->database = $database;
     $this->username = $username;
     $this->password = $password;
 }
开发者ID:richardhodgson,项目名称:rhodgson.co.uk,代码行数:10,代码来源:database.class.php


示例19: __construct

 /**
  * DataManager constructor.
  * @param Configuration $conf
  */
 function __construct(Configuration $conf)
 {
     $this->message = "";
     try {
         $data = new \PDO('mysql:host=' . $conf->getDbHost() . ';dbname=' . $conf->getDbName() . '', $conf->getDbUser(), $conf->getDbPass());
         $this->data_manager = new \FluentPDO($data);
         $this->data_manager->debug = false;
     } catch (\Exception $ex) {
         $this->message = "Database connection failed : " . $ex->getMessage();
     }
 }
开发者ID:aazhbd,项目名称:ArtWebCms,代码行数:15,代码来源:DataManager.php


示例20: localRelease

 protected function localRelease()
 {
     $configuration = new Configuration('wakka.config.php');
     $configuration->load();
     $release = Release::UNKNOW_RELEASE;
     if (isset($configuration['yeswiki_release'])) {
         $release = $configuration['yeswiki_release'];
     }
     $release = new Release($release);
     return $release;
 }
开发者ID:YesWiki,项目名称:yeswiki-extension-autoupdate,代码行数:11,代码来源:PackageCore.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ConfigurationKPI类代码示例发布时间:2022-05-20
下一篇:
PHP Configurador类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap