| @@ 38-44 (lines=7) @@ | ||
| 35 | $extension = strtolower($extension); |
|
| 36 | ||
| 37 | // Add entry to 'types'. |
|
| 38 | if (!isset($this->map['types'][$type])) { |
|
| 39 | $this->map['types'][$type] = [$extension]; |
|
| 40 | } else { |
|
| 41 | if (array_search($extension, $this->map['types'][$type]) === false) { |
|
| 42 | $this->map['types'][$type][] = $extension; |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| 46 | // Add entry to 'extensions'. |
|
| 47 | if (!isset($this->map['extensions'][$extension])) { |
|
| @@ 47-53 (lines=7) @@ | ||
| 44 | } |
|
| 45 | ||
| 46 | // Add entry to 'extensions'. |
|
| 47 | if (!isset($this->map['extensions'][$extension])) { |
|
| 48 | $this->map['extensions'][$extension] = [$type]; |
|
| 49 | } else { |
|
| 50 | if (array_search($type, $this->map['extensions'][$extension]) === false) { |
|
| 51 | $this->map['extensions'][$extension][] = $type; |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | return $this; |
|
| 56 | } |
|