COM-40 :: Added Page Rules endpoint.
This commit is contained in:
31
src/Configurations/PageRulesTargets.php
Normal file
31
src/Configurations/PageRulesTargets.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user