本文整理汇总了PHP中OX_Component::getFallbackHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP OX_Component::getFallbackHandler方法的具体用法?PHP OX_Component::getFallbackHandler怎么用?PHP OX_Component::getFallbackHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OX_Component
的用法示例。
在下文中一共展示了OX_Component::getFallbackHandler方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_getFallbackHandler
function test_getFallbackHandler()
{
$this->assertFalse(class_exists('Plugins_tests'));
$oHandler = OX_Component::getFallbackHandler('tests');
$this->assertIsA($oHandler, 'Plugins_tests');
$this->assertFalse($oHandler->enabled);
$this->assertEqual($oHandler->extension, 'tests');
}
示例2: array
$aBanner['height'] = '';
$aBanner['htmltemplate'] = '';
$aBanner['description'] = '';
$aBanner['comments'] = '';
$aBanner['contenttype'] = '';
$aBanner['adserver'] = '';
$aBanner['keyword'] = '';
$aBanner["weight"] = $pref['default_banner_weight'];
$aBanner['hardcoded_links'] = array();
$aBanner['hardcoded_targets'] = array();
}
if ($ext_bannertype) {
list($extension, $group, $plugin) = explode(':', $ext_bannertype);
$oComponent =& OX_Component::factory($extension, $group, $plugin);
if (!$oComponent) {
$oComponent = OX_Component::getFallbackHandler($extension);
}
$formDisabled = !$oComponent || !$oComponent->enabled;
}
if (!$ext_bannertype && $type && !in_array($type, array('sql', 'web', 'url', 'html', 'txt'))) {
list($extension, $group, $plugin) = explode('.', $type);
$oComponent =& OX_Component::factoryByComponentIdentifier($extension, $group, $plugin);
$formDisabled = !$oComponent || !$oComponent->enabled;
if ($oComponent) {
$ext_bannertype = $type;
$type = $oComponent->getStorageType();
} else {
$ext_bannertype = '';
$type = '';
}
}