candrianarijaona/slim-command 问题修复 & 功能扩展

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

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

candrianarijaona/slim-command

Composer 安装命令:

composer require candrianarijaona/slim-command

包简介

Useful command line for slim

README 文档

README

This repository contains a set of useful command lines for slim application. It uses the symfony console component.

Install

Via composer

$ composer require candrianarijaona/slim-command

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.

#!/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().

Available commands

Container

Display the registered services for an application.

<?php

use Candrianarijaona\Command\Container\DebugContainerCommand;

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

Executing the command:

php bin/console debug:container

Controller

Generate a new controller for an application

<?php

use Candrianarijaona\Command\Controller\GenerateControllerCommand;

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

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

Executing the command:

php bin/console generate:controller

Router

Display routes for an application.

<?php

use Candrianarijaona\Command\Router\DebugRouterCommand;

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

Executing the command:

php bin/console debug:router

统计信息

  • 总下载量: 76
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固