projects
/
diogenes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework plugin handling to access parameters via declareParam, getParamValues, setPara...
[diogenes.git]
/
plugins
/
HttpHeader.php
diff --git
a/plugins/HttpHeader.php
b/plugins/HttpHeader.php
index
9c89fb4
..
ec9dba4
100644
(file)
--- a/
plugins/HttpHeader.php
+++ b/
plugins/HttpHeader.php
@@
-31,8
+31,14
@@
class HttpHeader extends Diogenes_Plugin_Filter
/** Plugin description */
var $description = "This plugin allows you to add an HTTP header to a page.";
/** Plugin description */
var $description = "This plugin allows you to add an HTTP header to a page.";
- /** Plugin parameters */
- var $params = array('contents' => '');
+
+ /** Constructor.
+ */
+ function HttpHeader()
+ {
+ $this->declareParam('contents', '');
+ }
+
/** Apply filtering to the input and return an output.
*
/** Apply filtering to the input and return an output.
*
@@
-40,13
+46,11
@@
class HttpHeader extends Diogenes_Plugin_Filter
*/
function filter($input)
{
*/
function filter($input)
{
- $header = $this->params['contents'];
-
+ $header = $this->getParamValue('contents');
if ($header)
{
header($header);
}
if ($header)
{
header($header);
}
-
return $input;
}
return $input;
}