public function Index02Action()
 {
     $array = array('invokables' => array('Training\\Controller\\Index' => 'Training\\Controller\\IndexController', 'Training\\Controller\\Config' => 'Training\\Controller\\ConfigController', 'Training\\Controller\\Autoloader' => 'Training\\Controller\\AutoloaderController', 'Training\\Controller\\Filter' => 'Training\\Controller\\FilterController'));
     $serializer = new \Zend\Serializer\Adapter\PhpCode();
     $str = $serializer->serialize($array);
     echo $str;
     return false;
 }
Example #2
0
 public function index02Action()
 {
     echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>";
     $serializer = new \Zend\Serializer\Adapter\PhpCode();
     $array = array("name" => "trongle", "age" => "23", "IQ" => 10, "handsome" => 10, "talent" => 10);
     $serialize = $serializer->serialize($array);
     echo $serialize;
     $arr = $serializer->unserialize($serialize);
     echo "<pre style='font-weight:bold'>";
     print_r($arr);
     echo "</pre>";
     return false;
 }