Example #1
0
 /**
  * Nested blocks will be stored inside $_p
  * @param  string               $block
  * @return Mtpl|null
  * @throws \Exception
  */
 public function __get($block)
 {
     if ($this->reassign) {
         $this->startReassign();
     }
     $this->touchBlock($block);
     if (!array_key_exists($block, $this->_p)) {
         $tpl = new Mtpl();
         $tpl->setTemplate($this->getBlock($block));
         $this->_p[$block] = $tpl;
     }
     return $this->_p[$block];
 }