1<?php
2
3/**
4 * base class for filters
5 *
6 * This software is provided 'as-is', without any express or implied warranty.
7 * In no event will the authors be held liable for any damages arising from the use of this software.
8 *
9 * @author     Jordi Boggiano <j.boggiano@seld.be>
10 * @copyright  Copyright (c) 2008, Jordi Boggiano
11 * @license    http://dwoo.org/LICENSE   Modified BSD License
12 * @link       http://dwoo.org/
13 * @version    1.0.0
14 * @date       2008-10-23
15 * @package    Dwoo
16 */
17abstract class Dwoo_Filter
18{
19	/**
20	 * the dwoo instance that runs this filter
21	 *
22	 * @var Dwoo
23	 */
24	protected $dwoo;
25
26	/**
27	 * constructor, if you override it, call parent::__construct($dwoo); or assign
28	 * the dwoo instance yourself if you need it
29	 *
30	 * @param Dwoo_Core $dwoo the dwoo instance that runs this plugin
31	 */
32	public function __construct(Dwoo_Core $dwoo)
33	{
34		$this->dwoo = $dwoo;
35	}
36
37	/**
38	 * processes the input and returns it filtered
39	 *
40	 * @param string $input the template to process
41	 * @return string
42	 */
43	abstract public function process($input);
44}
45