PHP Класс Cloudflare\Zone\Pagerules

Page rules for a Zone A rule describing target patterns for requests and actions to perform on matching requests
Автор: James Bell ([email protected])
Наследование: extends CloudFlare\Api
Показать файл Открыть проект

Открытые методы

Метод Описание
change ( string $zone_identifier, string $identifier, array | null $targets = null, array | null $actions = null, integer | null $priority = null, string | null $status = null ) Change a page rule [BETA] (permission needed: #zone:edit)
create ( string $zone_identifier, array $targets, array $actions, integer | null $priority = null, string | null $status = 'active' ) Create a page rule [BETA] (permission needed: #zone:edit)
delete_pagerule ( string $zone_identifier, string $identifier ) Delete a page rule [BETA] (permission needed: #zone:edit)
details ( string $zone_identifier, string $identifier ) Page rule details [BETA] (permission needed: #zone:read)
list_pagerules ( string $zone_identifier, string | null $status = null, string | null $order = null, string | null $direction = null, string | null $match = null ) List page rules [BETA] (permission needed: #zone:read)
update ( string $zone_identifier, string $identifier, array $targets, array $actions, integer | null $priority = null, string | null $status = null ) Update a page rule [BETA] (permission needed: #zone:edit) Replace a page rule. The final rule will exactly match the data passed with this request.

Описание методов

change() публичный Метод

Change a page rule [BETA] (permission needed: #zone:edit)
public change ( string $zone_identifier, string $identifier, array | null $targets = null, array | null $actions = null, integer | null $priority = null, string | null $status = null )
$zone_identifier string API item identifier tag
$identifier string
$targets array | null Targets to evaluate on a request
$actions array | null The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)
$priority integer | null A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.
$status string | null Status of the page rule

create() публичный Метод

Create a page rule [BETA] (permission needed: #zone:edit)
public create ( string $zone_identifier, array $targets, array $actions, integer | null $priority = null, string | null $status = 'active' )
$zone_identifier string API item identifier tag
$targets array Targets to evaluate on a request
$actions array The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)
$priority integer | null A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.
$status string | null Status of the page rule

delete_pagerule() публичный Метод

Delete a page rule [BETA] (permission needed: #zone:edit)
public delete_pagerule ( string $zone_identifier, string $identifier )
$zone_identifier string API item identifier tag
$identifier string

details() публичный Метод

Page rule details [BETA] (permission needed: #zone:read)
public details ( string $zone_identifier, string $identifier )
$zone_identifier string API item identifier tag
$identifier string

list_pagerules() публичный Метод

List page rules [BETA] (permission needed: #zone:read)
public list_pagerules ( string $zone_identifier, string | null $status = null, string | null $order = null, string | null $direction = null, string | null $match = null )
$zone_identifier string API item identifier tag
$status string | null Status of the page rule
$order string | null Field to order page rules by (status, priority)
$direction string | null Direction to order page rules (asc, desc)
$match string | null Whether to match all search requirements or at least one (any) (any, all)

update() публичный Метод

Update a page rule [BETA] (permission needed: #zone:edit) Replace a page rule. The final rule will exactly match the data passed with this request.
public update ( string $zone_identifier, string $identifier, array $targets, array $actions, integer | null $priority = null, string | null $status = null )
$zone_identifier string API item identifier tag
$identifier string
$targets array Targets to evaluate on a request
$actions array The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)
$priority integer | null A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.
$status string | null Status of the page rule