1 | <?php declare(strict_types = 1); |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
2 | |||
3 | namespace App\Services\Meta; |
||
4 | |||
5 | use WPSteak\Services\Meta\Post; |
||
6 | use WPSteak\Services\Meta\PostInterface; |
||
7 | use WPSteak\Services\Meta\Term; |
||
8 | use WPSteak\Services\Meta\TermInterface; |
||
9 | |||
10 | /** |
||
11 | * Service provider class. |
||
12 | * |
||
13 | * @codeCoverageIgnore |
||
14 | */ |
||
15 | class ServiceProvider extends \League\Container\ServiceProvider\AbstractServiceProvider { |
||
16 | |||
17 | /** |
||
18 | * {@inheritDoc} |
||
19 | */ |
||
20 | protected $provides = [ |
||
21 | PostInterface::class, |
||
22 | TermInterface::class, |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * {@inheritDoc} |
||
27 | */ |
||
28 | public function register(): void { |
||
29 | $this->getLeagueContainer() |
||
30 | ->share( PostInterface::class, Post::class ); |
||
31 | |||
32 | $this->getLeagueContainer() |
||
33 | ->share( TermInterface::class, Term::class ); |
||
34 | } |
||
35 | |||
36 | } |
||
37 |