| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function register() |
||
| 36 | { |
||
| 37 | $this->app->bind(HttpClient::class, CurlHttpClient::class); |
||
| 38 | |||
| 39 | $this->app->singleton(Manager::class, function () { |
||
| 40 | $path = $this->app->get('path.storage') . DIRECTORY_SEPARATOR . 'app/domains'; |
||
| 41 | return new Manager(new Cache($path), $this->app->get(HttpClient::class)); |
||
| 42 | }); |
||
| 43 | $this->app->singleton(Rules::class, function () { |
||
| 44 | return $this->app->get(Manager::class)->getRules() |
||
| 45 | ->withAsciiIDNAOption(IDNA_NONTRANSITIONAL_TO_ASCII) |
||
| 46 | ->withUnicodeIDNAOption(IDNA_NONTRANSITIONAL_TO_UNICODE); |
||
| 47 | }); |
||
| 48 | $this->app->singleton(DomainPlugin::class); |
||
| 49 | } |
||
| 51 |