Commit 5a2d4406 by Qiang Xue

w

parent 81692447
...@@ -45,9 +45,6 @@ ...@@ -45,9 +45,6 @@
* Starting from lifecycle 3, if a PHP error or an uncaught exception occurs, * Starting from lifecycle 3, if a PHP error or an uncaught exception occurs,
* the application will switch to its error handling logic and jump to step 6 afterwards. * the application will switch to its error handling logic and jump to step 6 afterwards.
* *
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*
* @property string $basePath Returns the root path of the application. * @property string $basePath Returns the root path of the application.
* @property CCache $cache Returns the cache component. * @property CCache $cache Returns the cache component.
* @property CPhpMessageSource $coreMessages Returns the core message translations. * @property CPhpMessageSource $coreMessages Returns the core message translations.
...@@ -69,6 +66,9 @@ ...@@ -69,6 +66,9 @@
* @property CUrlManager $urlManager Returns the URL manager component. * @property CUrlManager $urlManager Returns the URL manager component.
* @property string $baseUrl Returns the relative URL for the application * @property string $baseUrl Returns the relative URL for the application
* @property string $homeUrl the homepage URL * @property string $homeUrl the homepage URL
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/ */
abstract class Application extends Module abstract class Application extends Module
{ {
......
<?php
/**
* This file contains the base application component class.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright &copy; 2008-2012 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/**
* ApplicationComponent is the base class for application component classes.
*
* ApplicationComponent implements the basic methods required by {@link IApplicationComponent}.
*
* When developing an application component, try to put application component initialization code in
* the {@link init()} method instead of the constructor. This has the advantage that
* the application component can be customized through application configuration.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
abstract class ApplicationComponent extends Component
{
/**
* @var array the behaviors that should be attached to this component.
* The behaviors will be attached to the component when {@link init} is called.
* Please refer to {@link CModel::behaviors} on how to specify the value of this property.
* @since 1.0.2
*/
public $behaviors = array();
private $_initialized = false;
/**
* Initializes the application component.
* This method is required by {@link IApplicationComponent} and is invoked by application.
* If you override this method, make sure to call the parent implementation
* so that the application component can be marked as initialized.
*/
public function init()
{
$this->attachBehaviors($this->behaviors);
$this->_initialized = true;
}
/**
* Checks if this application component bas been initialized.
* @return boolean whether this application component has been initialized (ie, {@link init()} is invoked).
*/
public function getIsInitialized()
{
return $this->_initialized;
}
}
...@@ -12,3 +12,29 @@ ...@@ -12,3 +12,29 @@
* destruct * destruct
- get/setFlash() should be moved to session component - get/setFlash() should be moved to session component
- support optional parameter in URL patterns - support optional parameter in URL patterns
- api doc builder
* support for markdown syntax
* support for [[name]]
* consider to be released as a separate tool for user app docs
- cache components
* a way to invalidate/clear cached data
* a command to clear cached data
- console command support
- db
* DAO
* AR
* document-based
* key-value-based
- gii
- logging
- i18n
* consider using PHP built-in support and data
* message translations, choice format
* formatting: number and date
* parsing??
- error/exception handling
- helpers
* array
* image
* string
- web: TBD
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment