| 1 | <?php |
||
| 8 | class TableFactory implements TableFactoryInterface |
||
| 9 | { |
||
| 10 | protected $namespaces = []; |
||
| 11 | protected $default; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Add a namespace for the entities classes. |
||
| 15 | * |
||
| 16 | * @param string $namespace |
||
| 17 | * |
||
| 18 | * @return self |
||
| 19 | */ |
||
| 20 | public function addNamespace($namespace) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Set whether the entities are autocreated or not. |
||
| 29 | * |
||
| 30 | * @param string $default Default class used by the tables |
||
| 31 | * |
||
| 32 | * @return self |
||
| 33 | */ |
||
| 34 | public function setAutocreate($default = 'SimpleCrud\\Table') |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @see TableFactoryInterface |
||
| 43 | * |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | public function get(SimpleCrud $db, $name) |
||
| 70 | } |
||
| 71 |