本文整理匯總了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));
}