2017 © Pedro Peláez
 

library slim-command

Useful command line for slim

image

candrianarijaona/slim-command

Useful command line for slim

  • Wednesday, April 11, 2018
  • by candrianarijaona
  • Repository
  • 1 Watchers
  • 11 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 133 % Grown

The README.md

Slim Framework Command Line

This repository contains a set of useful command lines for slim application. It uses the symfony console component., (*1)

Install

Via composer, (*2)

``` bash $ composer require candrianarijaona/slim-command, (*3)


Requires Slim 3.0.0 or newer. ## Usage First, you need to create a PHP script to define the console application. In this case, let's put it under the directory /bin. Make you sure that your console has an access to your slim app. ```php #!/usr/bin/env php <?php require __DIR__.'/../bootstrap.php'; //The bootstrap file where you init your slim app use Symfony\Component\Console\Application; $application = new Application(); $container = $app->getContainer(); // ... register commands $application->run();

You can register additionnal command using add()., (*4)

Available commands

Container

Display the registered services for an application., (*5)

<?php

use Candrianarijaona\Command\Container\DebugContainerCommand;

$application->add(new DebugContainerCommand($container));

Executing the command:, (*6)

php bin/console debug:container

Controller

Generate a new controller for an application, (*7)

<?php

use Candrianarijaona\Command\Controller\GenerateControllerCommand;

$baseDir  = __DIR__ . '/../app/Example';

$application->add(
    new GenerateControllerCommand($baseDir)
);

Executing the command:, (*8)

php bin/console generate:controller

Router

Display routes for an application., (*9)

<?php

use Candrianarijaona\Command\Router\DebugRouterCommand;

$application->add(new DebugRouterCommand($container->router));

Executing the command:, (*10)

php bin/console debug:router

The Versions

11/04 2018

dev-master

9999999-dev https://github.com/candrianarijaona/slim-command

Useful command line for slim

  Sources   Download

MIT

The Requires

 

by Claude Samuelson Andrianarijaona

slim command slim console

11/04 2018

0.1.0

0.1.0.0 https://github.com/candrianarijaona/slim-command

Useful command line for slim

  Sources   Download

MIT

The Requires

 

by Claude Samuelson Andrianarijaona

slim command slim console

11/04 2018

dev-feature-unit_test

dev-feature-unit_test https://github.com/candrianarijaona/slim-command

Useful command line for slim

  Sources   Download

MIT

The Requires

 

by Claude Samuelson Andrianarijaona

slim command slim console