本文整理汇总了PHP中Base::Save方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::Save方法的具体用法?PHP Base::Save怎么用?PHP Base::Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::Save方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Save
function Save()
{
global $zbp;
if ($this->Template == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
$this->Data['Template'] = '';
}
return parent::Save();
}
示例2: RegPage_CreateCode
function RegPage_CreateCode($n)
{
global $zbp;
for ($i = 0; $i < 100; $i++) {
$r = new Base($GLOBALS['RegPage_Table'], $GLOBALS['RegPage_DataInfo']);
$r->InviteCode = GetGuid();
$r->Level = $zbp->Config('RegPage')->default_level;
$r->Save();
}
}
示例3: Save
function Save()
{
global $zbp;
if ($this->Template == $zbp->option['ZC_INDEX_DEFAULT_TEMPLATE']) {
$this->data['Template'] = '';
}
foreach ($GLOBALS['Filter_Plugin_Tag_Save'] as $fpname => &$fpsignal) {
$fpreturn = $fpname($this);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
return parent::Save();
}
示例4: Save
/**
* @return bool
*/
public function Save()
{
global $zbp;
if ($this->Type == ZC_POST_TYPE_ARTICLE) {
if ($this->Template == GetValueInArray($this->Category->GetData(), 'LogTemplate')) {
$this->data['Template'] = '';
}
}
if ($this->Template == $zbp->GetPostType_Template($this->Type)) {
$this->data['Template'] = '';
}
foreach ($GLOBALS['hooks']['Filter_Plugin_Post_Save'] as $fpname => &$fpsignal) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
$fpreturn = $fpname($this);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
return parent::Save();
}
示例5: Save
/**
* @return bool
*/
function Save()
{
global $zbp;
foreach ($GLOBALS['Filter_Plugin_Module_Save'] as $fpname => &$fpsignal) {
$fpreturn = $fpname($this);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
return $fpreturn;
}
}
if ($this->Source == 'theme') {
if (!$this->FileName) {
return true;
}
$c = $this->Content;
$d = $zbp->usersdir . 'theme/' . $zbp->theme . '/include/';
$f = $d . $this->FileName . '.php';
if (!file_exists($d)) {
@mkdir($d, 0755);
}
@file_put_contents($f, $c);
return true;
}
return parent::Save();
}
示例6: Save
/**
* 保存评论数据
* @return bool
*/
function Save()
{
global $zbp;
foreach ($GLOBALS['hooks']['Filter_Plugin_Comment_Save'] as $fpname => &$fpsignal) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
$fpreturn = $fpname($this);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
return parent::Save();
}
示例7: Save
/**
* @return bool
*/
public function Save()
{
global $zbp;
$this->Content = str_replace($zbp->host, '{$host}', $this->Content);
foreach ($GLOBALS['hooks']['Filter_Plugin_Module_Save'] as $fpname => &$fpsignal) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
$fpreturn = $fpname($this);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
if ($this->Source == 'theme') {
if (!$this->FileName) {
return true;
}
$c = $this->Content;
$d = $zbp->usersdir . 'theme/' . $zbp->theme . '/include/';
$f = $d . $this->FileName . '.php';
if (!file_exists($d)) {
@mkdir($d, 0755);
}
@file_put_contents($f, $c);
return true;
}
//return parent::Save();
//防Module重复保存的机制
$m = $zbp->GetListType('Module', $zbp->db->sql->get()->select($zbp->table['Module'])->where(array('=', $zbp->datainfo['Module']['FileName'][0], $this->FileName))->sql);
if (count($m) < 1) {
return parent::Save();
} else {
if ($this->ID == 0) {
return false;
}
return parent::Save();
}
}