servicestack/gistcafe
Composer 安装命令:
composer require servicestack/gistcafe
包简介
gist.cafe utils for PHP
README 文档
README
Useful gist.cafe utils for PHP Apps.
Usage
Simple Usage Example:
require __DIR__ . '/vendor/autoload.php'; use gistcafe\Inspect; $orgName = "php"; $opts = [ "http" => [ "header" => "User-Agent: gist.cafe\r\n" ] ]; $context = stream_context_create($opts); $json = file_get_contents("https://api.github.com/orgs/{$orgName}/repos", false, $context); $orgRepos = array_map(function($x) { $x = get_object_vars($x); return [ "name" => $x["name"], "description" => $x["description"], "url" => $x["url"], "lang" => $x["language"], "watchers" => $x["watchers"], "forks" => $x["forks"], ]; }, json_decode($json)); usort($orgRepos, function($a,$b) { return $b["watchers"] - $a["watchers"]; }); echo "Top 3 {$orgName} GitHub Repos:\n"; Inspect::printDump(array_slice($orgRepos, 0, 3)); echo "\nTop 10 {$orgName} GitHub Repos:\n"; Inspect::printDumpTable(array_map(function($x) { return [ "name" => $x["name"], "lang" => $x["lang"], "watchers" => $x["watchers"], "forks" => $x["forks"], ]; }, array_slice($orgRepos, 0, 10)));
Which outputs:
Top 3 php GitHub Repos:
[
{
name: php-src,
description: The PHP Interpreter,
url: https://api.github.com/repos/php/php-src,
lang: C,
watchers: 29300,
forks: 6484
},
{
name: web-php,
description: The www.php.net site,
url: https://api.github.com/repos/php/web-php,
lang: PHP,
watchers: 565,
forks: 344
},
{
name: php-gtk-src,
description: The PHP GTK Bindings,
url: https://api.github.com/repos/php/php-gtk-src,
lang: C++,
watchers: 192,
forks: 48
}
]
Top 10 php GitHub Repos:
+------------------------------------------------+
| name | lang | watchers | forks |
|------------------------------------------------|
| php-src | C | 29300 | 6484 |
| web-php | PHP | 565 | 344 |
| php-gtk-src | C++ | 192 | 48 |
| web-qa | PHP | 61 | 32 |
| phd | PHP | 55 | 25 |
| web-bugs | PHP | 45 | 55 |
| web-doc-editor | JavaScript | 42 | 29 |
| presentations | HTML | 42 | 19 |
| web-wiki | PHP | 31 | 19 |
| systems | C | 26 | 11 |
+------------------------------------------------+
Features and bugs
Please file feature requests and bugs to the issue tracker.
servicestack/gistcafe 适用场景与选型建议
servicestack/gistcafe 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 01 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 servicestack/gistcafe 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 servicestack/gistcafe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause-Attribution
- 更新时间: 2021-01-27