Example #1
0
 /**
  * {@inheritdoc}
  * @see JsonSerializable::jsonSerialize()
  */
 public function jsonSerialize()
 {
     $array = ['pathPart' => isset($this->pathPart) ? ['value' => $this->pathPart->value, 'type' => $this->pathPart->type] : null, 'table' => isset($this->table) ? $this->table->jsonSerialize() : null, 'routes' => []];
     if (is_array($this->routes)) {
         foreach ($this->routes as $route) {
             $array['routes'][] = $route->getPath();
         }
     }
     return $array;
 }