|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Batch to change configuration |
|
5
|
|
|
* |
|
6
|
|
|
* @category src |
|
7
|
|
|
* @package src\Batch\Controller |
|
8
|
|
|
* @author Judicaël Paquet <[email protected]> |
|
9
|
|
|
* @copyright Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93) |
|
10
|
|
|
* @license https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël |
|
11
|
|
|
* @version Release: 2.0.0 |
|
12
|
|
|
* @filesource https://github.com/las93/venus2 |
|
13
|
|
|
* @link https://github.com/las93 |
|
14
|
|
|
* @since 2.0.0 |
|
15
|
|
|
* |
|
16
|
|
|
* @tutorial You could launch this Batch in /private/ |
|
17
|
|
|
* php bin/console create_project -p [portal] |
|
18
|
|
|
* -p [portal] => it's the name where you want add your entities and models |
|
19
|
|
|
* by default, it's Batch |
|
20
|
|
|
*/ |
|
21
|
|
|
namespace Venus\src\Batch\Controller; |
|
22
|
|
|
|
|
23
|
|
|
use \Venus\src\Batch\common\Controller as Controller; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* Batch to change configuration |
|
27
|
|
|
* |
|
28
|
|
|
* @category src |
|
29
|
|
|
* @package src\Batch\Controller |
|
30
|
|
|
* @author Judicaël Paquet <[email protected]> |
|
31
|
|
|
* @copyright Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93) |
|
32
|
|
|
* @license https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël |
|
33
|
|
|
* @version Release: 2.0.0 |
|
34
|
|
|
* @filesource https://github.com/las93/venus2 |
|
35
|
|
|
* @link https://github.com/las93 |
|
36
|
|
|
* @since 2.0.0 |
|
37
|
|
|
*/ |
|
38
|
|
|
class Config extends Controller |
|
39
|
|
|
{ |
|
40
|
|
|
/** |
|
41
|
|
|
* run the batch to create a project in this framework |
|
42
|
|
|
* @tutorial bin/console create_project |
|
43
|
|
|
* |
|
44
|
|
|
* @access public |
|
45
|
|
|
* @param array $aOptions |
|
46
|
|
|
* @throws \Exception |
|
47
|
|
|
*/ |
|
48
|
|
|
public function maintenance(array $aOptions = array()) |
|
49
|
|
|
{ |
|
50
|
|
|
/** |
|
51
|
|
|
* option -down => indiquer le site en maintenance |
|
52
|
|
|
* -up => indiquer le site disponible |
|
53
|
|
|
*/ |
|
54
|
|
|
if (!isset($aOptions['down']) && !isset($aOptions['up'])) { |
|
55
|
|
|
|
|
56
|
|
|
echo 'You must indicate a parameter up or down with your command line.'; |
|
57
|
|
|
throw new \Exception('You must indicate a parameter up or down with your command line.'); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
|
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|