From e8b60312037e54c34a06d6f57d7c21946cf3cd1f Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 28 Dec 2005 20:17:54 +0000 Subject: Modified the way to access application singleton. IService and IModule interfaces are also adjusted accordingly. --- framework/core.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'framework/core.php') diff --git a/framework/core.php b/framework/core.php index 8288f82f..c864dbfa 100644 --- a/framework/core.php +++ b/framework/core.php @@ -56,10 +56,9 @@ interface IModule { /** * Initializes the module. - * @param TApplication the application object * @param TXmlElement the configuration for the module */ - public function init($application,$configuration); + public function init($configuration=null); /** * @return string ID of the module */ @@ -84,10 +83,9 @@ interface IService { /** * Initializes the service. - * @param TApplication the application object * @param TXmlElement the configuration for the service */ - public function init($application,$configuration); + public function init($configuration=null); /** * @return string ID of the service */ @@ -322,7 +320,7 @@ interface IStatePersister * @package System * @since 3.0 */ -class TModule extends TComponent implements IModule +abstract class TModule extends TComponent implements IModule { /** * @var string module id @@ -332,10 +330,9 @@ class TModule extends TComponent implements IModule /** * Initializes the module. * This method is required by IModule and is invoked by application. - * @param TApplication application * @param TXmlElement module configuration */ - public function init($application,$config) + public function init($config=null) { } @@ -377,10 +374,9 @@ abstract class TService extends TComponent implements IService /** * Initializes the service and attaches {@link run} to the RunService event of application. * This method is required by IService and is invoked by application. - * @param TApplication application * @param TXmlElement module configuration */ - public function init($application,$config) + public function init($config=null) { } -- cgit v1.2.3