1 | <?php |
||
19 | abstract class DoctrineCommand extends Command |
||
20 | { |
||
21 | /** @var ManagerRegistry|null */ |
||
22 | private $doctrine; |
||
23 | |||
24 | /** @var ContainerInterface|null */ |
||
25 | private $container; |
||
26 | |||
27 | public function __construct(ManagerRegistry $doctrine = null) |
||
33 | |||
34 | /** |
||
35 | * @deprecated |
||
36 | */ |
||
37 | public function setContainer(ContainerInterface $container = null) |
||
41 | |||
42 | /** |
||
43 | * @deprecated |
||
44 | * |
||
45 | * @return ContainerInterface |
||
46 | * |
||
47 | * @throws LogicException |
||
48 | */ |
||
49 | protected function getContainer() |
||
62 | |||
63 | /** |
||
64 | * get a doctrine entity generator |
||
65 | * |
||
66 | * @return EntityGenerator |
||
67 | */ |
||
68 | protected function getEntityGenerator() |
||
80 | |||
81 | /** |
||
82 | * Get a doctrine entity manager by symfony name. |
||
83 | * |
||
84 | * @param string $name |
||
85 | * @param int|null $shardId |
||
86 | * |
||
87 | * @return EntityManager |
||
88 | */ |
||
89 | protected function getEntityManager($name, $shardId = null) |
||
103 | |||
104 | /** |
||
105 | * Get a doctrine dbal connection by symfony name. |
||
106 | * |
||
107 | * @param string $name |
||
108 | * |
||
109 | * @return Connection |
||
110 | */ |
||
111 | protected function getDoctrineConnection($name) |
||
115 | |||
116 | /** |
||
117 | * @return ManagerRegistry |
||
118 | */ |
||
119 | protected function getDoctrine() |
||
123 | } |
||
124 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: