maxcdn/php-maxcdn
Composer 安装命令:
composer require maxcdn/php-maxcdn
包简介
PHP Wrapper for MaxCDN Remote Web Services
README 文档
README
Requirements
- PHP 5.3 or above
- PHP Curl Extension
Installation with Composer
Composer is the recommended way to utilize the MaxCDN RWS SDK PHP library. For more information on how to use Composer, see http://www.getcomposer.org .
- Add "maxcdn/php-maxcdn" as a dependency in your composer.json project file.
{
"require": {
"maxcdn/php-maxcdn": "2.*"
}
}
- Download and install Composer (if not already installed).
curl -sS https://getcomposer.org/installer | php
- Install your package dependencies.
php composer.phar install -o
This will download the MaxCDN library and configure composer to use it. Composer will also build an autoloader for your use in the next step.
- Use Composer's autoloader.
Composer prepares an autoload file which autoloads the RWS library for you on demand. To use it, provide the following at the top of your PHP source files:
require_once '/path/to/vendor/autoload.php';
It is advised that you understand how to optimze Composer's usage in Production environments. For more information about Composer, visit http://getcomposer.org
The libraries are located in the src/ directory. The classes are organized in a PSR-0 hierarchy. You can use any PSR-0 compliant autoloader for this library. Composer is the recommended method (see above).
Usage
<?php $api = new MaxCDN("my_alias","consumer_key","consumer_secret"); // get account information echo $api->get('/account.json'); // delete a file from the cache $params = array('file' => '/robots.txt'); echo $api->delete('/zones/pull.json/6055/cache', $params); ?>
Methods
It has support for GET, POST, PUT and DELETE OAuth signed requests.
maxcdn/php-maxcdn 适用场景与选型建议
maxcdn/php-maxcdn 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 727.89k 次下载、GitHub Stars 达 18, 最近一次更新时间为 2014 年 07 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 maxcdn/php-maxcdn 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 maxcdn/php-maxcdn 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 727.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-07-11