public function render($template = '', $data = []) {
		if (!isset($this->blocks[$template])) {
			$this->blocks[$template] = $this->blockFactory->create($template);
		}
		$block = $this->blocks[$template];
		$block->setData($data);
		return $block->render();
	}
public function render($template = '', $data = []) {
		if (!isset($this->blocks[$template])) {
			$this->blocks[$template] = $this->blockFactory->create($template);
		}
		$block = $this->blocks[$template];
		$block->setData($data);
		return $block->render();
	}
public function render ( $ template = '' , $ data = [ ] ) { if ( ! isset ( $ this -> blocks [ $ template ] ) ) { $ this -> blocks [ $ template ] = $ this -> blockFactory -> create ( $ template ) ; } $ block = $ this -> blocks [ $ template ] ; $ block -> setData ( $ data ) ; return $ block -> render ( ) ; }
Render a block.

@param string $template
@param array $data
@return string
Render a block .