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
e1d4ca24
Commit
e1d4ca24
authored
Sep 26, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed parsing bug in {func()->propertyOfReturnedObject}
git-svn-id:
svn://dwoo.org/dwoo/trunk@190
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
512b3d74
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
CHANGELOG
CHANGELOG
+4
-3
Compiler.php
lib/Dwoo/Compiler.php
+1
-1
CompilerTests.php
tests/CompilerTests.php
+16
-0
No files found.
CHANGELOG
View file @
e1d4ca24
[
2008
--]
1.0.0
! BC Break: Small one that probably won't affect anyone, but it makes the
PluginProxy
feature
much
stronger
.
Basically
if
you
used
a
custom
one
you
will
get
a
fatal
error
and
need
to
update
it
to
conform
to
the
new
! BC Break: Small one that probably won't affect anyone, but it makes the
PluginProxy
feature
much
stronger
.
Basically
if
you
used
a
custom
one
you
will
get
a
fatal
error
and
need
to
update
it
to
conform
to
the
new
IPluginProxy
interface
,
that
's it
* Plugins: improved the dump plugin, it now displays object'
s
properties
and
optionally
public
methods
(
if
the
new
show_methods
arg
is
set
to
true
)
...
...
@@ -10,6 +10,7 @@
*
Adapters
:
Zend
:
Added
parameters
to
provide
a
custom
engine
(
extends
Dwoo
)
or
a
custom
data
class
(
extends
Dwoo_Data
)
-
thanks
to
Maxime
M
é
rian
for
the
patch
*
Fixed
parsing
bug
in
{
func
()->
propertyOfReturnedObject
}
*
Fixed
file
template
class
reading
from
the
string
compiler
factory
-
thanks
to
MrOxiMoron
for
the
patch
*
Fixed
a
1.0.0
beta
regression
that
messed
with
custom
plugin
directories
...
...
lib/Dwoo/Compiler.php
View file @
e1d4ca24
...
...
@@ -1209,7 +1209,7 @@ class Dwoo_Compiler implements Dwoo_ICompiler
}
}
if
(
isset
(
$parsed
)
&&
$parsed
===
'func'
&&
preg_match
(
'#^->[a-z0-9_]+(\s*\(.+)?#is'
,
$substr
,
$match
))
{
if
(
isset
(
$parsed
)
&&
$parsed
===
'func'
&&
preg_match
(
'#^->[a-z0-9_]+(\s*\(.+
|->[a-z].*
)?#is'
,
$substr
,
$match
))
{
$ptr
=
0
;
if
(
is_array
(
$parsingParams
))
{
...
...
tests/CompilerTests.php
View file @
e1d4ca24
...
...
@@ -556,6 +556,16 @@ replace="BAR"
$this
->
assertEquals
(
'valid'
,
$dwoo
->
get
(
$tpl
,
array
(),
$this
->
compiler
));
}
public
function
testCallingMethodOnPropery
()
{
$tpl
=
new
Dwoo_Template_String
(
'{getobj()->instance->Bar("hoy")}'
);
$tpl
->
forceCompilation
();
$dwoo
=
new
Dwoo
(
DWOO_COMPILE_DIR
,
DWOO_CACHE_DIR
);
$dwoo
->
addPlugin
(
'getobj'
,
array
(
new
PluginHelper
(),
'call'
));
$this
->
assertEquals
(
'HOY'
,
$dwoo
->
get
(
$tpl
,
array
(),
$this
->
compiler
));
}
}
class
ProxyHelper
implements
Dwoo_IPluginProxy
...
...
@@ -602,6 +612,12 @@ class ProxyHelper implements Dwoo_IPluginProxy
class
PluginHelper
{
public
$moo
=
"yay"
;
public
$instance
;
public
function
__construct
()
{
$this
->
instance
=
$this
;
}
public
function
callWithDwoo
(
Dwoo
$dwoo
)
{
...
...
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