Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class ConsultaConUpdate implements FactoryClassInterface |
||
21 | { |
||
22 | public function crear(array $array): Consulta |
||
23 | { |
||
24 | $consulta = new CrearConsulta; |
||
25 | |||
26 | $conexion = new CrearConexionBaseDeDatos; |
||
27 | |||
28 | $donde = new Donde( |
||
29 | new MasDonde( |
||
30 | array() |
||
31 | ), |
||
32 | $array['donde'] |
||
33 | ); |
||
34 | |||
35 | $update = new Update( |
||
36 | new Tabla($array['tabla']), |
||
37 | $donde, |
||
38 | new ValoresAInsertar( |
||
39 | $array['valores'] |
||
40 | ) |
||
41 | ); |
||
42 | |||
43 | return $consulta->crear(array( |
||
44 | 'conexion' => $conexion->crear(array()), |
||
45 | 'sql' => $update->update(), |
||
46 | 'valores' => $this->juntarValores($array['valores'],$donde->datos()) |
||
47 | )); |
||
48 | } |
||
49 | |||
50 | private function juntarValores(array $array, array $array2): array |
||
54 | } |
||
55 | } |