@@ 47-53 (lines=7) @@ | ||
44 | $problem->parameters = RouteParameters::fromArray($params['parameters']); |
|
45 | } |
|
46 | ||
47 | if (isset($params['addresses'])) { |
|
48 | $addresses = array(); |
|
49 | foreach ($params['addresses'] as $address) { |
|
50 | $addresses[] = Address::fromArray($address); |
|
51 | } |
|
52 | $problem->addresses = $addresses; |
|
53 | } |
|
54 | ||
55 | if (isset($params['routes'])) { |
|
56 | $routes = array(); |
@@ 65-72 (lines=8) @@ | ||
62 | $route->parameters = RouteParameters::fromArray($params['parameters']); |
|
63 | } |
|
64 | ||
65 | if (isset($params['addresses'])) { |
|
66 | $addresses = array(); |
|
67 | foreach ($params['addresses'] as $address) { |
|
68 | $addresses[] = Address::fromArray($address); |
|
69 | } |
|
70 | ||
71 | $route->addresses = $addresses; |
|
72 | } |
|
73 | ||
74 | $route->links = Common::getValue($params, 'links', array()); |
|
75 | $route->directions = Common::getValue($params, 'directions', array()); |