本文整理匯總了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 = '';
}
}