shardimage/yii2-shardimage 问题修复 & 功能扩展

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

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

shardimage/yii2-shardimage

最新稳定版本:1.0.0-alpha7

Composer 安装命令:

composer require shardimage/yii2-shardimage

包简介

yii2-shardimage package

README 文档

README

Packagist Packagist GitHub issues Packagist Version PHP from Packagist

Yii2 Wrapper for Shardimage PHP

Installation

The preferred way to install this extension is through composer.

composer require shardimage/yii2-shardimage

Usage

Once the extension is installed, simply use it in your code by:

Config

'components' => [
    // ...
    'shardimage' => [
        // Component class
        'class' => \shardimage\yii2shardimage\Component::class,
    // Useful defaults:
        // Default cloud ID
        'cloudId' => 'R0Cu47n0',
    // Authentication:
        // API key (generated on shardimage.com)
        'apiKey' => '6174447875126537682',
        // API secret (generated on shardimage.com)
        'apiSecret' => '5Tgzi4InVtbuKRao0LYBv4rfkGp7SFZgC6cXymsf',
        // Image secret (generated on shardimage.com)
        'imageSecret' => 'XUEpxvCkHcKWf0qL89uy1tbezR5FONQYiSM7mn4j',
        // One-time API access token
        'apiAccessToken' => '0uiW-qKOIjIcAdt8LEMnusose5XV8qEb6351ZFaN',
        // One-time API access token secret
        'apiAccessTokenSecret' => 'g37rei4353frj5746',
        // API key, secret and cloud ID in URL format
        'apiConfig' => 'apiKey:apiSecret@cloudId',
    // Hosts & proxy:
        // Host for serving images, default: https://img.shardimage.com
        'imageHost' => 'https://img.shardimage.com',
        // API host, default: https://api.shardimage.com
        'apiHost' => 'https://api.shardimage.com',
        // Proxy in HTTP communication
        'proxy' => 'http://127.0.0.1:8080',
    // Caching:
        // Cache instance for the Etag handler
        'cache' => new \yii\caching\FileCache(),
        // Cache expiration in seconds, in accordance with the used caching mechanism
        'cacheExpiration' => 3600,
    // Logging:
        // Print debug log to console, default: false
        'debug' => true,
        // Logger instance, classname, or an application component ID.
        'logger' => Logger::class,
    // Special:
        // Use gzip in HTTP communication, default: true
        'useGzip' => true,
        // Use PHP MsgPack in HTTP communication, default: true
        'useMsgPack' => true,
        // Dismiss non-fatal exceptions, default: true
        'softExceptionEnabled' => true,
    ],
    // ...
],

Usage

Manage Clouds

/* @var $service \shardimage\shardimagephp\services\CloudService */
$service = Yii::$app->shardimage->cloud();

Manage Backups

/* @var $service \shardimage\shardimagephp\services\BackupService */
$service = Yii::$app->shardimage->backup();

Manage Firewalls

/* @var $service \shardimage\shardimagephp\services\FirewallService */
$service = Yii::$app->shardimage->firewall();

Manage Images

/* @var $service \shardimage\shardimagephp\services\ImageService */
$service = Yii::$app->shardimage->image();

Manage Uploads

/* @var $service \shardimage\shardimagephp\services\UploadService */
$service = Yii::$app->shardimage->upload();

Manage Urls

/* @var $service \shardimage\shardimagephp\services\UrlService */
$service = Yii::$app->shardimage->url();

For more informations, please check the Shardimage PHP package or the Shardimage documentation.

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

License

Read more >>

Links

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-10-07