X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FHttpHeader.php;h=ec9dba43e247d1399924e1921441ab36bf4f5fb0;hb=b2c16bf312cd037e252e568974a5523407e42099;hp=9c89fb4d600d4361661a4949ed82243bfd27a1c6;hpb=7bece6dda8f9092028ce2ecd469edc29338f3828;p=diogenes.git diff --git a/plugins/HttpHeader.php b/plugins/HttpHeader.php index 9c89fb4..ec9dba4 100644 --- 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 parameters */ - var $params = array('contents' => ''); + + /** Constructor. + */ + function HttpHeader() + { + $this->declareParam('contents', ''); + } + /** Apply filtering to the input and return an output. * @@ -40,13 +46,11 @@ class HttpHeader extends Diogenes_Plugin_Filter */ function filter($input) { - $header = $this->params['contents']; - + $header = $this->getParamValue('contents'); if ($header) { header($header); } - return $input; }