src/Cornford/Setter/Setting.php 1 location
|
@@ 198-207 (lines=10) @@
|
| 195 |
|
* |
| 196 |
|
* @return self |
| 197 |
|
*/ |
| 198 |
|
public function cacheExpires($expiry) |
| 199 |
|
{ |
| 200 |
|
if (!is_bool($expiry) && !is_integer($expiry) && !$expiry instanceof DateTime) { |
| 201 |
|
throw new SettingArgumentException('Expiry is required in boolean, integer or DateTime format.'); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
$this->cacheExpiry = $expiry; |
| 205 |
|
|
| 206 |
|
return $this; |
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
} |
| 210 |
|
|
src/Cornford/Setter/SettingBase.php 1 location
|
@@ 168-175 (lines=8) @@
|
| 165 |
|
* |
| 166 |
|
* @return void |
| 167 |
|
*/ |
| 168 |
|
protected function setCacheExpiry($value) |
| 169 |
|
{ |
| 170 |
|
if (!is_bool($value) && !is_integer($value) && !$value instanceof DateTime) { |
| 171 |
|
throw new SettingArgumentException('Expiry is required in boolean, integer or DateTime format.'); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
$this->cacheExpiry = $value; |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
/** |
| 178 |
|
* Get the cache tag |