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
2c0b300f
Commit
2c0b300f
authored
Jan 10, 2009
by
seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
svn://dwoo.org/dwoo/trunk@234
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
7ea83358
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
template.php
lib/plugins/builtin/blocks/template.php
+2
-1
No files found.
lib/plugins/builtin/blocks/template.php
View file @
2c0b300f
...
...
@@ -52,7 +52,7 @@ class Dwoo_Plugin_template extends Dwoo_Block_Plugin implements Dwoo_ICompilable
$paramstr
=
'Dwoo $dwoo'
;
$init
=
'static $_callCnt = 0;'
.
"
\n
"
.
'$dwoo->scope[\' '
.
$params
[
'uuid'
]
.
'\'.$_callCnt] = array();'
.
"
\n
"
.
'$_scope = $dwoo->setScope(array(\' '
.
$params
[
'uuid'
]
.
'\'.($_callCnt++)));'
.
"
\n
/* -- template start output */
"
;
'$_scope = $dwoo->setScope(array(\' '
.
$params
[
'uuid'
]
.
'\'.($_callCnt++)));'
.
"
\n
"
;
$cleanup
=
'/* -- template end output */ $dwoo->setScope($_scope, true);'
;
foreach
(
$params
[
'*'
]
as
$param
=>
$defValue
)
{
if
(
$defValue
===
null
)
{
...
...
@@ -62,6 +62,7 @@ class Dwoo_Plugin_template extends Dwoo_Block_Plugin implements Dwoo_ICompilable
}
$init
.=
'$dwoo->scope[\''
.
$param
.
'\'] = $'
.
$param
.
";
\n
"
;
}
$init
.=
'/* -- template start output */'
;
$body
=
Dwoo_Compiler
::
PHP_OPEN
.
'function Dwoo_Plugin_'
.
$params
[
'name'
]
.
'_'
.
$params
[
'uuid'
]
.
'('
.
$paramstr
.
') {'
.
"
\n
$init
"
.
Dwoo_Compiler
::
PHP_CLOSE
.
$prepend
.
str_replace
(
array
(
'$this->'
,
'$this,'
),
array
(
'$dwoo->'
,
'$dwoo,'
),
$content
)
.
$append
.
Dwoo_Compiler
::
PHP_OPEN
.
$cleanup
.
"
\n
}"
.
Dwoo_Compiler
::
PHP_CLOSE
;
...
...
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