1 | <?php |
||
34 | class AddSubCommand extends SubCommandCommand |
||
35 | { |
||
36 | const GIT_REMOTE_ADD = 'add'; |
||
37 | const GIT_REMOTE_ADD_OPTION_FETCH = '-f'; |
||
38 | const GIT_REMOTE_ADD_OPTION_TAGS = '--tags'; |
||
39 | const GIT_REMOTE_ADD_OPTION_NOTAGS = '--no-tags'; |
||
40 | const GIT_REMOTE_ADD_OPTION_MIRROR = '--mirror'; |
||
41 | const GIT_REMOTE_ADD_OPTION_SETHEAD = '-m'; |
||
42 | const GIT_REMOTE_ADD_OPTION_TRACK = '-t'; |
||
43 | |||
44 | /** |
||
45 | * constructor |
||
46 | * |
||
47 | * @param \GitElephant\Repository $repo The repository object this command |
||
48 | * will interact with |
||
49 | */ |
||
50 | 8 | public function __construct(Repository $repo = null) |
|
54 | |||
55 | /** |
||
56 | * Valid options for remote command that require an associated value |
||
57 | * |
||
58 | * @return array Array of all value-required options |
||
59 | */ |
||
60 | 8 | public function addCmdValueOptions() |
|
68 | |||
69 | /** |
||
70 | * switch only options for the add subcommand |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | 8 | public function addCmdSwitchOptions() |
|
82 | |||
83 | /** |
||
84 | * build add sub command |
||
85 | * |
||
86 | * @param string $name remote name |
||
87 | * @param string $url URL of remote |
||
88 | * @param array $options options for the add subcommand |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | 8 | public function prepare($name, $url, $options = array()) |
|
109 | } |
||
110 |