Changeset 24498
- Timestamp:
- 11/28/09 15:00:37 (3 years ago)
- Files:
-
- branches/1.2/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php (modified) (2 diffs)
- branches/1.3/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php (modified) (6 diffs)
- branches/1.4/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php
r14976 r24498 79 79 protected function getObjectsForParameters($parameters) 80 80 { 81 $this->options['model'] = Doctrine::getTable($this->options[' model']);81 $this->options['model'] = Doctrine::getTable($this->options['object_model']); 82 82 83 83 $variables = array(); … … 143 143 } 144 144 145 $className = $this->options['model'];146 147 145 $parameters = array(); 148 149 146 foreach ($this->getRealVariables() as $variable) 150 147 { branches/1.3/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php
r23810 r24498 62 62 protected function getObjectsForParameters($parameters) 63 63 { 64 $t his->options['model']= Doctrine_Core::getTable($this->options['model']);64 $tableModel = Doctrine_Core::getTable($this->options['model']); 65 65 66 66 $variables = array(); … … 68 68 foreach($this->getRealVariables() as $variable) 69 69 { 70 if($t his->options['model']->hasColumn($this->options['model']->getColumnName($variable)))70 if($tableModel->hasColumn($tableModel->getColumnName($variable))) 71 71 { 72 72 $variables[] = $variable; … … 79 79 if (null === $this->query) 80 80 { 81 $q = $t his->options['model']->createQuery('a');81 $q = $tableModel->createQuery('a'); 82 82 foreach ($values as $variable => $value) 83 83 { 84 $fieldName = $t his->options['model']->getFieldName($variable);84 $fieldName = $tableModel->getFieldName($variable); 85 85 $q->andWhere('a.'. $fieldName . ' = ?', $parameters[$variable]); 86 86 } … … 93 93 { 94 94 $method = $this->options['method_for_query']; 95 $results = $t his->options['model']->$method($q);95 $results = $tableModel->$method($q); 96 96 } 97 97 else … … 103 103 { 104 104 $method = $this->options['method']; 105 $results = $t his->options['model']->$method($this->filterParameters($parameters));105 $results = $tableModel->$method($this->filterParameters($parameters)); 106 106 } 107 107 … … 126 126 } 127 127 128 $className = $this->options['model'];129 130 128 $parameters = array(); 131 132 129 foreach ($this->getRealVariables() as $variable) 133 130 { branches/1.4/lib/plugins/sfDoctrinePlugin/lib/routing/sfDoctrineRoute.class.php
r23810 r24498 62 62 protected function getObjectsForParameters($parameters) 63 63 { 64 $t his->options['model']= Doctrine_Core::getTable($this->options['model']);64 $tableModel = Doctrine_Core::getTable($this->options['model']); 65 65 66 66 $variables = array(); … … 68 68 foreach($this->getRealVariables() as $variable) 69 69 { 70 if($t his->options['model']->hasColumn($this->options['model']->getColumnName($variable)))70 if($tableModel->hasColumn($tableModel->getColumnName($variable))) 71 71 { 72 72 $variables[] = $variable; … … 79 79 if (null === $this->query) 80 80 { 81 $q = $t his->options['model']->createQuery('a');81 $q = $tableModel->createQuery('a'); 82 82 foreach ($values as $variable => $value) 83 83 { 84 $fieldName = $t his->options['model']->getFieldName($variable);84 $fieldName = $tableModel->getFieldName($variable); 85 85 $q->andWhere('a.'. $fieldName . ' = ?', $parameters[$variable]); 86 86 } … … 93 93 { 94 94 $method = $this->options['method_for_query']; 95 $results = $t his->options['model']->$method($q);95 $results = $tableModel->$method($q); 96 96 } 97 97 else … … 103 103 { 104 104 $method = $this->options['method']; 105 $results = $t his->options['model']->$method($this->filterParameters($parameters));105 $results = $tableModel->$method($this->filterParameters($parameters)); 106 106 } 107 107 … … 126 126 } 127 127 128 $className = $this->options['model'];129 130 128 $parameters = array(); 131 132 129 foreach ($this->getRealVariables() as $variable) 133 130 {