Adapter::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Copyright (c) 2013-2016
4
 *
5
 * @category  Library
6
 * @package   Dwoo\Smarty\Processor
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-23
14
 * @link      http://dwoo.org/
15
 */
16
17
namespace Dwoo\Smarty\Processor;
18
19
use Dwoo\Processor;
20
21
/**
22
 * Class Adapter
23
 */
24
class Adapter extends Processor
25
{
26
    public $callback;
27
28
    /**
29
     * @param string $input
30
     *
31
     * @return mixed
32
     */
33
    public function process($input)
34
    {
35
        return call_user_func($this->callback, $input);
36
    }
37
38
    /**
39
     * @param $callback
40
     */
41
    public function registerCallback($callback)
42
    {
43
        $this->callback = $callback;
44
    }
45
}