- Removed dependencies from unexisting methods
This commit is contained in:
parent
f5317f906d
commit
d2202066ba
|
@ -19,7 +19,7 @@ trait LeanApiTrait
|
|||
|
||||
if (str_contains($markdown, '{route:descriptor}'))
|
||||
{
|
||||
$describe = (new RouteDescriptor($this))->describe();
|
||||
$describe = (new RouteDescriptor($this, $this->picea->compiler->getExtensionFromToken('url')))->describe();
|
||||
$markdown = str_replace('{route:descriptor}', $describe, $markdown);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@ namespace Lean\Api;
|
|||
use Lean\Factory\HttpFactory;
|
||||
use Notes\ObjectReflection;
|
||||
use Notes\Route\Attribute\Method\Route;
|
||||
|
||||
use function CSSLSJ\Reprise\Api\View\{ _, lang, url, route, form };
|
||||
use Picea\Extension\UrlExtension;
|
||||
|
||||
class RouteDescriptor
|
||||
{
|
||||
|
@ -20,6 +19,7 @@ HTML;
|
|||
|
||||
public function __construct(
|
||||
public object $controller,
|
||||
protected UrlExtension $urlExtension,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +40,7 @@ HTML;
|
|||
$route = $routeAttribute->object;
|
||||
$path = rtrim($route->route, '/');
|
||||
$cleaned = $this->cleanRouteFromRegex($base.$path);
|
||||
$url = url($cleaned);
|
||||
$url = $this->urlExtension->buildUrl($cleaned);
|
||||
|
||||
$html .= sprintf($this->routeLine, $url, $base.$path, $cleaned, $route->description, implode(', ', (array)$route->method), $route->name );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue