Skip to content

Commit 4e057ea

Browse files
committedJan 10, 2018
Release version 2.1.0
- Optimize Composer autoload - Add getTable() method
1 parent 21e4b1b commit 4e057ea

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
 

‎composer.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
},
1212
"minimum-stability": "stable",
1313
"autoload": {
14-
"psr-4": {
15-
"yidas\\": "src/"
16-
}
14+
"classmap": ["src/"]
1715
}
1816
}

‎src/Model.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Base Model
77
*
88
* @author Nick Tsai <myintaer@gmail.com>
9-
* @version 2.0.0
9+
* @version 2.1.0
1010
* @see https://github.com/yidas/codeigniter-model
1111
*/
1212
class Model extends \CI_Model
@@ -239,11 +239,19 @@ public function getBuilder()
239239
*
240240
* @return string Table name
241241
*/
242-
public function tableName()
242+
public function getTable()
243243
{
244244
return $this->table;
245245
}
246246

247+
/**
248+
* Alias of getTable()
249+
*/
250+
public function tableName()
251+
{
252+
return $this->getTable();
253+
}
254+
247255
/**
248256
* Validation - Get errors
249257
*

0 commit comments

Comments
 (0)