1 | <?php declare(strict_types = 1); |
||
28 | class Factory |
||
29 | { |
||
30 | /** |
||
31 | * Logger builder |
||
32 | * @var LoggerBuilderInterface |
||
33 | */ |
||
34 | protected $loggerBuilder; |
||
35 | |||
36 | /** |
||
37 | * Create |
||
38 | * @param array $loggerConf |
||
39 | * @return Factory |
||
40 | */ |
||
41 | 2 | public static function create(array $loggerConf = ['builder' => 'NullLogger', 'config' => []]) : Factory |
|
48 | |||
49 | /** |
||
50 | * Get Tmdb object |
||
51 | * @param string $apiKey API Key |
||
52 | * @param int $version API Version (not yet used) |
||
53 | * @return Tmdb |
||
54 | */ |
||
55 | 1 | public function getTmdb(string $apiKey, int $version = 3) : Tmdb |
|
59 | |||
60 | /** |
||
61 | * Get Builder |
||
62 | * @param string $builder |
||
63 | * @param array $args |
||
64 | * @return LoggerBuilderInterface |
||
65 | */ |
||
66 | 2 | public function getBuilder(string $builder, array $args = []) : LoggerBuilderInterface |
|
74 | |||
75 | /** |
||
76 | * Set logger builder |
||
77 | * @param LoggerBuilderInterface $loggerBuilder |
||
78 | * @return Factory |
||
79 | */ |
||
80 | 2 | public function setLoggerBuilder(LoggerBuilderInterface $loggerBuilder) : Factory |
|
86 | |||
87 | /** |
||
88 | * Check dependency |
||
89 | * @param BuilderInterface $builder |
||
90 | * @return bool |
||
91 | * @throws MissingDependencyException |
||
92 | */ |
||
93 | 2 | public function checkDependency(BuilderInterface $builder) : bool |
|
102 | } |
||
103 |