本文整理汇总了PHP中Zend\Dojo\Dojo类的典型用法代码示例。如果您正苦于以下问题:PHP Dojo类的具体用法?PHP Dojo怎么用?PHP Dojo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Dojo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*
* @return void
*/
public function setUp()
{
$registry = Registry::getInstance();
if (isset($registry['Zend\\Dojo\\View\\Helper\\Dojo'])) {
unset($registry['Zend\\Dojo\\View\\Helper\\Dojo']);
}
$this->view = new View\PhpRenderer();
\Zend\Dojo\Dojo::enableView($this->view);
}
示例2: getDojo
/**
* Retrieve Dojo View Helper
*
* @return Zend_Dojo_View_Dojo_Container
*/
public function getDojo()
{
if (null === $this->_dojo) {
$this->getBootstrap()->bootstrap('view');
$view = $this->getBootstrap()->view;
\Zend\Dojo\Dojo::enableView($view);
$view->dojo()->setOptions($this->getOptions());
$this->_dojo = $view->dojo();
}
return $this->_dojo;
}
示例3: getDojo
/**
* Retrieve Dojo View Helper
*
* @return Zend_Dojo_View_Dojo_Container
*/
public function getDojo()
{
if (null === $this->_dojo) {
$this->getBootstrap()->bootstrap('view');
$view = $this->getBootstrap()->view;
\Zend\Dojo\Dojo::enableView($view);
$dojoContainer = $view->broker('dojo')->direct()->setOptions($this->getOptions());
$this->_dojo = $dojoContainer;
}
return $this->_dojo;
}
示例4: getDojo
/**
* Retrieve Dojo View Helper
*
* @return Zend_Dojo_View_Dojo_Container
*/
public function getDojo()
{
if (null === $this->_dojo) {
$this->getBootstrap()->bootstrap('view');
$view = $this->getBootstrap()->view;
DojoConfigurator::enableView($view);
$dojo = $view->plugin('dojo');
$dojoContainer = $dojo();
$dojoContainer->setOptions($this->getOptions());
$this->_dojo = $dojoContainer;
}
return $this->_dojo;
}
示例5: getView
public function getView()
{
$view = new View();
\Zend\Dojo\Dojo::enableView($view);
return $view;
}
示例6: testDisableViewShouldUnregisterDojoViewHelpers
public function testDisableViewShouldUnregisterDojoViewHelpers()
{
$view = new View\PhpRenderer();
\Zend\Dojo\Dojo::enableView($view);
$this->assertInstanceOf('Zend\\Dojo\\View\\Helper\\Dojo', $view->plugin('dojo'));
\Zend\Dojo\Dojo::disableView($view);
try {
$view->plugin('dojo');
$this->fail('RuntimeException was expected but not thrown');
} catch (\Zend\Loader\Exception\RuntimeException $e) {
// success
}
}
示例7: testEnableViewShouldSetAppropriateViewHelperPaths
public function testEnableViewShouldSetAppropriateViewHelperPaths()
{
$view = new View();
\Zend\Dojo\Dojo::enableView($view);
$helperLoader = $view->getPluginLoader('helper');
$paths = $helperLoader->getPaths('Zend\\Dojo\\View\\Helper');
$this->assertTrue(is_array($paths));
}