From 814eef8098f76ad8ee68b4a9c0c8ddda0c095261 Mon Sep 17 00:00:00 2001 From: doctrine Date: Tue, 16 May 2006 09:22:32 +0000 Subject: [PATCH] component name conversion bug fixed --- classes/Access.class.php | 8 ++++++-- classes/Manager.class.php | 1 - classes/Query.class.php | 5 ++--- classes/Sensei/Sensei.class.php | 6 +++--- classes/Session.class.php | 2 -- classes/Table.class.php | 6 ++++++ 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/classes/Access.class.php b/classes/Access.class.php index 7d4510ff5..bf59f423c 100644 --- a/classes/Access.class.php +++ b/classes/Access.class.php @@ -1,9 +1,13 @@ $name) { - $low = strtolower($name); - $name = ucwords($low); try { if($key == 0) { @@ -886,6 +884,7 @@ class Doctrine_Query extends Doctrine_Access { } } catch(Exception $e) { + throw new DQLException($e->getMessage(),$e->getCode()); } } diff --git a/classes/Sensei/Sensei.class.php b/classes/Sensei/Sensei.class.php index 955661365..bd90350f6 100644 --- a/classes/Sensei/Sensei.class.php +++ b/classes/Sensei/Sensei.class.php @@ -47,8 +47,8 @@ class Sensei_Session extends Doctrine_Record { * @return void */ public function setUp() { - $this->ownsMany("Sensei_variable","Sensei_variable.session_id"); - $this->hasOne("Sensei_entity","Sensei_session.entity_id"); + $this->ownsMany("Sensei_Variable","Sensei_Variable.session_id"); + $this->hasOne("Sensei_Entity","Sensei_Session.entity_id"); } /** * setTableDefinition @@ -210,7 +210,7 @@ class Sensei extends Doctrine_Access { $this->record->user_agent = $_SERVER['HTTP_USER_AGENT']; $this->record->updated = time(); $this->record->session_id = $id; - $this->vars = $this->record->Sensei_variable; + $this->vars = $this->record->Sensei_Variable; if($this->record->getState() == Doctrine_Record::STATE_TDIRTY) { $this->record->created = time(); diff --git a/classes/Session.class.php b/classes/Session.class.php index a47a2b4b7..b8e268744 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -186,8 +186,6 @@ abstract class Doctrine_Session extends Doctrine_Configurable implements Countab * @return object Doctrine_Table */ public function getTable($name) { - // $name = ucwords(strtolower($name)); - if(isset($this->tables[$name])) return $this->tables[$name]; diff --git a/classes/Table.class.php b/classes/Table.class.php index 621e307a1..cf4c198dd 100644 --- a/classes/Table.class.php +++ b/classes/Table.class.php @@ -218,6 +218,9 @@ class Doctrine_Table extends Doctrine_Configurable { break; endswitch; } + /** + * @return Doctrine_Repository + */ public function getRepository() { return $this->repository; } @@ -334,7 +337,10 @@ class Doctrine_Table extends Doctrine_Configurable { return $this->bound; } /** + * returns a bound relation array + * * @param string $name + * @return array */ final public function getBound($name) { if( ! isset($this->bound[$name]))