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
3c603a81
Commit
3c603a81
authored
Aug 21, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ adds two util methods to ZF view
git-svn-id:
svn://dwoo.org/dwoo/trunk@150
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
f738fcab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
View.php
lib/Dwoo/Adapters/ZendFramework/View.php
+53
-0
No files found.
lib/Dwoo/Adapters/ZendFramework/View.php
View file @
3c603a81
...
...
@@ -263,4 +263,56 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
$this
->
_engine
->
setCharset
(
$charset
);
return
$this
;
}
/**
* Given a base path, add script, helper, and filter paths relative to it
*
* Assumes a directory structure of:
* <code>
* basePath/ (view scripts)
* helpers/
* filters/
* </code>
*
* @param string $path
* @param string $prefix Prefix to use for helper and filter paths
* @return Zend_View_Abstract
*/
public
function
addBasePath
(
$path
,
$classPrefix
=
'Zend_View'
)
{
$path
=
rtrim
(
$path
,
'/'
);
$path
=
rtrim
(
$path
,
'\\'
);
$path
.=
DIRECTORY_SEPARATOR
;
$classPrefix
=
rtrim
(
$classPrefix
,
'_'
)
.
'_'
;
$this
->
addScriptPath
(
$path
);
$this
->
addHelperPath
(
$path
.
'helpers'
,
$classPrefix
.
'Helper'
);
$this
->
addFilterPath
(
$path
.
'filters'
,
$classPrefix
.
'Filter'
);
return
$this
;
}
/**
* Given a base path, sets the script, helper, and filter paths relative to it
*
* Assumes a directory structure of:
* <code>
* basePath/ (view scripts)
* helpers/
* filters/
* </code>
*
* @param string $path
* @param string $prefix Prefix to use for helper and filter paths
* @return Zend_View_Abstract
*/
public
function
setBasePath
(
$path
,
$classPrefix
=
'Zend_View'
)
{
$path
=
rtrim
(
$path
,
'/'
);
$path
=
rtrim
(
$path
,
'\\'
);
$path
.=
DIRECTORY_SEPARATOR
;
$classPrefix
=
rtrim
(
$classPrefix
,
'_'
)
.
'_'
;
$this
->
setScriptPath
(
$path
);
$this
->
setHelperPath
(
$path
.
'helpers'
,
$classPrefix
.
'Helper'
);
$this
->
setFilterPath
(
$path
.
'filters'
,
$classPrefix
.
'Filter'
);
return
$this
;
}
}
\ No newline at end of file
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