2017 © Pedro Peláez
 

yii2-extension yii2-shardimage

ShardImage API Wrapper for Yii2

image

shardimage/yii2-shardimage

ShardImage API Wrapper for Yii2

  • Thursday, November 24, 2016
  • by shardimage
  • Repository
  • 1 Watchers
  • 0 Stars
  • 602 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Yii2-Shardimage

Packagist Packagist GitHub issues Packagist Version PHP from Packagist, (*1)

Yii2 Wrapper for Shardimage PHP, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

composer require shardimage/yii2-shardimage

Usage

Once the extension is installed, simply use it in your code by:, (*4)

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., (*5)

Changelog

All notable changes to this project will be documented in the CHANGELOG file., (*6)

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

License

Read more >>, (*8)

The Versions

24/11 2016

dev-master

9999999-dev

ShardImage API Wrapper for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar shardimage

api extension yii2 image convert shartimage

19/02 2016

1.0.1

1.0.1.0

ShardImage API

  Sources   Download

BSD-3-Clause

The Requires

 

by Lajos Molnar

api extension yii2 image convert shartimage

07/10 2015

1.0.0

1.0.0.0

ShardImage API

  Sources   Download

BSD-3-Clause

The Requires

 

by Lajos Molnar

api extension yii2 image convert shartimage