COM-40 :: Added Page Rules endpoint.

This commit is contained in:
Junade Ali
2017-09-20 11:52:33 +01:00
parent 1e8c8d6019
commit 3166645a0c
7 changed files with 833 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
<?php
/**
* Created by PhpStorm.
* User: junade
* Date: 19/09/2017
* Time: 18:37
*/
namespace Cloudflare\API\Configurations;
class PageRulesTargets implements Configurations
{
private $targets;
public function __construct(string $queryUrl)
{
$target = new \stdClass();
$target->target = 'url';
$target->constraint = new \stdClass();
$target->constraint->operator = "matches";
$target->constraint->value = $queryUrl;
$this->targets = [$target];
}
public function getArray(): array
{
return $this->targets;
}
}