Download the PHP package rocareer/webman-status-code without Composer

On this page you can find all versions of the php package rocareer/webman-status-code. 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 webman-status-code

rocareer/webman-status-code

Webman 统一错误码/状态码插件:一套与 rocareer/radmin 3.2+ 完全对齐的状态码定义(含中文消息与 getMessage()),随插件复制安装到宿主项目 support/,并提供 scode:run 命令扫描代码库自动重生成状态码类。

安装

dev 全家桶(dev/full、dev/luoling)已通过 path 仓库钉版 v1.0.3 接入。

使用

常用码段(完整列表见 src/support/StatusCode.php):

码 常量 含义
10001 USER_NOT_FOUND 用户不存在
10010 PASSWORD_ERROR 密码错误
10015 LOGIN_FAILED 登录失败
10016 NOT_LOGIN 未登录
10030 VALIDATION_ERROR 校验失败
10046 ACCESS_DENIED 访问权限不足
10047 TOKEN_GENERATE_FAILED Token 生成失败
10048 MEMBER_LOGGED_IN_ELSEWHERE 账号已在其他地方登录

代码生成命令

注意:命令直接覆写状态码类源文件,生成结果需人工 review 后再提交;已发布的码值只增不改,避免前端/客户端依赖旧值。

配置(config/plugin/rocareer/webman-status-code/app.php)

类参考

类 说明
support\StatusCode 状态码常量 + MESSAGES + getMessage()(复制到宿主项目 support/,使用侧唯一入口)
Rocareer\WebmanStatusCode\Code 错误码编号规范工具:getSystemCode('201') → 3 位系统标识(截断/补零)
Rocareer\WebmanStatusCode\command\StatusCodeCommand scode:run 命令实现(Symfony Console)
Rocareer\WebmanStatusCode\Install webman 插件安装/卸载(复制/移除 support 与配置)

历史遗留(只读,勿引用)

与 radmin 的同步约定

src/support/StatusCode.php 必须与 rocareer/radmin 内置 support\StatusCode 保持 diff 一致(radmin 升级新增状态码时同步本包,参考 v1.0.3 变更记录)。

卸载

仅移除插件复制的 support/StatusCode.php 与 config/plugin/rocareer/webman-status-code/;宿主项目已改写的业务代码需自行处理。


All versions of webman-status-code with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
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 rocareer/webman-status-code contains the following files

Loading the files please wait ...