本文整理汇总了PHP中SC::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP SC::exists方法的具体用法?PHP SC::exists怎么用?PHP SC::exists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC
的用法示例。
在下文中一共展示了SC::exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Locator
if (!$this->get('ad_network')) {
$this->set('ad_network', 'doubleclick');
}
try {
// this observer is brought to you by the letter "O"...
$o = $this->controller->getObserver();
// if we even have a request and an id...
$l = new Locator($o);
if ($o->exists('request') && $o->get('request')->exists('id')) {
$forum_id = intval($this->controller->getObserver()->get('request')->get('id'));
unset($o);
} else {
$forum_id = 0;
}
// see if we need to show something here...
if (SC::exists('board_config.ad_display_forums') && strlen(SC::get('board_config.ad_display_forums')) > 0) {
$params = explode(";", SC::get('board_config.ad_display_forums'));
foreach ($params as $id => $param) {
if (empty($param)) {
continue;
}
// throw away empty rows...
$section = substr($param, 0, strpos($param, "("));
// get the main section name...
if ($l->location == $section) {
// if we matched sections, get the sub-section directives, otherwise skip it...
$sub = array();
$matches = ereg('\\([^\\(\\)]*\\)', $param, $sub);
$ad_params = explode(",", str_replace(array('(', ')'), NULL, $sub[0]));
}
}