| 1 | <?php |
||
| 10 | class MaintenanceModeExtension extends Extension |
||
|
|
|||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @throws SS_HTTPResponse_Exception |
||
| 15 | */ |
||
| 16 | public function onBeforeInit() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | public function isDownForMaintenance() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Somehow $this->owner->httpError keeps the website spinning. |
||
| 34 | * |
||
| 35 | * Maybe not very Silverstripe'sch, but at least this works |
||
| 36 | * |
||
| 37 | * @throws SS_HTTPResponse_Exception |
||
| 38 | */ |
||
| 39 | protected function throw503() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | protected function get503File() |
||
| 57 | } |
||
| 58 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.