本文整理汇总了PHP中Zend_View::getVars方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View::getVars方法的具体用法?PHP Zend_View::getVars怎么用?PHP Zend_View::getVars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_View
的用法示例。
在下文中一共展示了Zend_View::getVars方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getVars
/**
* Return list of all assigned variables
*
* Returns all public properties of the object. Reflection is not used
* here as testing reflection properties for visibility is buggy.
*
* @return array
*/
public function getVars()
{
if (!$this->_vars) {
$this->_vars = parent::getVars();
}
return $this->_vars;
}
示例2: _checkDojoParams
/**
* _checkDojoParams
*
* @return void
*/
private function _checkDojoParams()
{
if (!$this->_front->getRequest()->getParam("__items")) {
$this->_viewRenderer->getResponse()->setException(new ZLayer_Controller_Plugin_Exception('The parameter __items is required in the request'));
} else {
$vars = $this->_view->getVars();
/*
if (!isset($vars[$this->_front->getRequest()->getParam("__data")])) {
//$this->_viewRenderer->getResponse()->setException(new ZLayer_Controller_Plugin_Exception('The key variable in the parameter __data was not found in view'));
}
*/
}
}
示例3: testGetVars
public function testGetVars()
{
$view = new Zend_View();
$view->foo = 'bar';
$view->bar = 'baz';
$view->baz = array('foo', 'bar');
$vars = $view->getVars();
$this->assertEquals(3, count($vars));
$this->assertEquals('bar', $vars['foo']);
$this->assertEquals('baz', $vars['bar']);
$this->assertEquals(array('foo', 'bar'), $vars['baz']);
}