Optimization when checking for setTable prefix.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7370 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-07-27 15:55:49 +00:00
parent 460b219810
commit ac45340a71

View file

@ -348,8 +348,7 @@ class Model extends Overloadable {
if ($this->useTable === null) {
$this->useTable = Inflector::tableize($this->name);
}
$methods = get_class_methods($this);
if (in_array('settableprefix', $methods) || in_array('setTablePrefix', $methods)) {
if (method_exists($this, 'setTablePrefix')) {
$this->setTablePrefix();
}