定制 inroutephp/console 二次开发

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

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

inroutephp/console

Composer 安装命令:

composer create-project inroutephp/console

包简介

Inroute compilation tool for the command line.

README 文档

README

Inroute

inroutephp/console

Packagist Version Build Status

Inroute compilation tool for the command line.

Installation

The inroute console component should be installed as a development dependency. To execute a compiled router however the inroute runtime must be avaliable. That leaves us with a two step installation process:

composer require inroutephp/inroute
composer require --dev inroutephp/console

Build configuration

By default the build configuration is read from a file named inroute.json in the current working directory. A simple configuration file can look like:

{
    "source-dir": "src/Controller",
    "source-prefix": "MyApp\\Controller",
    "target-filename": "src/HttpRouter.php",
    "target-namespace": "MyApp",
    "target-classname": "HttpRouter"
}

The following is a list of possible configuration values:

autoload

Path to project autoloader. Defaults to vendor/autoload.php.

container

The classname of a compile time container. Only needed if compile time objects have dependencies that needs to be injected.

bootstrap

Classname of compile time bootstrap script. Should normally not be needed.

source-dir

Directory to scan for annotated routes. Relative to current working dir.

source-prefix

psr-4 namespace prefix to use when scanning directory. Found .php files are assumed to contain classes with this namespace prefix.

source-classes

Array of source classnames, use instead of or togheter with directory scanning.

ignore-annotations

Array of annotations to ignore during compilation.

route-factory

Classname of route factory, default should normally be fine.

compiler

Classname of compiler, default should normally be fine.

core-compiler-passes

Array of core compiler passes, default should normally be fine.

compiler-passes

Array of custom compiler passes.

code-generator

The code generator to use, default should normally be fine.

target-filename

Path to router dump destination. If this file exists it will be overwritten.

target-namespace

The namespace of the generated router (defaults to no namespace).

target-classname

The classname of the generated router (defaults to HttpRouter).

Usage

Building

To build project router simply run

vendor/bin/inroute build

For mor information

vendor/bin/inroute build -h

Debugging

To view debug information on the generated router run

vendor/bin/inroute debug

For more conprehensive output try

vendor/bin/inroute debug -v

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2018-12-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固