make not static and public
This commit is contained in:
@@ -9,23 +9,24 @@ use \Psr\Http\Message\{ResponseInterface, ServerRequestInterface};
|
||||
|
||||
final class Bootstrap extends Controller
|
||||
{
|
||||
static public function getBootstrapScript(ServerRequestInterface $request): ResponseInterface
|
||||
public function getBootstrapScript(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
return new Text(
|
||||
text: file_get_contents(getcwd() . '/vendor/twbs/bootstrap/dist/jss/bootstrap.js'),
|
||||
headers: ['Content-Type' => ['application/javascript; charset=utf-8']]);
|
||||
}
|
||||
|
||||
static public function getBootstrapStyle(ServerRequestInterface $request): ResponseInterface
|
||||
public function getBootstrapStyle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
return new Text(
|
||||
text: file_get_contents(getcwd() . '/vendor/twbs/bootstrap/dist/jss/bootstrap.js'),
|
||||
headers: ['Content-Type' => ['text/css; charset=utf-8']]);
|
||||
}
|
||||
|
||||
static protected function mapRoutes(Container $container, \Potter\Router\Router $router): void
|
||||
protected function mapRoutes(Container $container, \Potter\Router\Router $router): void
|
||||
{
|
||||
$router->map('GET', '/bootstrap.js', [self::class, 'getBootstrapScript']);
|
||||
$router->map('GET', '/bootstrap.css', [self::class, 'getBootstrapStyle']);
|
||||
|
||||
$router->map('GET', '/bootstrap.js', [$this, 'getBootstrapScript']);
|
||||
$router->map('GET', '/bootstrap.css', [$this, 'getBootstrapStyle']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user