1 | <?php |
||
14 | abstract class Modeles extends \BfwSql\Sql |
||
15 | { |
||
16 | /** |
||
17 | * @var $tableName The table name |
||
18 | */ |
||
19 | protected $tableName = ''; |
||
20 | |||
21 | /** |
||
22 | * @var $tableNameWithPrefix the table name with prefix |
||
23 | */ |
||
24 | protected $tableNameWithPrefix = ''; |
||
25 | |||
26 | /** |
||
27 | * @var $baseKeyName The baseKeyName to use to connection. |
||
28 | * Use it if they are multiple database to connect in the application. |
||
29 | */ |
||
30 | protected $baseKeyName = ''; |
||
31 | |||
32 | /** |
||
33 | * Constructor |
||
34 | */ |
||
35 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * Get the BFW Application |
||
45 | * It's a dedicated method for unit test or case where App is override |
||
46 | * |
||
47 | * @return \BFW\Application |
||
48 | */ |
||
49 | protected function getApp() |
||
53 | |||
54 | /** |
||
55 | * Obtain SqlConnect instance for the baseKeyName |
||
56 | * |
||
57 | * @return \BfwSql\SqlConnect |
||
58 | * |
||
59 | * @throws \Exception If there are many connection declared and if the |
||
60 | * property baseKeyName is empty |
||
61 | */ |
||
62 | protected function obtainSqlConnect() |
||
88 | } |
||
89 |