/usr/share/php/Horde/View/Helper/Capture/ContentFor.php is in php-horde-view 2.0.6-3.
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 | <?php
/**
* Copyright 2007-2008 Maintainable Software, LLC
* Copyright 2008-2016 Horde LLC (http://www.horde.org/)
*
* @author Mike Naberezny <mike@maintainable.com>
* @author Derek DeVries <derek@maintainable.com>
* @author Chuck Hagenbuch <chuck@horde.org>
* @license http://www.horde.org/licenses/bsd
* @category Horde
* @package View
* @subpackage Helper
*/
/**
* An instance of this class is returned by
* Horde_View_Helper_Capture::contentFor().
*
* @author Mike Naberezny <mike@maintainable.com>
* @author Derek DeVries <derek@maintainable.com>
* @author Chuck Hagenbuch <chuck@horde.org>
* @license http://www.horde.org/licenses/bsd
* @category Horde
* @package View
* @subpackage Helper
*/
class Horde_View_Helper_Capture_ContentFor extends Horde_View_Helper_Capture_Base
{
/**
* Name that will become "$this->contentForName".
*
* @var string
*/
private $_name;
/**
* Starts capturing content that will be stored as $view->contentForName.
*
* @param string $name Name of the content that becomes the
* instance variable name.
* "foo" -> "$this->contentForFoo"
* @param Horde_View_Base $view A view object.
*/
public function __construct($name, $view)
{
$this->_name = $name;
$this->_view = $view;
parent::__construct();
}
/**
* Stops capturing content and stores it in the view.
*/
public function end()
{
$name = 'contentFor' . Horde_String::ucfirst($this->_name);
$this->_view->$name = parent::end();
}
}
|