예제 #1
0
파일: View.php 프로젝트: heiglandreas/zf2
 /**
  * Retrieve view object
  *
  * @return \Zend\View\View
  */
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $this->_view = new \Zend\View\View($options);
         if (isset($options['doctype'])) {
             $this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
         }
     }
     return $this->_view;
 }
예제 #2
0
 /**
  * String representation of dojo environment
  *
  * @return string
  */
 public function __toString()
 {
     if (!$this->isEnabled()) {
         return '';
     }
     $this->_isXhtml = $this->view->doctype()->isXhtml();
     if (DojoHelper::useDeclarative()) {
         if (null === $this->getDjConfigOption('parseOnLoad')) {
             $this->setDjConfigOption('parseOnLoad', true);
         }
     }
     if (!empty($this->_dijits)) {
         $this->registerDijitLoader();
     }
     $html = $this->_renderStylesheets() . PHP_EOL . $this->_renderDjConfig() . PHP_EOL . $this->_renderDojoScriptTag() . PHP_EOL . $this->_renderLayers() . PHP_EOL . $this->_renderExtras();
     return $html;
 }