useallfive/doctrine-web-console 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

useallfive/doctrine-web-console

Composer 安装命令:

composer require useallfive/doctrine-web-console

包简介

Doctrine Web Console Service Provider

README 文档

README

SensioLabsInsight

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).

Installation

Via composer:

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

Mount the controller provider to the /console path.

<?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.

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.

<?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.

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.

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

统计信息

  • 总下载量: 4.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 25
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-10-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固