src/ViewHelper/AbstractViewHelper.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Syna\ViewHelper;

use Syna\View;

/**
 * Class AbstractViewHelper
 *
 * @package Syna\ViewHelper
 * @author Thomas Flori <thflori@gmail.com>
 * @method string escape(string $string)
 * @method mixed batch($var, string $functions)
 */
abstract class AbstractViewHelper implements ViewHelperInterface
{
    /** @var View */
    protected $view;

    public function __call($name, $arguments)
    {
        return call_user_func_array([$this->view, $name], $arguments);
    }

    public function setView(View $view)
    {
        $this->view = $view;
    }
}