Download the PHP package easyswoole/code-generation without Composer

On this page you can find all versions of the php package easyswoole/code-generation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package code-generation

2.x版本说明

2.x相对于1.x版本,兼容了easyswoole的最新注解组件,支持了新的easyswoole文档自动生成,以及最新的phpunit版本,同时完善了Model->getList返回参数,以及控制器getOne,getListresponse参数注解

code-generation

easyswoole代码生成组件,可使用命令行,代码一键生成业务通用代码,支持代码如下:

安装

使用

::: warning EasySwoole\CodeGeneration\CodeGeneration 方法可自行查看,代码很简单.
:::

注册命令

bootstrap事件Di注入配置项:

执行命令:

初始化:

自定义:

参数:

示例:

独立使用

生成器流程说明

生成器基础配置项

获取数据表结构

所有生成器都依赖于数据表结构对象EasySwoole\ORM\Utility\Schema\Table

Model生成

Model配置项说明

Model方法

Model方法默认生成一个GetList方法,用于获取列表.

::: warning 可参考EasySwoole\CodeGeneration\ModelGeneration\Method\GetList自定义其他方法.再进行注入即可.

:::

Controller生成

Controller 配置项说明

Controller配置项继承与Model配置项

controller生成示例

Controller方法.

Controller支持了5个方法,Add,Delete,GetList,GetOne,Update. 自定义其他方法可参考Model方法自定义.

unitTest

单元测试生成器生成.生成后的文件为作者本人自定义风格代码,需要依赖于BaseUnitTest

unitTest配置项说明

unitTest配置项继承于Model配置项

unitTest生成示例

UnitTest方法.

UnitTest支持了5个方法,Add,Delete,GetList,GetOne,Update. 自定义其他方法可参考Model方法自定义.

初始化类

为了方便开发,提供了Controller,Model,UnitTest的初始化类.

Controller

生成方法:

类内容:

Model

生成方法:

类内容:

UnitTest

生成方法:

类内容:


All versions of code-generation with dependencies

PHP Build Version
Package Version
Requires easyswoole/trigger Version ^1.0
easyswoole/socket Version ^1.0
easyswoole/orm Version ^1.4
nette/php-generator Version ^3.2
easyswoole/http-annotation Version ^2.0
php-curl-class/php-curl-class Version ^8.5
easyswoole/command Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package easyswoole/code-generation contains the following files

Loading the files please wait ....