xlabs/hwcdnbundle

HighWinds CDN bundle

Installs: 568

Dependents: 6

Suggesters: 0

Security: 0

Type:symfony-bundle

1.0.4 2018-10-09 11:49 UTC

This package is auto-updated.

Last update: 2022-09-10 00:22:08 UTC


README

A redis driven like engine.

Installation

Install through composer:

php -d memory_limit=-1 composer.phar require xlabs/hwcdnbundle

In your AppKernel

public function registerbundles()
{
    return [
    	...
    	...
    	new XLabs\HWCDNBundle\XLabsHWCDNBundle(),
    ];
}

Configuration sample

Default values are shown below:

# app/config/config.yml

x_labs_hwcdn:
    domain: yourdomain.ext
    account: ############
    secretKey: ############
    expiration_ttl: 7200
    api_username: ############
    api_password: ############

Usage

Instantiate the service from a Controller by:

$this->get('xlabs_hwcdn')->...

Usage (TWIG)

Instantiate the service from a Controller by:

{{ getCDNResource({
    'media_path' => '...',
    'tokenize' => false, // protect resource with token
    'expiration_ttl' => 7200,
    'force_download' => false // create a CDN download link
}) }}