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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
84dd19d7
Commit
84dd19d7
authored
Sep 11, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the issue that Object/Component doesn't support using anonymous function…
Fixed the issue that Object/Component doesn't support using anonymous function as normal property values.
parent
c6f4dac2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
Component.php
framework/yii/base/Component.php
+2
-3
Object.php
framework/yii/base/Object.php
+2
-3
No files found.
framework/yii/base/Component.php
View file @
84dd19d7
...
@@ -193,9 +193,8 @@ class Component extends Object
...
@@ -193,9 +193,8 @@ class Component extends Object
*/
*/
public
function
__call
(
$name
,
$params
)
public
function
__call
(
$name
,
$params
)
{
{
$getter
=
'get'
.
$name
;
if
(
$this
->
canGetProperty
(
$name
))
{
if
(
method_exists
(
$this
,
$getter
))
{
$func
=
$this
->
$name
;
$func
=
$this
->
$getter
();
if
(
$func
instanceof
\Closure
)
{
if
(
$func
instanceof
\Closure
)
{
return
call_user_func_array
(
$func
,
$params
);
return
call_user_func_array
(
$func
,
$params
);
}
}
...
...
framework/yii/base/Object.php
View file @
84dd19d7
...
@@ -155,9 +155,8 @@ class Object implements Arrayable
...
@@ -155,9 +155,8 @@ class Object implements Arrayable
*/
*/
public
function
__call
(
$name
,
$params
)
public
function
__call
(
$name
,
$params
)
{
{
$getter
=
'get'
.
$name
;
if
(
$this
->
canGetProperty
(
$name
))
{
if
(
method_exists
(
$this
,
$getter
))
{
$func
=
$this
->
$name
;
$func
=
$this
->
$getter
();
if
(
$func
instanceof
\Closure
)
{
if
(
$func
instanceof
\Closure
)
{
return
call_user_func_array
(
$func
,
$params
);
return
call_user_func_array
(
$func
,
$params
);
}
}
...
...
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