1 | <?php |
||
23 | class EntityManager |
||
24 | { |
||
25 | /** |
||
26 | * @var APIGuzzleAdapter |
||
27 | */ |
||
28 | private $client; |
||
29 | |||
30 | /** |
||
31 | * @var LoggerInterface |
||
32 | */ |
||
33 | private $logger; |
||
34 | |||
35 | /** |
||
36 | * @var AbstractRepository[] |
||
37 | */ |
||
38 | private $repositories = array(); |
||
39 | |||
40 | /** |
||
41 | * @param ApiClient $client |
||
42 | 88 | * @param LoggerInterface $logger |
|
43 | */ |
||
44 | public function __construct(ApiClient $client, LoggerInterface $logger = null) { |
||
45 | $this->client = $client; |
||
|
|||
46 | 88 | $this->logger = $logger ?: new NullLogger(); |
|
47 | 88 | } |
|
48 | 88 | ||
49 | /** |
||
50 | * @return LoggerInterface |
||
51 | */ |
||
52 | public function getLogger() |
||
56 | |||
57 | /** |
||
58 | * Return the client attached to this entity manager |
||
59 | * |
||
60 | * @return APIGuzzleAdapter |
||
61 | * @deprecated This method will be removed in the next major release of the SDK. Use EntityManager::getClient(). |
||
62 | */ |
||
63 | 86 | public function getAdapter() |
|
67 | |||
68 | /** |
||
69 | * @return ApiClient |
||
70 | */ |
||
71 | public function getClient() |
||
75 | |||
76 | 17 | /** |
|
77 | * Get a repository by its name |
||
78 | * |
||
79 | * @param string $name |
||
80 | 17 | * @return AbstractRepository |
|
81 | 17 | */ |
|
82 | public function getRepository($name) |
||
107 | } |
||
108 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..