/usr/share/php/Horde/View/Helper/Base.php is in php-horde-view 2.0.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | <?php
/**
* @category Horde
* @package View
* @subpackage Helper
*/
/**
* Abstract class for Horde_View_Helper objects.
*
* All helpers hold a link back to the instance of the view. The undefined
* property handlers (__get()/__call() methods) are used to mix helpers
* together, effectively placing them on the same pane of glass (the view) and
* allowing any helper to call any other.
*
* @category Horde
* @package View
* @subpackage Helper
*/
abstract class Horde_View_Helper_Base
{
/**
* The parent view invoking the helper.
*
* @var Horde_View
*/
protected $_view;
/**
* Creates a helper for $view.
*
* @param Horde_View $view The view to help.
*/
public function __construct($view)
{
$this->_view = $view;
$view->addHelper($this);
}
/**
* Proxy on undefined property access (get).
*/
public function __get($name)
{
return $this->_view->$name;
}
/**
* Proxy on undefined property access (set).
*/
public function __set($name, $value)
{
return $this->_view->$name = $value;
}
/**
* Call chaining so members of the view can be called (including other
* helpers).
*
* @param string $method The method.
* @param array $args The parameters for the method.
*
* @return mixed The result of the method.
*/
public function __call($method, $args)
{
return call_user_func_array(array($this->_view, $method), $args);
}
}
|