| 1 | <?php |
||
| 5 | class DnsDockResolver implements ContainerAddressResolver |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * {@inheritdoc} |
||
| 9 | */ |
||
| 10 | public function getDnsByContainerNameAndImage($containerName, $imageName) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $imageName |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | private function stripTagNameFromImageName($imageName) |
||
| 28 | { |
||
| 29 | if (false !== ($position = strpos($imageName, ':'))) { |
||
| 30 | $imageName = substr($imageName, 0, $position); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $imageName; |
||
| 34 | } |
||
| 35 | |||
| 36 | private function stripSlashFromImageName($imageName) |
||
| 37 | { |
||
| 38 | if (false !== ($position = strrpos($imageName, '/'))) { |
||
| 39 | $imageName = substr($imageName, $position+1 ); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $imageName; |
||
| 43 | } |
||
| 44 | |||
| 45 | private function sanitiseImageName($imageName) |
||
| 49 | } |
||
| 50 |