本文整理匯總了PHP中parent::object方法的典型用法代碼示例。如果您正苦於以下問題:PHP parent::object方法的具體用法?PHP parent::object怎麽用?PHP parent::object使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類parent
的用法示例。
在下文中一共展示了parent::object方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: selectByItemId
public static function selectByItemId($intId)
{
global $_CONF;
parent::$object = "StorageData";
parent::$table = "pcms_storage_data";
$strSql = sprintf("SELECT * FROM " . parent::$table . " WHERE itemId = '%s'", $intId);
return parent::select($strSql);
}
示例2: select
public static function select($strSql = "")
{
global $_CONF;
parent::$object = "ContentLanguage";
parent::$table = "pcms_language";
if (empty($strSql)) {
$strSql = sprintf("SELECT * FROM " . parent::$table . " WHERE accountId = '%s' ORDER BY sort", $_CONF['app']['account']->getId());
}
return parent::select($strSql);
}
示例3: save
public function save($blnSaveModifiedDate = TRUE)
{
parent::$object = "Template";
parent::$table = "pcms_template";
$intId = $this->getId();
$blnReturn = parent::save($blnSaveModifiedDate);
if (class_exists("AuditLog")) {
AuditLog::addLog(AUDIT_TYPE_TEMPLATE, $this->getId(), $this->getName(), empty($intId) ? "create" : "edit");
}
return $blnReturn;
}
示例4: selectByAlias
public static function selectByAlias($strAlias)
{
global $_CONF;
parent::$object = "Alias";
parent::$table = "pcms_alias";
$objReturn = null;
if (!empty($strAlias)) {
$strSql = sprintf("SELECT * FROM " . parent::$table . " WHERE accountId = '%s' AND alias = %s ORDER BY sort", $_CONF['app']['account']->getId(), parent::quote($strAlias));
$objReturn = parent::select($strSql);
}
return $objReturn;
}
示例5: getItems
public function getItems($intTypeId = STORAGE_TYPE_ALL)
{
global $_CONF;
parent::$object = "StorageItem";
parent::$table = "pcms_storage_item";
$strSql = sprintf("SELECT * FROM " . parent::$table . " WHERE parentId = '%s' AND typeId IN (%s) AND accountId = '%s' ORDER BY sort", $this->getId(), $intTypeId, $_CONF['app']['account']->getId());
return parent::select($strSql);
}
示例6: save
public function save($blnSaveModifiedDate = TRUE, $blnCreateForced = TRUE)
{
parent::$object = "Element";
parent::$table = "pcms_element";
$intId = $this->getId();
$blnReturn = parent::save($blnSaveModifiedDate);
if (class_exists("AuditLog")) {
AuditLog::addLog(AUDIT_TYPE_ELEMENT, $this->getId(), $this->getName(), empty($intId) ? "create" : "edit", $this->getActive() ? "active" : "inactive");
}
//*** Save permissions.
if (is_object($this->objPermissions)) {
$this->clearPermissions();
$this->objPermissions->setElementId($this->id);
$this->objPermissions->save();
}
//*** Create forced children.
if (empty($intId) && $blnCreateForced) {
$this->createForcedElements();
}
return $blnReturn;
}