packethost/packet
Composer 安装命令:
composer require packethost/packet
包简介
The Official PHP library for Packet Host
关键字:
README 文档
README
This repository is Experimental meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.
####Requirements
- PHP Curl Extension
- PHP XSL Extension
Install with Composer
"require": {
"packethost/packet": "dev-master"
},
How to use it
<?php
require __DIR__ . '/vendor/autoload.php';
//Create a configuration object
$config = new PacketHost\Client\Adapter\Configuration\DefaultConfiguration(
'YOUR_API_KEY'
);
//Build the adapter and Api
$adapter = new PacketHost\Client\Adapter\GuzzleAdapter($config);
$api = new PacketHost\Client\PacketApi($adapter);
//Create options array with request params
$options = [
'queryParams' => 'per_page=20'
];
// Fetching projects
$projects = $api->project()->getAll($params);
var_dump($projects);
// Fetching facilities
$facilities = $api->facility()->getAll();
// Fetching Operating Systems
$oses = $api->operatingSystem()->getAll();
// Fetching Plans
$plans = $api->plan()->getAll();
// Creating a device
$device = new \PacketHost\Client\Domain\Device();
$projectId = 'PROJECT_ID';
$device->hostname = 'sample';
$device->facility = $facilities[0]->code;
$device->plan = $plans[0]->slug;
$device->operatingSystem = $oses[0]->slug;
$device = $api->device()->create($projectId, $device);
var_dump($device);
Running the tests
grunt ci
packethost/packet 适用场景与选型建议
packethost/packet 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.18k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2015 年 06 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「packet」 「packet php」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 packethost/packet 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 packethost/packet 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 packethost/packet 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Composer personal web interface. Manage Laravel dependencies without switching to command line!
Packeta plugin for Sylius
Courier‑style DTOs (Packets) for Laravel applications
Alfabank REST API integration
HMAC Http Packet Auth
PHP Packet Capture via libpcap through FFI
统计信息
- 总下载量: 5.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-09