本文整理汇总了PHP中CStoredObject::load方法的典型用法代码示例。如果您正苦于以下问题:PHP CStoredObject::load方法的具体用法?PHP CStoredObject::load怎么用?PHP CStoredObject::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStoredObject
的用法示例。
在下文中一共展示了CStoredObject::load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doBind
/**
* Bind request values to a CStoredObject
*
* @param bool $reinstanciate_objects Make new instances of the object (don't use the ones instanciated in the constructor)
*
* @return void
*/
function doBind($reinstanciate_objects = false)
{
$this->ajax = CMbArray::extract($this->request, "ajax");
$this->suppressHeaders = CMbArray::extract($this->request, "suppressHeaders");
$this->callBack = CMbArray::extract($this->request, "callback");
$this->postRedirect = CMbArray::extract($this->request, "postRedirect");
if ($this->postRedirect) {
$this->redirect = $this->postRedirect;
}
if ($reinstanciate_objects) {
$this->_obj = new $this->className();
$this->_old = new $this->className();
$this->onAfterInstanciation();
// Lancer ceci apres chaque instanciation de _obj et _old !!
}
// Object binding
$this->_obj->bind($this->request);
// Old object
$this->_old->load($this->_obj->_id);
}