1. Go to this page and download the library: Download waffle-commons/console library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Waffle\Commons\Console\ConsoleApplication;
use Waffle\Commons\Console\Command\CacheClearCommand;
use Waffle\Commons\Console\Command\RouteListCommand;
$app = new ConsoleApplication(name: 'Waffle', version: '0.1.0-beta0');
$app->add(new CacheClearCommand($cache));
$app->add(new RouteListCommand($router));
exit($app->run()); // argv read from constructor, returns int exit code
final class ConsoleApplication implements ConsoleApplicationInterface
{
public function getName(): string;
public function getVersion(): string;
public function add(CommandInterface $command): void;
public function has(string $name): bool;
public function find(string $name): CommandInterface; // throws CommandNotFoundException
public function all(): array;
public function run(): int; // returns ExitCode::*->value
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.