From 7339e727cf53f00cc7e3602ce495da5294303127 Mon Sep 17 00:00:00 2001 From: Yura Date: Sat, 6 Jul 2013 13:59:36 +0300 Subject: [PATCH 1/2] Set PSR-0 to behavior class name --- classes/Jelly/Core/Meta.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Jelly/Core/Meta.php b/classes/Jelly/Core/Meta.php index f7fb7d8..f462c1c 100644 --- a/classes/Jelly/Core/Meta.php +++ b/classes/Jelly/Core/Meta.php @@ -143,6 +143,12 @@ public function finalize($model) // Set the name of a possible behavior class $behavior_class = Jelly::behavior_prefix().$model; + + // Set PSR-0 class name + $behavior_class = strtolower($behavior_class); + $behavior_class = str_replace('_', ' ', $behavior_class); + $behavior_class = ucwords($behavior_class); + $behavior_class = str_replace(' ', '_', $behavior_class); // See if we have a special behavior class to use if (class_exists($behavior_class)) @@ -681,4 +687,4 @@ public function load_with($value = NULL) return $this->_load_with; } -} // End Jelly_Core_Meta \ No newline at end of file +} // End Jelly_Core_Meta From f328e2a33f5d8dfb8205fc81451c6037a529a385 Mon Sep 17 00:00:00 2001 From: Yura Date: Sat, 6 Jul 2013 14:02:36 +0300 Subject: [PATCH 2/2] Remove empty line at end of file