mirror of
https://github.com/flarum/framework.git
synced 2025-02-25 04:25:42 +08:00
Typehint Frontend extender arguments
This commit is contained in:
parent
d4bf453a5b
commit
7250e28700
@ -27,26 +27,26 @@ class Frontend implements ExtenderInterface
|
|||||||
protected $routes = [];
|
protected $routes = [];
|
||||||
protected $content = [];
|
protected $content = [];
|
||||||
|
|
||||||
public function __construct($frontend)
|
public function __construct(string $frontend)
|
||||||
{
|
{
|
||||||
$this->frontend = $frontend;
|
$this->frontend = $frontend;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function css($path)
|
public function css(string $path)
|
||||||
{
|
{
|
||||||
$this->css[] = $path;
|
$this->css[] = $path;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function js($path)
|
public function js(string $path)
|
||||||
{
|
{
|
||||||
$this->js = $path;
|
$this->js = $path;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function route($path, $name, $content = null)
|
public function route(string $path, string $name, $content = null)
|
||||||
{
|
{
|
||||||
$this->routes[] = compact('path', 'name', 'content');
|
$this->routes[] = compact('path', 'name', 'content');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user