本文整理匯總了PHP中BBCode::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP BBCode::__construct方法的具體用法?PHP BBCode::__construct怎麽用?PHP BBCode::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BBCode
的用法示例。
在下文中一共展示了BBCode::__construct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
/**
* Object Constructor
*
* @param
* @return void
* @since 1.0
*/
function __construct() {
parent::__construct ();
$this->defaults = new KunenaBBCodeLibrary;
$this->tag_rules = $this->defaults->default_tag_rules;
$this->smileys = $this->defaults->default_smileys;
if (empty($this->smileys)) $this->SetEnableSmileys(false);
$this->SetSmileyDir ( JPATH_ROOT .'/'. KPATH_COMPONENT_RELATIVE );
$this->SetSmileyURL ( JURI::root(true) . '/' . KPATH_COMPONENT_RELATIVE );
$this->SetDetectURLs ( true );
}
示例2: KunenaBbcodeLibrary
/**
* Object Constructor
*
* @return void
*/
function __construct($relative = true)
{
parent::__construct();
$this->defaults = new KunenaBbcodeLibrary();
$this->tag_rules = $this->defaults->default_tag_rules;
$view = JString::strtolower(JRequest::getCmd('type', JRequest::getCmd('view', '')));
$this->smileys = $this->defaults->default_smileys;
if (empty($this->smileys)) {
$this->SetEnableSmileys(false);
}
$this->SetSmileyDir(JPATH_ROOT);
$this->SetSmileyURL($relative ? JURI::root(true) : rtrim(JURI::root(), '/'));
$this->SetDetectURLs(true);
$this->SetURLPattern(array($this, 'parseUrl'));
$this->SetURLTarget('_blank');
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('kunena');
$dispatcher->trigger('onKunenaBbcodeConstruct', array($this));
}