Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
e659e084
Commit
e659e084
authored
Feb 27, 2011
by
Kamil Szot
Committed by
Jordi Boggiano
Feb 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allows to use any object that implements ArrayAccess as datasource for template
parent
83082c22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Core.php
lib/Dwoo/Core.php
+7
-0
No files found.
lib/Dwoo/Core.php
View file @
e659e084
...
...
@@ -338,6 +338,8 @@ class Dwoo_Core
$this
->
data
=
$data
->
getData
();
}
elseif
(
is_array
(
$data
))
{
$this
->
data
=
$data
;
}
elseif
(
$data
instanceof
ArrayAccess
)
{
$this
->
data
=
$data
;
}
else
{
throw
new
Dwoo_Exception
(
'Dwoo->get/Dwoo->output\'s data argument must be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array'
,
E_USER_NOTICE
);
}
...
...
@@ -1531,7 +1533,12 @@ class Dwoo_Core
$this
->
scope
=&
$this
->
data
;
$this
->
scopeTree
=
array
();
}
elseif
(
isset
(
$this
->
scope
[
$bit
]))
{
if
(
$this
->
scope
instanceof
ArrayAccess
)
{
$tmp
=
$this
->
scope
[
$bit
];
$this
->
scope
=&
$tmp
;
}
else
{
$this
->
scope
=&
$this
->
scope
[
$bit
];
}
$this
->
scopeTree
[]
=
$bit
;
}
else
{
unset
(
$this
->
scope
);
...
...
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