maxcdn/php-maxcdn 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maxcdn/php-maxcdn

最新稳定版本:2.1.0

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 .

  1. Add "maxcdn/php-maxcdn" as a dependency in your composer.json project file.
{
    "require": {
        "maxcdn/php-maxcdn": "2.*"
    }
}
  1. Download and install Composer (if not already installed).
curl -sS https://getcomposer.org/installer | php
  1. 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.

  1. 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.

统计信息

  • 总下载量: 715.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 8
  • Forks: 20
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-11