Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
6ea8a477
Commit
6ea8a477
authored
Feb 21, 2008
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split of methods in _parseTemplate in 0.10 and trunk
parent
d6ec5d6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
Layout.php
lib/Doctrine/Pager/Layout.php
+33
-1
No files found.
lib/Doctrine/Pager/Layout.php
View file @
6ea8a477
...
...
@@ -415,6 +415,24 @@ class Doctrine_Pager_Layout
* @return string
*/
protected
function
_parseTemplate
(
$options
=
array
())
{
$str
=
$this
->
_parseUrlTemplate
(
$options
);
$replacements
=
$this
->
_parseReplacementsTemplate
(
$options
);
return
strtr
(
$str
,
$replacements
);
}
/**
* _parseUrlTemplate
*
* Processes the url mask to return the correct template depending of the options sent.
* Already process the mask replacements assigned.
*
* @param $options Optional parameters to be applied in template and url mask
* @return string
*/
protected
function
_parseUrlTemplate
(
$options
=
array
())
{
$str
=
''
;
...
...
@@ -428,6 +446,20 @@ class Doctrine_Pager_Layout
$str
=
$this
->
_parseMaskReplacements
(
$this
->
getTemplate
());
}
return
$str
;
}
/**
* _parseUrl
*
* Process the url mask of a given page and return the processed url
*
* @param $options Optional parameters to be applied in template and url mask
* @return string
*/
protected
function
_parseReplacementsTemplate
(
$options
=
array
())
{
// Defining "url" options index to allow {%url} mask
$options
[
'url'
]
=
$this
->
_parseUrl
(
$options
);
...
...
@@ -437,7 +469,7 @@ class Doctrine_Pager_Layout
$replacements
[
'{%'
.
$k
.
'}'
]
=
$v
;
}
return
strtr
(
$str
,
$replacements
)
;
return
$replacements
;
}
...
...
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