Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
07c86e58
Commit
07c86e58
authored
Jul 23, 2011
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
aaae62bd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1521 additions
and
0 deletions
+1521
-0
Application.php
framework/base/Application.php
+965
-0
ApplicationComponent.php
framework/base/ApplicationComponent.php
+55
-0
Module.php
framework/base/Module.php
+501
-0
No files found.
framework/base/Application.php
0 → 100644
View file @
07c86e58
This diff is collapsed.
Click to expand it.
framework/base/ApplicationComponent.php
0 → 100644
View file @
07c86e58
<?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
;
}
}
framework/base/Module.php
0 → 100644
View file @
07c86e58
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment