mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 23:50:38 +08:00
w
This commit is contained in:
@@ -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 @@
|
|||||||
* @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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file contains the base application component class.
|
|
||||||
*
|
|
||||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
|
||||||
* @link http://www.yiiframework.com/
|
|
||||||
* @copyright Copyright © 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
26
todo.txt
26
todo.txt
@@ -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
|
||||||
Reference in New Issue
Block a user