From 0ee928cd61f474a06bf902a5b0896e5e7fd4862e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Skej=C3=B8?= Date: Tue, 21 Jul 2009 20:12:34 +0200 Subject: [PATCH] AOOSModule: Minor fixes. --- AOOSModule.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/AOOSModule.php b/AOOSModule.php index f4f0155..3fbe312 100644 --- a/AOOSModule.php +++ b/AOOSModule.php @@ -175,7 +175,7 @@ class AOOSModule $this->_data = array(); // XXX Not sure about this if (is_array($models)) { foreach ($models as $name => $model) { - if ($model instanceof AOOSCore) { + if ($model instanceof AOOSModel) { $this->_data[$name] = $model; } } @@ -199,17 +199,19 @@ class AOOSModule } if ($name == null) { return $this->_data[0]; - } - else { + } else { if (in_array($name, array_keys($this->_data))) { return $this->_data[$name]; - } - else { + } else { throw new AOOSException($this->core(), $this->tr("data_model_not_found")); } } } + public function dataModels() { + return $this->_data; + } + /** * Emits the signal $signal. * This means that every slot connected to this function is called. -- 2.11.4.GIT