1 | <?php |
||
4 | class ProtectSuperSakeCommand extends SilverstripeCommand |
||
|
|||
5 | { |
||
6 | /** |
||
7 | * @var string |
||
8 | */ |
||
9 | protected $name = 'console:protect'; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $description = 'Prevent direct file access by .htaccess and web.config'; |
||
15 | |||
16 | public function fire() |
||
20 | |||
21 | /** |
||
22 | * protect the supersake file with htaccess. |
||
23 | */ |
||
24 | protected function writehtaccess() |
||
32 | |||
33 | /** |
||
34 | * protect the supersake file with web.config. |
||
35 | */ |
||
36 | public function writewebconfig() |
||
40 | } |
||
41 |
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.