| @@ 149-156 (lines=8) @@ | ||
| 146 | * @param PartFilter $filter |
|
| 147 | * @return \ZBateson\MailMimeParser\Message\MimePart |
|
| 148 | */ |
|
| 149 | public function getPart($index, PartFilter $filter = null) |
|
| 150 | { |
|
| 151 | $parts = $this->getAllParts($filter); |
|
| 152 | if (!isset($parts[$index])) { |
|
| 153 | return null; |
|
| 154 | } |
|
| 155 | return $parts[$index]; |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * Returns the current part, all child parts, and child parts of all |
|
| @@ 205-212 (lines=8) @@ | ||
| 202 | * @param PartFilter $filter |
|
| 203 | * @return \ZBateson\MailMimeParser\Message\MimePart |
|
| 204 | */ |
|
| 205 | public function getChild($index, PartFilter $filter = null) |
|
| 206 | { |
|
| 207 | $parts = $this->getChildParts($filter); |
|
| 208 | if (!isset($parts[$index])) { |
|
| 209 | return null; |
|
| 210 | } |
|
| 211 | return $parts[$index]; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * Returns all direct child parts. |
|