Exemplo n.º 1
0
 public static function fromArray(array $array)
 {
     $route = new self();
     foreach ($array as $name => $value) {
         $route->{$name} = $value;
     }
     if ($route->endPoint && substr($route->endPoint, 0, 2) == 'C:') {
         $route->endPoint = unserialize($route->endPoint);
     }
     if ($route->to) {
         $route->to = ActionToken::fromArray($route->to);
     }
     return $route;
 }