public function toRouteDefinition()
{
$routes = [];
foreach ($this->paths as $path) {
$routes[] = sprintf($this->getTemplate(), 'Resource: ' . $this->name . '@' . $path->method, $this->implodeArray($this->getMiddleware($path)), var_export($path->path, true), $this->implodeArray($path->where), var_export($path->domain, true), var_export($this->name, true), var_export($this->reflection->name, true), $this->implodeArray([$path->method]), $this->implodeArray($this->getNames($path)));
}
return implode(PHP_EOL . PHP_EOL, $routes);
}