| @@ 157-168 (lines=12) @@ | ||
| 154 | * |
|
| 155 | * @return int The status code. |
|
| 156 | */ |
|
| 157 | public function handleAdd(Args $args) |
|
| 158 | { |
|
| 159 | $flags = $args->isOptionSet('force') |
|
| 160 | ? RepositoryManager::OVERRIDE | RepositoryManager::IGNORE_FILE_NOT_FOUND |
|
| 161 | : 0; |
|
| 162 | $repositoryPath = Path::makeAbsolute($args->getArgument('path'), $this->currentPath); |
|
| 163 | $pathReferences = $args->getArgument('file'); |
|
| 164 | ||
| 165 | $this->repoManager->addRootPathMapping(new PathMapping($repositoryPath, $pathReferences), $flags); |
|
| 166 | ||
| 167 | return 0; |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * Handles the "puli map --update" command. |
|
| @@ 136-148 (lines=13) @@ | ||
| 133 | return 0; |
|
| 134 | } |
|
| 135 | ||
| 136 | public function handleAdd(Args $args) |
|
| 137 | { |
|
| 138 | $flags = $args->isOptionSet('force') ? AssetManager::IGNORE_SERVER_NOT_FOUND : 0; |
|
| 139 | $path = Path::makeAbsolute($args->getArgument('path'), $this->currentPath); |
|
| 140 | ||
| 141 | $this->assetManager->addRootAssetMapping(new AssetMapping( |
|
| 142 | $path, |
|
| 143 | $args->getArgument('server'), |
|
| 144 | $args->getArgument('server-path') |
|
| 145 | ), $flags); |
|
| 146 | ||
| 147 | return 0; |
|
| 148 | } |
|
| 149 | ||
| 150 | public function handleUpdate(Args $args) |
|
| 151 | { |
|