From c53ef254ccc2959f5f6d9bf6fff26071fc57368e Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Mon, 5 Dec 2011 16:30:49 +0000 Subject: reverted r2801, r2803, r2829's madness. --- framework/TApplication.php | 49 ++-------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) (limited to 'framework/TApplication.php') diff --git a/framework/TApplication.php b/framework/TApplication.php index acfb8d2a..ff99d33e 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -76,8 +76,7 @@ Prado::using('System.I18N.TGlobalization'); * TApplication maintains a lifecycle with the following stages: * - [construct] : construction of the application instance * - [initApplication] : load application configuration and instantiate modules and the requested service - * - onInitComplete : this event happens right after application initialization and can finish any initialization - * - onBeginRequest : this event happens right before the request starts + * - onBeginRequest : this event happens right after application initialization * - onAuthentication : this event happens when authentication is needed for the current request * - onAuthenticationComplete : this event happens right after the authentication is done for the current request * - onAuthorization : this event happens when authorization is needed for the current request @@ -161,11 +160,6 @@ class TApplication extends TComponent * Global data file */ const GLOBAL_FILE='global.cache'; - - /** - * Defines which step the service is run - */ - const SERVICE_STEP=8; /** * @var array list of events that define application lifecycles @@ -419,15 +413,6 @@ class TApplication extends TComponent } $this->onEndRequest(); } - - - /** - * Tells you whether the application is after the service step - * @return boolean whether it is after the service step - */ - public function getIsAfterService() { - return $this->_step > self::SERVICE_STEP; - } /** * Completes current request processing. @@ -718,21 +703,6 @@ class TApplication extends TComponent return isset($this->_modules[$id])?$this->_modules[$id]:null; } - /** - * This loops through all the modules and finds those with a specific type, with/witout strictness - * @param string $type this is the string module type to look for - * @param boolean $strict default false, the module can be an instanceof the type if false, otherwise it must be the exact class - * @return IModule the module with the specified ID, null if not found - */ - public function getModulesByType($type,$strict=false) - { - $modules = array(); - foreach($this->_modules as $module) - if( get_class($module)===$type || (!$strict && ($module instanceof $type)) ) - $modules[] = $module; - return $modules; - } - /** * @return array list of loaded application modules, indexed by module IDs */ @@ -1075,8 +1045,6 @@ class TApplication extends TComponent $serviceID=$this->getPageServiceID(); $this->startService($serviceID); - - $this->onInitComplete(); } /** @@ -1130,24 +1098,11 @@ class TApplication extends TComponent $this->getErrorHandler()->handleError($this,$param); } - /** - * Raises onInitComplete event. - * At the time when this method is invoked, application modules are loaded, - * user request is resolved and the corresponding service - * is loaded and initialized. The application is about to start processing - * the user request. - */ - public function onInitComplete() - { - Prado::trace("Executing onInitComplete()",'System.TApplication'); - $this->raiseEvent('onInitComplete',$this,null); - } - /** * Raises OnBeginRequest event. * At the time when this method is invoked, application modules are loaded * and initialized, user request is resolved and the corresponding service - * is loaded and initialized. The application is starting to process + * is loaded and initialized. The application is about to start processing * the user request. */ public function onBeginRequest() -- cgit v1.2.3