Added FormViewHelper @method form() to PHPView
This commit is contained in:
@ -5,8 +5,6 @@
|
|||||||
* @package Majestic
|
* @package Majestic
|
||||||
* @subpackage View
|
* @subpackage View
|
||||||
* @since 2010-02-25
|
* @since 2010-02-25
|
||||||
* @version SVN: $Id$
|
|
||||||
* @filesource $URL$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,15 +13,20 @@
|
|||||||
* @method HeadViewHelper head() head(string $string = false) Append another string to HEAD section of Layout
|
* @method HeadViewHelper head() head(string $string = false) Append another string to HEAD section of Layout
|
||||||
* @method MsgViewHelper msg() msg(string $msg = null, string $type = null) Set a message to display for user in Layout
|
* @method MsgViewHelper msg() msg(string $msg = null, string $type = null) Set a message to display for user in Layout
|
||||||
* @method TitleViewHelper title() title(string $string = false) Append another section for TITLE of Layout
|
* @method TitleViewHelper title() title(string $string = false) Append another section for TITLE of Layout
|
||||||
|
* @method FormViewHelper form() form(string $form = null) Get form values from session
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class PHPView implements iView
|
class PHPView implements iView
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $path = '';
|
protected $path = '';
|
||||||
|
|
||||||
protected $variables = array();
|
protected $variables = array();
|
||||||
|
|
||||||
protected $helpers = array();
|
protected $helpers = array();
|
||||||
|
|
||||||
protected $extension = '.phtml';
|
protected $extension = '.phtml';
|
||||||
|
|
||||||
protected $template = '';
|
protected $template = '';
|
||||||
|
|
||||||
public function __construct($config)
|
public function __construct($config)
|
||||||
@ -97,7 +100,7 @@ class PHPView implements iView
|
|||||||
ob_start();
|
ob_start();
|
||||||
if (!is_readable($this->template)) {
|
if (!is_readable($this->template)) {
|
||||||
ob_clean();
|
ob_clean();
|
||||||
throw new GeneralException('Template "' . $this->template .'" not found.');
|
throw new GeneralException('Template "' . $this->template . '" not found.');
|
||||||
}
|
}
|
||||||
include($this->template);
|
include($this->template);
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
|
Reference in New Issue
Block a user