Created
March 13, 2013 23:59
-
-
Save dhotson/5157651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Pheasant/DomainObject.php b/lib/Pheasant/DomainObject.php | |
index 41a103c..be04890 100755 | |
--- a/lib/Pheasant/DomainObject.php | |
+++ b/lib/Pheasant/DomainObject.php | |
@@ -65,9 +65,9 @@ class DomainObject | |
* Used by the default initialize() method, returns the table name to use | |
* @return string | |
*/ | |
- public function tableName() | |
+ public static function tableName() | |
{ | |
- $tokens = explode('\\', get_class($this)); | |
+ $tokens = explode('\\', get_called_class()); | |
return strtolower(array_pop($tokens)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment