1 | <?php |
||
28 | class UnderQuery |
||
29 | { |
||
30 | /** |
||
31 | * @var ContainerInterface $container |
||
32 | */ |
||
33 | private $container; |
||
34 | |||
35 | /** |
||
36 | * @param ConnectionInterface|null $connection |
||
37 | * @param ContainerInterface|null $container |
||
38 | */ |
||
39 | 2 | public function __construct(ConnectionInterface $connection = null, ContainerInterface $container = null) |
|
44 | |||
45 | /** |
||
46 | * @return ContainerInterface |
||
47 | */ |
||
48 | 2 | public function getContainer() |
|
52 | |||
53 | /** |
||
54 | * @param string $class |
||
55 | * |
||
56 | * @return QueryCompilerInterface |
||
57 | */ |
||
58 | 1 | private function createQueryBuilder($class) |
|
66 | |||
67 | /** |
||
68 | * @return SelectBuilder |
||
69 | */ |
||
70 | 1 | public function createSelect() |
|
74 | |||
75 | /** |
||
76 | * @return UpdateBuilder |
||
77 | */ |
||
78 | 1 | public function createUpdate() |
|
82 | |||
83 | /** |
||
84 | * @return DeleteBuilder |
||
85 | */ |
||
86 | 1 | public function createDelete() |
|
90 | |||
91 | /** |
||
92 | * @return InsertBuilder |
||
93 | */ |
||
94 | 1 | public function createInsert() |
|
98 | |||
99 | /** |
||
100 | * @return InsertSelectBuilder |
||
101 | */ |
||
102 | 1 | public function createInsertSelect() |
|
106 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: