本文整理汇总了PHP中eZINI::appendOverrideDir方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::appendOverrideDir方法的具体用法?PHP eZINI::appendOverrideDir怎么用?PHP eZINI::appendOverrideDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZINI
的用法示例。
在下文中一共展示了eZINI::appendOverrideDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testOverrideDirScopesSiteaccess
/**
* Test prepending siteaccess dirs
*/
public function testOverrideDirScopesSiteaccess()
{
$ini = new eZINI('site.ini', 'settings', null, null, true);
$ini->resetOverrideDirs();
$ini->prependOverrideDir("siteaccess/eng", false, 'siteaccess');
$ini->prependOverrideDir("extension/ext1/settings/siteaccess/eng", true);
$ini->appendOverrideDir("extension/ext3/settings/siteaccess/eng", true);
$ini->prependOverrideDir("siteaccess/nor", false, 'siteaccess');
// will override first dir
$overrideDirs = $ini->overrideDirs(false);
self::assertEquals(4, count($ini->overrideDirs()), 'There should have been three override dirs in total in this ini instance.');
self::assertEquals(3, count($overrideDirs['siteaccess']), 'There should have been two override dirs in siteaccess scope.');
self::assertTrue($overrideDirs['siteaccess'][0][1], "This override dir '" . $overrideDirs['siteaccess'][0][0] . "' should have been global(true)");
self::assertEquals("siteaccess/nor", $overrideDirs['siteaccess']['siteaccess'][0], "Siteaccess should have been overridden by identifier");
self::assertEquals("extension/ext3/settings/siteaccess/eng", $overrideDirs['siteaccess'][1][0]);
}