Пример #1
0
 /**
  * Get an instance of the block from the block name
  * 
  * @param string $block
  * @param array $attributes
  * @return Core_Block_Abstract 
  */
 protected function _getBlockInstance($block, array $attributes = array())
 {
     $block = App_Main::getBlockInstance($block, $attributes);
     if (empty($block)) {
         App_Main::throwException('Invalid block type: %s', $block);
     }
     if (!$block instanceof Core_Block_Abstract) {
         App_Main::throwException('Invalid block type: %s', $block);
     }
     return $block;
 }