Download the PHP package jhq0113/roach without Composer

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

roach

roach是一个基于composer开发的一个基础工具库,可以嵌入到任何php语言开发的项目当中。

roach使用简单,精简,整个代码库纯代码大小为60K

我的官方网站

https://404.360tryst.com/

安装方式

目录

容器

创建如下app\model\User

依赖注入

Container通过createRoach实现依赖注入,createRoach方法每次运行都会根据配置创建一个全新的对象。

以上例程输出

以上例程输出

无参数方法注入

以上例程会调用一次init方法,运行输出

有参数方法注入

以上例程输出

调用队列

以上例程,会先调用构造函数,然后调用两次setTime方法,以上例程输出

回到目录

依赖注入容器

当向容器中放入一个包含class节点的数组时,容器会在调用get方法时根据数组配置实例化对象。

以上例程输出

回到目录

变量容器

当容器中放入一个非包含class节点数组的任意其他值时,容器只是一个存储变量的容器,且只有一份。

以上例程输出

回到目录

通用异常错误处理

使用roach\exceptions\ErrorHandler处理通用异常与错误

以上例程输出

回到目录

使用事件

事件是通过roach\events\Event实现的,是个trait类型,这样任何一个类只要use了该trait都可以支持事件机制。

使用案例

以上例程输出

回到目录

发送HTTP请求

发送HTTP请求需要通过roach\http\Request类去发送,该类会自动识别httphttps协议请求。

连贯操作发送请求

以上例程输出

回到目录

通过容器发送请求

以上例程输出

回到目录

并行发送多个请求

并行发送多个请求可以通过调用roach\http\Request的静态方法multiRequest实现,参数类型为roach\http\Request,参数个数是动态的,multiRequest方法会按照参数传入的顺序返回请求结果。

以上例程输出

回到目录

我的主页

公众号及QQ群


All versions of roach 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 jhq0113/roach contains the following files

Loading the files please wait ....