| @@ 105-112 (lines=8) @@ | ||
| 102 | * @param PartFilter $filter |
|
| 103 | * @return \ZBateson\MailMimeParser\Message\Part\MimePart |
|
| 104 | */ |
|
| 105 | public function getPart($index, PartFilter $filter = null) |
|
| 106 | { |
|
| 107 | $parts = $this->getAllParts($filter); |
|
| 108 | if (!isset($parts[$index])) { |
|
| 109 | return null; |
|
| 110 | } |
|
| 111 | return $parts[$index]; |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Returns the current part, all child parts, and child parts of all |
|
| @@ 165-172 (lines=8) @@ | ||
| 162 | * @param PartFilter $filter |
|
| 163 | * @return \ZBateson\MailMimeParser\Message\Part\MimePart |
|
| 164 | */ |
|
| 165 | public function getChild($index, PartFilter $filter = null) |
|
| 166 | { |
|
| 167 | $parts = $this->getChildParts($filter); |
|
| 168 | if (!isset($parts[$index])) { |
|
| 169 | return null; |
|
| 170 | } |
|
| 171 | return $parts[$index]; |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Returns all direct child parts. |
|