Download the PHP package wandoubaba/res without Composer

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

介绍

一个简单的Res模型,包含code、msg、data、time_taked属性,可用于HTTP接口的返回值。

使用方法

安装

使用

属性说明

属性 类型 举例 说明
code int 200 状态码,默认200表示成功
msg string "操作成功" 状态描述
data mix "Hello world." 返回数据,可以是任意类型
time_taked double 0.000014066696166992188 从后端res对象创建到返回结果期间消耗的时间,单位是秒

内置code和msg

通过依赖注入实现自定义错误码

webman框架为例。

参考

关于依赖注入的详细资料请参考:

https://php-di.org/doc/getting-started.html

https://www.workerman.net/doc/webman/di.html


All versions of res with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
php-di/php-di Version ^6.3
doctrine/annotations Version ^1.14
psr/container Version ^1.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 wandoubaba/res contains the following files

Loading the files please wait ....