Filter::process()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2013-2016
4
 *
5
 * @category  Library
6
 * @package   Dwoo
7
 * @author    Jordi Boggiano <[email protected]>
8
 * @author    David Sanchez <[email protected]>
9
 * @copyright 2008-2013 Jordi Boggiano
10
 * @copyright 2013-2016 David Sanchez
11
 * @license   http://dwoo.org/LICENSE Modified BSD License
12
 * @version   1.3.0
13
 * @date      2016-09-19
14
 * @link      http://dwoo.org/
15
 */
16
17
namespace Dwoo;
18
19
/**
20
 * Base class for filters.
21
 * This software is provided 'as-is', without any express or implied warranty.
22
 * In no event will the authors be held liable for any damages arising from the use of this software.
23
 */
24
abstract class Filter
25
{
26
    /**
27
     * The dwoo instance that runs this filter.
28
     *
29
     * @var Core
30
     */
31
    protected $dwoo;
32
33
    /**
34
     * Constructor, if you override it, call parent::__construct($dwoo); or assign
35
     * the dwoo instance yourself if you need it.
36
     *
37
     * @param Core $dwoo the dwoo instance that runs this plugin
38
     */
39
    public function __construct(Core $dwoo)
40
    {
41
        $this->dwoo = $dwoo;
42
    }
43
44
    /**
45
     * Processes the input and returns it filtered.
46
     *
47
     * @param string $input the template to process
48
     *
49
     * @return string
50
     */
51
    abstract public function process($input);
52
}
53