| 1 | <?php |
||
| 11 | class TableHelper |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Parses the table name from Describe class. |
||
| 15 | * NOTE: To be removed in v1.0.0. Use self::model instead. |
||
| 16 | * |
||
| 17 | * @param string $table |
||
| 18 | * @return string |
||
| 19 | */ |
||
| 20 | public static function getModelName($table) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Parses the table name from Describe class. |
||
| 27 | * |
||
| 28 | * @param string $table |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | 36 | public static function model($table) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Gets the table name specified from the model. |
||
| 42 | * NOTE: To be removed in v1.0.0. Use self::name instead. |
||
| 43 | * |
||
| 44 | * @param object $model |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | 6 | public static function getNameFromModel($model) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Gets the table name specified from the model. |
||
| 54 | * NOTE: To be removed in v1.0.0. Use $model->table() |
||
| 55 | * |
||
| 56 | * @param object $model |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | 39 | public static function name($model) |
|
| 71 | } |
||
| 72 |