mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 03:52:15 +09:00
Add ModuleObject->copyResponseFrom()
This commit is contained in:
parent
4fb1511e74
commit
e97f44826d
1 changed files with 28 additions and 1 deletions
|
|
@ -158,6 +158,7 @@ class ModuleObject extends BaseObject
|
||||||
* refresh.html is executed as a result of method execution
|
* refresh.html is executed as a result of method execution
|
||||||
* Tpl as the common run of the refresh.html ..
|
* Tpl as the common run of the refresh.html ..
|
||||||
*
|
*
|
||||||
|
* @deprecated
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRefreshPage()
|
public function setRefreshPage()
|
||||||
|
|
@ -756,6 +757,32 @@ class ModuleObject extends BaseObject
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy the response of another ModuleObject into this instance.
|
||||||
|
*
|
||||||
|
* @param self $instance
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyResponseFrom(self $instance)
|
||||||
|
{
|
||||||
|
// Copy error and status information.
|
||||||
|
$this->error = $instance->getError();
|
||||||
|
$this->message = $instance->getMessage();
|
||||||
|
$this->httpStatusCode = $instance->getHttpStatusCode();
|
||||||
|
|
||||||
|
// Copy template settings.
|
||||||
|
$this->setTemplatePath($instance->getTemplatePath());
|
||||||
|
$this->setTemplateFile($instance->getTemplateFile());
|
||||||
|
$this->setLayoutPath($instance->getLayoutPath());
|
||||||
|
$this->setLayoutFile($instance->getLayoutFile());
|
||||||
|
$this->setEditedLayoutFile($instance->getEditedLayoutFile());
|
||||||
|
|
||||||
|
// Copy all other variables: redirect URL, message type, etc.
|
||||||
|
foreach ($instance->getVariables() as $key => $val)
|
||||||
|
{
|
||||||
|
$this->variables[$key] = $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* End of file ModuleObject.class.php */
|
/* End of file ModuleObject.class.php */
|
||||||
/* Location: ./classes/module/ModuleObject.class.php */
|
/* Location: ./classes/module/ModuleObject.class.php */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue