定制 luismulinari/consoleful 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

luismulinari/consoleful

Composer 安装命令:

composer require luismulinari/consoleful

包简介

A simple library to work with Symfony Console Component and Symfony Dependency Injection Component

README 文档

README

A simple library to work with Symfony Console Component and Symfony Dependency Injection Component

======= Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage

Instalation

Use composer to add consoleful to your app

"luismulinari/consoleful": "*"

Usage (example)

application.php - Entry Point

<?php
use Lcobucci\DependencyInjection\ContainerConfig;
use LuisMulinari\Consoleful\Application;

$autoloader = require __DIR__ . '/vendor/autoload.php';

$application = new Application(
    'Application name',
    'Version',
    new ContainerConfig(__DIR__ . 'services.xml') // services.[xml|yml|php]
);

$application->add(new ExampleCommand());

$application->run();

ExampleCommand.php - Command file

<?php

namespace Vendor\ExampleApp\Command;

use LuisMulinari\Consoleful\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;

class ExampleCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this->setName("example");
        $this->setDescription('Description example');
    }
    
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getContainer();
        
        $container->get('service.example');
        $container->getParameter('parameter.example');
    }
}

You can see other examples here

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固