本文整理汇总了PHP中Lookup::index_factors方法的典型用法代码示例。如果您正苦于以下问题:PHP Lookup::index_factors方法的具体用法?PHP Lookup::index_factors怎么用?PHP Lookup::index_factors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lookup
的用法示例。
在下文中一共展示了Lookup::index_factors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
/**
* Process content into an index and save it
*
* @since 1.1
*
* @return void Description...
**/
function save ($content) {
if (empty($this->product) || empty($this->type) || empty($content))
return false;
$factoring = Lookup::index_factors();
if (isset($factoring[$this->type])) $this->factor = $factoring[$this->type];
else $this->factor = 1;
$this->terms = apply_filters('ecart_index_content',$content);
parent::save();
}
示例2: save
/**
* Process content into an index and save it
*
* @author Jonathan Davis
* @since 1.1
*
* @param string $content The content to index
* @return void
**/
function save()
{
list($content, ) = func_get_args();
$content = apply_filters('shopp_index_content', $content, $this);
if (empty($this->product) || empty($this->type) || empty($content)) {
return false;
}
$factoring = Lookup::index_factors();
if (isset($factoring[$this->type])) {
$this->factor = $factoring[$this->type];
} else {
$this->factor = 1;
}
$this->terms = $content;
parent::save();
}