| @@ 56-64 (lines=9) @@ | ||
| 53 | * @param ConsumerService $consumerService |
|
| 54 | * @param HeaderPartFactory $partFactory |
|
| 55 | */ |
|
| 56 | public static function getInstance(ConsumerService $consumerService, HeaderPartFactory $partFactory) |
|
| 57 | { |
|
| 58 | static $instances = []; |
|
| 59 | $class = get_called_class(); |
|
| 60 | if (!isset($instances[$class])) { |
|
| 61 | $instances[$class] = new static($consumerService, $partFactory); |
|
| 62 | } |
|
| 63 | return $instances[$class]; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Invokes parsing of a header's value into header parts. |
|
| @@ 45-53 (lines=9) @@ | ||
| 42 | * Returns the singleton instance for the class, instantiating it if not |
|
| 43 | * already created. |
|
| 44 | */ |
|
| 45 | public static function getInstance() |
|
| 46 | { |
|
| 47 | static $instances = []; |
|
| 48 | $class = get_called_class(); |
|
| 49 | if (!isset($instances[$class])) { |
|
| 50 | $instances[$class] = new static(); |
|
| 51 | } |
|
| 52 | return $instances[$class]; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Writes out the headers of the passed MimePart and follows them with an |
|