From ac45340a7140a1a383831895e7233642fc35d392 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 27 Jul 2008 15:55:49 +0000 Subject: [PATCH] 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 --- cake/libs/model/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 0acb9af30..8bc94f496 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -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(); }