2017 © Pedro Peláez
 

library doctrine-web-console

Doctrine Web Console Service Provider

image

useallfive/doctrine-web-console

Doctrine Web Console Service Provider

  • Monday, January 13, 2014
  • by m14t
  • Repository
  • 23 Watchers
  • 6 Stars
  • 4,021 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Doctrine Web Console for Silex

SensioLabsInsight, (*1)

The doctrine web console allows one to execute doctrine console commands via web browser. This is especially useful when one is required to execute commands in an enviroment which does not allow shell access (e.g. Google App Engine)., (*2)

Installation

Via composer:, (*3)

php composer.phar require useallfive/doctrine-web-console dev-master

Mount the controller provider to the /console path., (*4)

<?php
$app = new Silex\Application();
// ...
$app->mount(
        '/console',
        new \UseAllFive\DoctrineWebConsole\ConsoleControllerProvider()
    )
;
$app->run();

You're all set! Visit the the /console url of your site to use., (*5)

Specifying a command path

If a command path is not specified, commands will be executed in the current working directory of the console controller (the web directory of your project). While this is fine for most commands, it's not ideal for a command which requires a path. You can specify a path in the first argument of the ConsoleControllerProvider constructor., (*6)

<?php
$app = new Silex\Application();
// ...
$app->mount(
        '/console',
        new \UseAllFive\DoctrineWebConsole\ConsoleControllerProvider(__DIR__)
    )
;
$app->run();

Adding commands

Adding your own Doctrine commands to the web console is trivial. We'll add the Doctrine DataFixtures Command for this example., (*7)

The second argument of the ConsoleControllerProvider constructor takes an array of Symfony\Component\Console\Command\Command instances which is then passed to the Doctrine ConsoleRunner., (*8)

<?php
$app = new Silex\Application();
// ...
$app->mount(
        '/console',
        new \UseAllFive\DoctrineWebConsole\ConsoleControllerProvider(
            __DIR__,
            array(
                new \UseAllFive\Command\LoadDataFixturesDoctrineCommand(),
            )
        )
    )
;
$app->run();

The Versions

13/01 2014

dev-master

9999999-dev

Doctrine Web Console Service Provider

  Sources   Download

MIT

The Requires

 

by Zach Brown

orm console silex doctrine web pimple

13/01 2014

v0.1.1

0.1.1.0

Doctrine Web Console Service Provider

  Sources   Download

MIT

The Requires

 

by Zach Brown

orm console silex doctrine web pimple

20/11 2013

dev-fix-composer-deps

dev-fix-composer-deps

Doctrine Web Console Service Provider

  Sources   Download

MIT

The Requires

 

by Zach Brown

orm console silex doctrine web pimple

02/11 2013

v0.1.0

0.1.0.0

Doctrine Web Console Service Provider

  Sources   Download

MIT

The Requires

 

by Zach Brown

orm console silex doctrine web pimple