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.

Environment

Wrangler allows you to deploy the same Worker application with different configuration for each environment. You must configure environments in your Worker application’s wrangler.toml file.

Cloudflare API docs

Get script content

Get script content from a worker with an environment

php
$response = $client->workers()->environment()->get('account_id', 'service_name', 'environment_name');

$content = $response->body();

Update script content

Put script content from a worker with an environment

php
// TODO

Get Script Settings

Get script settings from a worker with an environment

php
$response = $client->workers()->environment()->getSettings('account_id', 'service_name', 'environment_name');

Update Script Settings

Get script settings from a worker with an environment

php
$response = $client->workers()->environment()->updateSettings('account_id', 'service_name', 'environment_name', [

]);