wuppo/paperclip
Composer 安装命令:
composer require wuppo/paperclip
包简介
PHP CLI
README 文档
README
A PHP CLI tool to manage custom commands.
Setup
- Install the package via composer
- Run
composer installto install the required packages - Create a PHP file that will be used for cli execution (for example
execute.php) - Add the following code to the file:
#!/usr/bin/env php <?php use Paperclip\Enums\ColorOption; use Paperclip\Paperclip; # Composer autoload $autoload = __DIR__ . '/vendor/autoload.php'; if (file_exists($autoload)) { require $autoload; } # Paperclip setup Paperclip::instance() ->setup($argv) ->execute();
Customising Paperclip
You can also customise the look of Paperclip by adding a config array to the Paperclip::instance()->setup() method.
# Paperclip setup Paperclip::instance() ->setup($argv, [ 'name' => 'Paperclip', 'display_subject' => false, 'colors' => [ 'banner' => [ 'row' => ColorOption::DARK_GRAY->value, 'braces' => ColorOption::LIGHT_RED->value, 'slashes' => ColorOption::LIGHT_RED->value, 'title' => ColorOption::WHITE->value, ], 'info' => [ 'title' => ColorOption::YELLOW->value, 'text' => ColorOption::LIGHT_GRAY->value, 'description' => ColorOption::WHITE->value, 'highlight' => ColorOption::GREEN->value, 'parameter' => ColorOption::WHITE->value, ], 'notes' => [ 'title' => ColorOption::MAGENTA->value, 'text' => ColorOption::WHITE->value, 'highlight' => ColorOption::LIGHT_YELLOW->value, 'bullet' => ColorOption::MAGENTA->value, ] ] ] ) ->execute();
(This example shows the default settings)
Creating commands
From the root of your project you can add Commands however you like. The default structure is classes/Commands/... (in composer: NAMESPACE/Commands/...)
Make the new command be a child of the Command.php class and register this in the
paperclip.commands.json file in the root of your project.
Example:
[
'NAMESPACE/Commands/ExampleCommand'
]
Composer packages
- "google/apiclient" - "vlucas/phpdotenv" - "google/analytics-data"
PHP Required Extensions
- "bcmath" - "calendar" - "Core" - "ctype" - "date" - "dom" - "exif" - "FFI" - "fileinfo" - "filter" - "ftp" - "gettext" - "hash" - "iconv" - "json" - "libxml" - "mbstring" - "openssl" - "pcntl" - "pcre" - "PDO" - "Phar" - "posix" - "random" - "readline" - "Reflection" - "session" - "shmop" - "SimpleXML" - "sockets" - "sodium" - "SPL" - "standard" - "sysvmsg" - "sysvsem" - "sysvshm" - "tokenizer" - "xml" - "xmlreader" - "xmlwriter" - "xsl" - "Zend OPcache" - "zlib"
wuppo/paperclip 适用场景与选型建议
wuppo/paperclip 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 101 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 03 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wuppo/paperclip 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wuppo/paperclip 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 101
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-24