Methods summary
	
		| 
			 public 
			
			
			 | 
		#
		__construct( string $id, CModule$parent, mixed $config = null )
			
Constructor. Parameters
					$idstring$id the ID of this module
$parentCModule$parent the parent module (if any)
$configmixed$config the module configuration. It can be either an array or the path of a PHP
file returning the configuration array.
 | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		__get( string $name )
			
Getter magic method. This method is overridden to support accessing
application components like reading module properties. 
			
Getter magic method. This method is overridden to support accessing
application components like reading module properties. Parameters
					$namestring$name application component or property name
Returns
					mixedthe named property value
 
 ThrowsOverrides | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		__isset( string $name )
			
Checks if a property value is null. This method overrides the parent
implementation by checking if the named application component is loaded. 
			
Checks if a property value is null. This method overrides the parent
implementation by checking if the named application component is loaded. Parameters
					$namestring$name the property name or the event name
Returns
					booleanwhether the property value is null
 
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		getId( )
			
Returns the module ID. Returns
					stringthe module ID.
 
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setId( string $id )
			
Sets the module ID. Parameters
					$idstring$id the module ID
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getBasePath( )
			
Returns the root directory of the module. 
			
Returns the root directory of the module. Returns
					stringthe root directory of the module. Defaults to the directory containing the
module class.
 
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setBasePath( string $path )
			
Sets the root directory of the module. This method can only be invoked at the
beginning of the constructor. 
			
Sets the root directory of the module. This method can only be invoked at the
beginning of the constructor. Parameters
					$pathstring$path the root directory of the module.
Throws | 
	
		| 
			 public 
			CAttributeCollection | 
		#
		getParams( )
			
Returns user-defined parameters. 
			
Returns user-defined parameters. Returns | 
	
		| 
			 public 
			
			
			 | 
		#
		setParams( array $value )
			
Sets user-defined parameters. 
			
Sets user-defined parameters. Parameters
					$valuearray$value user-defined parameters. This should be in name-value pairs.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getModulePath( )
			
Returns the directory that contains the application modules. 
			
Returns the directory that contains the application modules. Returns
					stringthe directory that contains the application modules. Defaults to the 'modules'
subdirectory of basePath.
 
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setModulePath( string $value )
			
Sets the directory that contains the application modules. 
			
Sets the directory that contains the application modules. Parameters
					$valuestring$value the directory that contains the application modules.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		setImport( array $aliases )
			
Sets the aliases that are used in the module. 
			
Sets the aliases that are used in the module. Parameters
					$aliasesarray$aliases list of aliases to be imported
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setAliases( array $mappings )
			
Defines the root aliases. 
			
Defines the root aliases. Parameters
					$mappingsarray$mappings list of aliases to be defined. The array keys are root aliases, while
the array values are paths or aliases corresponding to the root aliases. For
example, <pre> array( 'models'=>'application.models', // an existing
alias 'extensions'=>'application.extensions', // an existing alias
'backend'=>dirname(__FILE__).'/../backend', // a directory ) </pre>
 | 
	
		| 
			 public 
			CModule | 
		#
		getParentModule( )
			
Returns the parent module. 
			
Returns the parent module. Returns
					CModulethe parent module. Null if this module does not have a parent.
				 | 
	
		| 
			 public 
			CModule | 
		#
		getModule( string $id )
			
Retrieves the named application module. The module has to be declared in
modules. A new instance will be created when calling this method with
the given ID for the first time. 
			
Retrieves the named application module. The module has to be declared in
modules. A new instance will be created when calling this method with
the given ID for the first time. Parameters
					$idstring$id application module ID (case-sensitive)
Returns
					CModulethe module instance, null if the module is disabled or does not exist.
				 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		hasModule( string $id )
			
Returns a value indicating whether the specified module is installed. 
			
Returns a value indicating whether the specified module is installed. Parameters
					$idstring$id the module ID
Returns
					booleanwhether the specified module is installed.
 
 Since
						1.1.2
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		getModules( )
			
Returns the configuration of the currently installed modules. 
			
Returns the configuration of the currently installed modules. Returns
					arraythe configuration of the currently installed modules (module ID =>
configuration)
 
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setModules( array $modules, boolean $merge = true )
			
Configures the sub-modules of this module. 
			
Configures the sub-modules of this module. Call this method to declare sub-modules and configure them with their initial
property values. The parameter should be an array of module configurations. Each
array element represents a single module, which can be either a string
representing the module ID or an ID-configuration pair representing a module
with the specified ID and the initial property values. For example, the following array declares two modules: 
array(
    'admin',                // a single module ID
    'payment'=>array(       // ID-configuration pair
        'server'=>'paymentserver.com',
    ),
)
By default, the module class is determined using the expression
<span class="php-keyword2">ucfirst</span>(<span
class="php-var">$moduleID</span>).<span
class="php-quote">'Module'</span>. And the class file is located
undermodules/<span class="php-var">$moduleID</span>.
You may override this default by explicitly specifying the 'class' option in the
configuration. You may also enable or disable a module by specifying the 'enabled' option in
the configuration. Parameters
					$modulesarray$modules module configurations.
$mergeboolean$merge whether to merge the new module configuration with the existing one.
Defaults to true, meaning the previously registered module configuration with
the same ID will be merged with the new configuration. If set to false, the
existing configuration will be replaced completely. This parameter is available
since 1.1.16.
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		hasComponent( string $id )
			
Checks whether the named component exists. 
			
Checks whether the named component exists. Parameters
					$idstring$id application component ID
Returns
					booleanwhether the named application component exists (including both loaded and
disabled.)
 
 | 
	
		| 
			 public 
			IApplicationComponent | 
		#
		getComponent( string $id, boolean $createIfNull = true )
			
Retrieves the named application component. 
			
Retrieves the named application component. Parameters
					$idstring$id application component ID (case-sensitive)
$createIfNullboolean$createIfNull whether to create the component if it doesn't exist yet.
Returns
					IApplicationComponentthe application component instance, null if the application component is
disabled or does not exist.
				 See | 
	
		| 
			 public 
			
			
			 | 
		#
		setComponent( string $id, array|IApplicationComponent$component, boolean $merge = true )
			
Puts a component under the management of the module. The component will be
initialized by calling its CApplicationComponent::init() init() method
if it has not done so. 
			
Puts a component under the management of the module. The component will be
initialized by calling its CApplicationComponent::init() init() method
if it has not done so. Parameters
					$idstring$id component ID
$componentarray|IApplicationComponent$component application component (either configuration array or instance). If
this parameter is null, component will be unloaded from the module.
$mergeboolean$merge whether to merge the new component configuration with the existing one.
Defaults to true, meaning the previously registered component configuration with
the same ID will be merged with the new configuration. If set to false, the
existing configuration will be replaced completely. This parameter is available
since 1.1.13.
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		getComponents( boolean $loadedOnly = true )
			
Returns the application components. 
			
Returns the application components. Parameters
					$loadedOnlyboolean$loadedOnly whether to return the loaded components only. If this is set false,
then all components specified in the configuration will be returned, whether
they are loaded or not. Loaded components will be returned as objects, while
unloaded components as configuration arrays. This parameter has been available
since version 1.1.3.
Returns
					arraythe application components (indexed by their IDs)
 
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setComponents( array $components, boolean $merge = true )
			
Sets the application components. 
			
Sets the application components. When a configuration is used to specify a component, it should consist of the
component's initial property values (name-value pairs). Additionally, a
component can be enabled (default) or disabled by specifying the 'enabled' value
in the configuration. If a configuration is specified with an ID that is the same as an existing
component or configuration, the existing one will be replaced silently. The following is the configuration for two components: 
array(
    'db'=>array(
        'class'=>'CDbConnection',
        'connectionString'=>'sqlite:path/to/file.db',
    ),
    'cache'=>array(
        'class'=>'CDbCache',
        'connectionID'=>'db',
        'enabled'=>!YII_DEBUG,  // enable caching in non-debug mode
    ),
)
Parameters
					$componentsarray$components application components(id=>component configuration or instances)
$mergeboolean$merge whether to merge the new component configuration with the existing one.
Defaults to true, meaning the previously registered component configuration of
the same ID will be merged with the new configuration. If false, the existing
configuration will be replaced completely.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		configure( array $config )
			
Configures the module with the specified configuration. 
			
Configures the module with the specified configuration. Parameters
					$configarray$config the configuration array
 | 
	
		| 
			 protected 
			
			
			 | 
		#
		preloadComponents( )
			
Loads static application components. 
			
Loads static application components. | 
	
		| 
			 protected 
			
			
			 | 
		#
		preinit( )
			
Preinitializes the module. This method is called at the beginning of the
module constructor. You may override this method to do some customized
preinitialization work. Note that at this moment, the module is not configured
yet. 
			
Preinitializes the module. This method is called at the beginning of the
module constructor. You may override this method to do some customized
preinitialization work. Note that at this moment, the module is not configured
yet. See | 
	
		| 
			 protected 
			
			
			 | 
		#
		init( )
			
Initializes the module. This method is called at the end of the module
constructor. Note that at this moment, the module has been configured, the
behaviors have been attached and the application components have been
registered. 
			
Initializes the module. This method is called at the end of the module
constructor. Note that at this moment, the module has been configured, the
behaviors have been attached and the application components have been
registered. See | 
	
	
	Magic properties summary
	
		| 
			public  
			string
		 | $id |  | 
	
		| 
			public  
			string
		 | $basePath | 
			#
			
				
The root directory of the module. Defaults to the directory containing the
module class. 
				
The root directory of the module. Defaults to the directory containing the
module class. | 
	
		| 
			public  
			CAttributeCollection | $params | 
			#
			
				
The list of user-defined parameters. 
				
The list of user-defined parameters. | 
	
		| 
			public  
			string
		 | $modulePath | 
			#
			
				
The directory that contains the application modules. Defaults to the
'modules' subdirectory of basePath. 
				
The directory that contains the application modules. Defaults to the
'modules' subdirectory of basePath. | 
	
		| 
			public  
			CModule | $parentModule | 
			#
			
				
The parent module. Null if this module does not have a parent. 
				
The parent module. Null if this module does not have a parent. | 
	
		| 
			public  
			array
		 | $modules | 
			#
			
				
The configuration of the currently installed modules (module ID =>
configuration). 
				
The configuration of the currently installed modules (module ID =>
configuration). | 
	
		| 
			public  
			array
		 | $components | 
			#
			
				
The application components (indexed by their IDs). 
				
The application components (indexed by their IDs). | 
	
		| 
			public  
			array
		 | $import | 
			#
			
				
List of aliases to be imported. 
				
List of aliases to be imported. | 
	
		| 
			public  
			array
		 | $aliases | 
			#
			
				
List of aliases to be defined. The array keys are root aliases, while the
array values are paths or aliases corresponding to the root aliases. For
example,  array(    'models'=>'application.models',              // an existing alias    'extensions'=>'application.extensions',      // an existing alias    'backend'=>dirname(__FILE__).'/../backend',  // a directory )  
				
List of aliases to be defined. The array keys are root aliases, while the
array values are paths or aliases corresponding to the root aliases. For
example,  array(    'models'=>'application.models',              // an existing alias    'extensions'=>'application.extensions',      // an existing alias    'backend'=>dirname(__FILE__).'/../backend',  // a directory )  |