示例#1
0
 public function &block($a_name)
 {
     if (isset($this->m_block[$a_name])) {
         return $this->m_block[$a_name];
     }
     $file = null;
     $file = ZLoader::_loadFile($a_name, 'view', 'ZView');
     if (!$file || empty($file)) {
         trigger_error('Block ' . $a_name . ' not found.');
     }
     $block = new ZViewBlock($this->getParent(), 'ViewBlock');
     $block->setViewFile($file);
     $this->m_block[$a_name] =& $block;
     return $this->m_block[$a_name];
 }