Download the PHP package qiao520/swoole-logic without Composer

On this page you can find all versions of the php package qiao520/swoole-logic. 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 swoole-logic

Swoole框架业务封装组件 | Logic component for Swoole

Language

介绍

将业务代码抽离封装到一个目录下作为Logic层(Form和Validate)

封装了高效率的表单数据验证规则。

有如下好处:

所谓热加载实现原理

我们平时开发调试时大部分都是在调试业务逻辑代码,所以我将业务逻辑封装在一个目录下(独立一个目录,目录名自定义)。

这个Logic层的PHP文件不会在框架服务(swoft、imi、easyswoole、hyperf等)启动时加载,会在Work进程启动后加载的。

写一个接口(调用swoole的$server->reload())来重载Work进程,而不是重启服务,每次改完业务代码,请求下这个接口让代码重载生效(可以在IDE上新增run配置,可以快速请求该接口来重载)。

Form表单类API

Validate验证规则

结合现有框架使用该组件示例

Form表单验证使用示例

本人对Yii比较喜欢,也对它有一定的了解,这个组件主要是参考了Yii的表单验证用法。 如果你有Yii的开发经验,用起来会很顺手。

接入该组件步骤

环境要求

PHP 7.0 +

想法初衷

看过几个Swoole框架(swoft、imi、easyswoole、hyperf,排名不分先后)

都有一个相同的问题:热加载(代码修改后需要重新启动服务),虽然有些框架专门加了缓存优化了启动速度,不过还是慢。

因为swoole是命令行的运行模式,PHP代码加载后就不会重复加载。

一个健全的系统少不了请求参数数据验证、易维护性,这个组件就是为了帮您轻松做这些事情。

安装

composer require qiao520/swoole-logic

联系我

QQ:380552499

喜欢的朋友点个赞,感谢支持!


All versions of swoole-logic with dependencies

PHP Build Version
Package Version
No informations.
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 qiao520/swoole-logic contains the following files

Loading the files please wait ....