| 1 |
<?php |
| 2 |
|
| 3 |
namespace Dudlewebs\WPMCS\s3\Aws\EndpointV2\Ruleset; |
| 4 |
|
| 5 |
/** |
| 6 |
* Represents a fully resolved endpoint that a |
| 7 |
* rule returns if input parameters meet its requirements. |
| 8 |
*/ |
| 9 |
class RulesetEndpoint |
| 10 |
{ |
| 11 |
/** @var string */ |
| 12 |
private $url; |
| 13 |
/** @var array */ |
| 14 |
private $properties; |
| 15 |
/** @var array */ |
| 16 |
private $headers; |
| 17 |
public function __construct($url, $properties = null, $headers = null) |
| 18 |
{ |
| 19 |
$this->url = $url; |
| 20 |
$this->properties = $properties; |
| 21 |
$this->headers = $headers; |
| 22 |
} |
| 23 |
/** |
| 24 |
* @return mixed |
| 25 |
*/ |
| 26 |
public function getUrl() |
| 27 |
{ |
| 28 |
return $this->url; |
| 29 |
} |
| 30 |
/** |
| 31 |
* @param $property |
| 32 |
* @return mixed |
| 33 |
*/ |
| 34 |
public function getProperty($property) |
| 35 |
{ |
| 36 |
if (isset($this->properties[$property])) { |
| 37 |
return $this->properties[$property]; |
| 38 |
} |
| 39 |
return null; |
| 40 |
} |
| 41 |
/** |
| 42 |
* @return mixed |
| 43 |
*/ |
| 44 |
public function getProperties() |
| 45 |
{ |
| 46 |
return $this->properties; |
| 47 |
} |
| 48 |
/** |
| 49 |
* @return mixed |
| 50 |
*/ |
| 51 |
public function getHeaders() |
| 52 |
{ |
| 53 |
return $this->headers; |
| 54 |
} |
| 55 |
} |
| 56 |
|