summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-02-08 21:06:54 +0000
committerxue <>2006-02-08 21:06:54 +0000
commit1f19172f3df377ca0e88bb230d6f374ebef41b91 (patch)
tree1ab31079fc583ec17144b67883bc2b4fd9895114
parent9943fc0c6b3f7ffc5295a25206aa0b47091453ba (diff)
Moved onExitApplication out of destructor.
-rw-r--r--demos/personal/protected/application.xml2
-rw-r--r--framework/TApplication.php13
-rw-r--r--framework/Web/THttpResponse.php1
3 files changed, 5 insertions, 11 deletions
diff --git a/demos/personal/protected/application.xml b/demos/personal/protected/application.xml
index 4c26afec..0e6bd313 100644
--- a/demos/personal/protected/application.xml
+++ b/demos/personal/protected/application.xml
@@ -11,7 +11,7 @@
-->
<module id="session" class="THttpSession" />
<module id="log" class="System.Log.TLogRouter">
- <route class="TBrowserLogRoute" Categories="System.Web.UI.TPage" />
+ <route class="TBrowserLogRoute" Categories="System" />
<route class="TFileLogRoute" Categories="System" Levels="Notice,Warning,Error,Alert,Fatal" />
</module>
</modules>
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 7118fc54..151ff803 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -85,7 +85,8 @@ require_once(PRADO_DIR.'/Web/Services/TPageService.php');
* - PostRunService : this event happens right after the requested service finishes running
* - SaveState : this event happens when application needs to save its state
* - PostSaveState : this event happens right after the application saves its state
- * - EndRequest : this is the last stage an application runs
+ * - EndRequest : this is the last stage a request is being completed
+ * - ExitApplication : this is the last stage before application instance is destructed
* - [destruct] : destruction of the application instance
* Modules and services can attach their methods to one or several of the above
* events and do appropriate processing when the events are raised. By this way,
@@ -314,15 +315,6 @@ class TApplication extends TComponent
}
/**
- * Destructor.
- * It invokes {@link onExitApplication} method.
- */
- public function __destruct()
- {
- $this->onExitApplication();
- }
-
- /**
* Executes the lifecycles of the application.
* This is the main entry function that leads to the running of the whole
* Prado application.
@@ -352,6 +344,7 @@ class TApplication extends TComponent
{
$this->onError($e);
}
+ $this->onExitApplication();
}
/**
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index d51c0cf2..1cbf9751 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -265,6 +265,7 @@ class THttpResponse extends TModule implements ITextWriter
*/
public function redirect($url)
{
+ $this->getApplication()->onExitApplication();
header('Location:'.$url);
exit();
}