RenderScript.php #1

  • //
  • guest/
  • perforce_software/
  • chronicle/
  • main/
  • library/
  • P4Cms/
  • View/
  • Helper/
  • RenderScript.php
  • View
  • Commits
  • Open Download .zip Download (736 B)
<?php
/**
 * View helper to render an arbitrary script.
 *
 * @copyright   2011 Perforce Software. All rights reserved.
 * @license     Please see LICENSE.txt in top-level folder of this distribution.
 * @version     <release>/<patch>
 */
class P4Cms_View_Helper_RenderScript extends Zend_View_Helper_Abstract
{
    /**
     * Render the given script. Filename must be fully qualified.
     *
     * @param   string  $filename   the full path to the script to render.
     * @return  string  the result of rendering the given script.
     */
    public function renderScript($filename)
    {
        $view = clone $this->view;
        $view->addScriptPath(dirname($filename));
        return $view->render(basename($filename));
    }
}
# Change User Description Committed
#1 16170 perforce_software Move Chronicle files to follow new path scheme for branching.
//guest/perforce_software/chronicle/library/P4Cms/View/Helper/RenderScript.php
#1 8972 Matt Attaway Initial add of the Chronicle source code