Я пытаюсь использовать Zend Console и следую документации на их сайте.Это мой код.
module.config.php
"router" => [
"routes" => [
"companies" => [
"type" => "segment",
"options" => [
"route" => "/companies[/:action[/:id]]",
"constraints" => [
"action" => "[a-zA-Z][a-zA-Z0-9_-]*",
"id" => "[0-9]*",
],
"defaults" => [
"controller" => Controller\CompaniesController::class,
"action" => "index",
],
],
],
],
],
"console" => [
"router" => [
"routes" => [
"abc1" => [
"options" => [
"route" => "abc1",
"defaults" => [
"controller" => Controller\Console::class,
"action" => "abc",
],
],
],
],
],
],
Мой контроллер
public function abcAction() {
$request = $this->getRequest();
if (! $request instanceof ConsoleRequest) {
throw new RuntimeException("You can only use this action from a console!");
}
return "Done! abc.\n";
}
Когда я делаю php public/index.php abc1
, он ничего не делает.ничего не показываетмне не хватает какой-либо конфигурации?