Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
PSDI Army
yii2
Commits
f53a188f
Commit
f53a188f
authored
Jul 31, 2011
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
b158ff07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
43 deletions
+7
-43
YiiBase.php
framework/YiiBase.php
+7
-3
Component.php
framework/base/Component.php
+0
-40
No files found.
framework/YiiBase.php
View file @
f53a188f
...
@@ -317,9 +317,6 @@ class YiiBase
...
@@ -317,9 +317,6 @@ class YiiBase
* pairs in the array will be used to initialize the corresponding object properties.
* pairs in the array will be used to initialize the corresponding object properties.
* For example,
* For example,
*
*
* Any additional parameters passed to this method will be
* passed to the constructor of the object being created.
*
* ~~~
* ~~~
* $component = Yii::createComponent('@app/components/GoogleMap');
* $component = Yii::createComponent('@app/components/GoogleMap');
* $component = Yii::createComponent('\application\components\GoogleMap');
* $component = Yii::createComponent('\application\components\GoogleMap');
...
@@ -329,6 +326,13 @@ class YiiBase
...
@@ -329,6 +326,13 @@ class YiiBase
* ));
* ));
* ~~~
* ~~~
*
*
* Any additional parameters passed to this method will be
* passed to the constructor of the object being created.
*
* If a component class implements the [[\yii\base\Initable]] interface,
* its [[\yii\base\Initable::init|init]] method will be invoked after
* its properties have been initialized.
*
* @param mixed $config the configuration. It can be either a string or an array.
* @param mixed $config the configuration. It can be either a string or an array.
* @return mixed the created object
* @return mixed the created object
* @throws \yii\base\Exception if the configuration does not have a 'class' element.
* @throws \yii\base\Exception if the configuration does not have a 'class' element.
...
...
framework/base/Component.php
View file @
f53a188f
...
@@ -304,46 +304,6 @@ class Component
...
@@ -304,46 +304,6 @@ class Component
}
}
/**
/**
* Initializes this component.
* This method is invoked by [[\Yii::createComponent]] after its creates the new
* component instance and initializes the component properties. In other words,
* at this stage, the component has been fully configured.
*
* The default implementation calls [[behaviors]] and registers any available behaviors.
* You may override this method with additional initialization logic (e.g. establish DB connection).
* Make sure you call the parent implementation.
*/
public
function
init
()
{
$this
->
attachBehaviors
(
$this
->
behaviors
());
}
/**
* Returns a list of behaviors that this component should behave as.
* The return value should be an array of behavior configurations indexed by
* behavior names. Each behavior configuration can be either a string specifying
* the behavior class or an array of the following structure:
*
* ~~~
* 'behaviorName' => array(
* 'class' => 'BehaviorClass',
* 'property1' => 'value1',
* 'property2' => 'value2',
* )
* ~~~
*
* Note that a behavior class must extend from [[Behavior]]. Behaviors declared
* in this method will be attached to the model when [[init]] is invoked.
*
* @return array the behavior configurations.
* @see init
*/
public
function
behaviors
()
{
return
array
();
}
/**
* Returns a value indicating whether a property is defined.
* Returns a value indicating whether a property is defined.
* A property is defined if there is a getter or setter method
* A property is defined if there is a getter or setter method
* defined in the class. Note, property names are case-insensitive.
* defined in the class. Note, property names are case-insensitive.
...
...
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