marciioluucas /
phiber
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Copyright (c) 2017. Este código foi feito por @marciioluucas, sob licença MIT |
||
| 5 | */ |
||
| 6 | namespace Phiber\ORM\Factories; |
||
| 7 | |||
| 8 | use Phiber\Link; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Classe responsável por ser a fábrica de tabelas |
||
| 12 | * |
||
| 13 | * @package bin |
||
| 14 | */ |
||
| 15 | abstract class TableFactory |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Dá o create na tabela |
||
| 19 | * |
||
| 20 | * @param $obj |
||
| 21 | * @return mixed |
||
| 22 | */ |
||
| 23 | abstract static function create($obj); |
||
|
0 ignored issues
–
show
|
|||
| 24 | |||
| 25 | /** |
||
| 26 | * Dá o alter na tabela |
||
| 27 | * |
||
| 28 | * @param $obj |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | abstract static function alter($obj); |
||
|
0 ignored issues
–
show
|
|||
| 32 | |||
| 33 | /** |
||
| 34 | * Exclui a tabela |
||
| 35 | * |
||
| 36 | * @param $obj |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | abstract static function drop($obj); |
||
|
0 ignored issues
–
show
|
|||
| 40 | |||
| 41 | /** |
||
| 42 | * Sincroniza a tabela com o código |
||
| 43 | * |
||
| 44 | * @param $obj |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | abstract static function sync($obj); |
||
|
0 ignored issues
–
show
|
|||
| 48 | |||
| 49 | /** |
||
| 50 | * Pega a conexão com o banco |
||
| 51 | * |
||
| 52 | * @return \PDO |
||
| 53 | */ |
||
| 54 | public function getConnection() |
||
| 55 | { |
||
| 56 | $pdo = new Link(); |
||
| 57 | |||
| 58 | return $pdo->getConnection(); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.