本文整理汇总了PHP中Tinebase_Config::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Config::get方法的具体用法?PHP Tinebase_Config::get怎么用?PHP Tinebase_Config::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Config
的用法示例。
在下文中一共展示了Tinebase_Config::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetDeleteConfig
/**
* test basic config getting/setting/deleting cycle
*/
public function testSetDeleteConfig()
{
$this->_instance->set(Tinebase_Config::PAGETITLEPOSTFIX, 'phpunit');
$this->assertEquals('phpunit', $this->_instance->{Tinebase_Config::PAGETITLEPOSTFIX}, 'could not set config');
$this->_instance->delete(Tinebase_Config::PAGETITLEPOSTFIX, 'phpunit');
$this->assertEquals('###PHPUNIT-NOTSET###', $this->_instance->get(Tinebase_Config::PAGETITLEPOSTFIX, '###PHPUNIT-NOTSET###'), 'config got not deleted');
$this->assertFalse(isset($this->_instance->{Tinebase_Config::PAGETITLEPOSTFIX}), '__isset not working');
}
示例2: testReturnEmptyValue
/**
* test if config returns empty array if it's empty
*/
public function testReturnEmptyValue()
{
// Hold original value for further tests of sieve.
$keepOriginalValue = $this->_instance->get("sieve");
// Ensure sieve key is null
$this->_instance->set("sieve", null);
// If key is null it throws an exception, so return empty array if it's null.
$this->assertTrue($this->_instance->get("sieve") instanceof Tinebase_Config_Struct);
// Check common function of the getFunction
$this->assertTrue(is_numeric($this->_instance->get("acceptedTermsVersion")));
// restore value
$this->_instance->set("sieve", $keepOriginalValue);
}