/** * 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); }