Note: This library is under active development as I expand it to cover Cloudflare API. Consider the public API of this package a little unstable as I work towards a v1.0. See Coverage.

Ruleset

Usage

Cloudflare API provides extensive configuration for Account/Zone Ruleset, this helper aims to simplify it.

php

use Cloudflare\Configurations\Workers\Deployment;

use Cloudflare\Configurations\Rules\BlockRule;
use Cloudflare\Configurations\Ruleset;

$ruleset = (new Ruleset('The human-readable name of the ruleset.'))
    ->managed() //Set Ruleset kind to 'managed'
    ->configSettings() //Set Ruleset phase to 'http_config_settings'
    ->setDescription('An informative description of the ruleset.');