2017 © Pedro Peláez
 

library cloudflare-api-nette

Implementation of Cloudflare API into Nette framework

image

tomaszaruba/cloudflare-api-nette

Implementation of Cloudflare API into Nette framework

  • Thursday, June 30, 2016
  • by zatomik
  • Repository
  • 1 Watchers
  • 1 Stars
  • 372 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Cloudflare API for Nette

Build Status, (*1)

Implementation of jamesryanbell/cloudflare for Nette framework., (*2)

Install

composer require tomaszaruba/cloudflare-api-nette

Register extensions in config.neon:, (*3)

extensions:
    cloudflare: TomasZaruba\Cloudflare\Nette\DI\CloudflareExtension

Configuration

Example config.neon, (*4)

cloudflare:
    email: email@email.com  # required email - Cloudflare login
    key: apiKey             # required API key - check Cloudflare administration for more information
    defaultCache: true      # optional true/false if true, creates service Cloudflare\Zone\Cache by default
    identifier: something   # optional - other optional configuration available

Example

use TomasZaruba\Cloudflare\Nette\Api;
use Cloudflare\Zone\Cache;

class ExampleClass
{


    public function __construct(Api $cloudflareApi, Cache $cloudflareCache){
        $this->cloudflareApi = $cloudflareApi;
        $this->cloudflareCache = $cloudflareCache; // cache autoloads if there is defaultCache: true in config.neon
    }


    public function exampleCloudflare() {

        $dns = new Cloudflare\Zone\Dns($this->cloudflareApi);
        $dns->create('12345678901234567890', 'A', 'name.com', '127.0.0.1', 120);

        $this->cloudflareCache->purge_files(
            $this->cloudflareApi->getParameter('identifier'), 
            array($files)
        );

    }
}

The Versions

30/06 2016

dev-master

9999999-dev

Implementation of Cloudflare API into Nette framework

  Sources   Download

MIT

The Requires

 

The Development Requires

30/06 2016

v1.0.1

1.0.1.0

Implementation of Cloudflare API into Nette framework

  Sources   Download

MIT

The Requires

 

The Development Requires

30/06 2016

v1.0.0

1.0.0.0

Implementation of Cloudflare API into Nette framework

  Sources   Download

MIT

The Requires

 

The Development Requires