如何从zend 2中的控制器调用并传递数组数据到布局?

Here is my Code, how to and pass data from controller to layout

   $arr = array();
   $arr['layout'] = 'example';
   $this->layout()->calllayout = $arr;

try like this

$this->layout()->setVariable('var', $data);

Before ViewModel Write serVariable by $this->layout() like:

$arr = array();
$arr['layout'] = 'example';
$this->layout()->setVariable('variableName', $arr);

and Access it like :

echo $this->variableName['layout'];