| @@ 89-96 (lines=8) @@ | ||
| 86 | * @param DeviceDetector $parser |
|
| 87 | * @throws PackageNotLoadedException |
|
| 88 | */ |
|
| 89 | public function __construct(DeviceDetector $parser = null) |
|
| 90 | { |
|
| 91 | if ($parser === null && ! file_exists('vendor/' . $this->getPackageName() . '/composer.json')) { |
|
| 92 | throw new PackageNotLoadedException('You need to install the package ' . $this->getPackageName() . ' to use this provider'); |
|
| 93 | } |
|
| 94 | ||
| 95 | $this->parser = $parser; |
|
| 96 | } |
|
| 97 | ||
| 98 | /** |
|
| 99 | * |
|
| @@ 105-112 (lines=8) @@ | ||
| 102 | * @param Parser $parser |
|
| 103 | * @throws PackageNotLoadedException |
|
| 104 | */ |
|
| 105 | public function __construct(Parser $parser = null) |
|
| 106 | { |
|
| 107 | if ($parser === null && ! file_exists('vendor/' . $this->getPackageName() . '/composer.json')) { |
|
| 108 | throw new PackageNotLoadedException('You need to install the package ' . $this->getPackageName() . ' to use this provider'); |
|
| 109 | } |
|
| 110 | ||
| 111 | $this->parser = $parser; |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * |
|