Latest release: v0.4

Apitte\Console

Content

Installation

This plugin requires Apitte/Core library.

At first you have to register the main extension.

extensions:
    api: Apitte\Core\DI\ApiExtension
1
2

Secondly, add the ConsolePlugin plugin.

api:
    plugins: 
        Apitte\Console\DI\ConsolePlugin:
1
2
3

Configuration

api:
    plugins: 
        Apitte\Console\DI\ConsolePlugin:
        
services:
    - Apitte\Console\Command\RouteDumpCommand
1
2
3
4
5
6

Usage

To execute prepared commands you will need Symfony Console Application. Don't waste your time to implement it and use prepared solution from Contributte/Console.

With Contributte/Console you could call bin/console and see the magic.

php bin/console apitte:<>
1
Command Description
apitte:route:dump List all endpoints and their details

Console

Take a look at Contributte/Console.

Install it via composer.

composer require contributte/console
1

And setup your NEON.

extensions:
    console: Contributte\Console\DI\ConsoleExtension
1
2

At least create <project>/bin/console and make it executable.

#!/usr/bin/env php
<?php

/** @var Nette\DI\Container $container */
$container = require __DIR__ . '/../app/bootstrap.php';

// Get application from DI container.
$application = $container->getByType(Contributte\Console\Application::class);

// Run application.
exit($application->run());
1
2
3
4
5
6
7
8
9
10
11