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
8fb69e86
Commit
8fb69e86
authored
Apr 18, 2010
by
Jordi Boggiano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapters: Agavi: Added support for multiple plugin directories in the config,…
Adapters: Agavi: Added support for multiple plugin directories in the config, thanks to Mike Seth for the patch
parent
f9e78994
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
CHANGELOG
CHANGELOG
+2
-0
DwooRenderer.php
lib/Dwoo/Adapters/Agavi/DwooRenderer.php
+14
-6
No files found.
CHANGELOG
View file @
8fb69e86
...
...
@@ -31,6 +31,8 @@
following
.
*
Fixed
parsing
of
function
/
constants
that
start
with
an
underscore
,
thanks
to
Dominik
del
Bondio
for
the
patch
*
Adapters
:
Agavi
:
Added
support
for
multiple
plugin
directories
in
the
config
,
thanks
to
Mike
Seth
for
the
patch
[
2010
-
02
-
07
]
1.1.1
+
Added
{
optional
}
plugin
that
just
prints
an
optional
var
without
any
...
...
lib/Dwoo/Adapters/Agavi/DwooRenderer.php
View file @
8fb69e86
...
...
@@ -16,7 +16,10 @@
* <parameter name="request_data">rd</parameter>
* </parameter>
* <parameter name="extract_vars">true</parameter>
* <parameter name="plugin_dir">%core.lib_dir%/dwoo_plugins</parameter>
* <parameters name="plugin_dir">
* <parameter>%core.lib_dir%/dwoo_plugins</parameter>
* <parameter>%core.lib_dir%/other_dwoo_plugins</parameter>
* </parameters>
* </renderer>
*
* - add dwoo's directory to your include path or include dwooAutoload.php yourself
...
...
@@ -27,6 +30,8 @@
* lib directory, or change the plugin_dir parameter in the output_types.xml file.
* these plugins are agavi-specific helpers that shortens the syntax to call common
* agavi helpers (i18n, routing, ..)
* - in the previous versions of this adapter, only a single value could be passed to
* plugin_dir parameter; now you can pass several plugin directories (see example)
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
...
...
@@ -36,8 +41,8 @@
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @link http://dwoo.org/
* @version 1.1.
0
* @date 20
09-07-18
* @version 1.1.
1
* @date 20
10-04-06
* @package Dwoo
*/
class
DwooRenderer
extends
AgaviRenderer
implements
AgaviIReusableRenderer
...
...
@@ -72,7 +77,7 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
protected
$defaultExtension
=
'.html'
;
/**
* stores the (optional) plugin director
y
to add to the Dwoo_Loader
* stores the (optional) plugin director
ies
to add to the Dwoo_Loader
*/
protected
$plugin_dir
=
null
;
...
...
@@ -128,6 +133,7 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
return
$this
->
dwoo
;
}
// this triggers Agavi autoload
if
(
!
class_exists
(
'Dwoo'
))
{
if
(
file_exists
(
dirname
(
__FILE__
)
.
'/../../../dwooAutoload.php'
))
{
// file was dropped with the entire dwoo package
...
...
@@ -149,7 +155,9 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
$this
->
dwoo
=
new
Dwoo_Core
(
$compileDir
,
$cacheDir
);
if
(
!
empty
(
$this
->
plugin_dir
))
{
$this
->
dwoo
->
getLoader
()
->
addDirectory
(
$this
->
plugin_dir
);
foreach
((
array
)
$this
->
plugin_dir
as
$dir
)
{
$this
->
dwoo
->
getLoader
()
->
addDirectory
(
$dir
);
}
}
$this
->
dwoo
->
setDefaultCompilerFactory
(
'file'
,
array
(
$this
,
'compilerFactory'
));
...
...
@@ -181,7 +189,7 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
$data
[
$this
->
slotsVarName
]
=&
$slots
;
foreach
(
$this
->
assigns
as
$key
=>
$getter
)
{
$data
[
$key
]
=
$this
->
context
->
$getter
();
$data
[
$key
]
=
$this
->
getContext
()
->
$getter
();
}
foreach
(
$moreAssigns
as
$key
=>
&
$value
)
{
...
...
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