1 | <?php |
||
11 | class SimpleResourceURLGenerator implements ResourceURLGenerator |
||
12 | { |
||
13 | /* |
||
14 | * @var string |
||
15 | */ |
||
16 | private $nonceStyle; |
||
17 | |||
18 | /* |
||
19 | * Get the style of nonce-suffixes to use, or null if disabled |
||
20 | * |
||
21 | * @return string|null |
||
22 | */ |
||
23 | public function getNonceStyle() |
||
27 | |||
28 | /* |
||
29 | * Set the style of nonce-suffixes to use, or null to disable |
||
30 | * Currently only "mtime" is allowed |
||
31 | * |
||
32 | * @param string|null $nonceStyle The style of nonces to apply, or null to disable |
||
33 | */ |
||
34 | public function setNonceStyle($nonceStyle) |
||
41 | |||
42 | /** |
||
43 | * Return the URL for a resource, prefixing with Director::baseURL() and suffixing with a nonce |
||
44 | * |
||
45 | * @inherit |
||
46 | */ |
||
47 | public function urlForResource($relativePath) |
||
68 | } |
||
69 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: