From 68d35b4344954784cb31ed663d4b901c0056ad18 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 13 Dec 2009 23:55:21 -0500 Subject: [PATCH] Fix static inflector usage (@todo inject one instead of creating it here) --- framework/Db/lib/Horde/Db/Migration/Migrator.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/Db/lib/Horde/Db/Migration/Migrator.php b/framework/Db/lib/Horde/Db/Migration/Migrator.php index f7723725e..f1194e5cc 100644 --- a/framework/Db/lib/Horde/Db/Migration/Migrator.php +++ b/framework/Db/lib/Horde/Db/Migration/Migrator.php @@ -59,7 +59,9 @@ class Horde_Db_Migration_Migrator $this->_migrationsPath = $migrationsPath; /* @TODO */ //$this->_logger = $logger; + //$this->_inflector = $inflector; $this->_logger = new Horde_Support_Stub(); + $this->_inflector = new Horde_Support_Inflector(); $this->_connection->initializeSchemaInformation(); } @@ -200,11 +202,8 @@ class Horde_Db_Migration_Migrator */ protected function _getMigrationClass($migrationName, $version) { - $className = Horde_Support_Inflector::camelize($migrationName); - return new $className(array( - 'connection' => $this->_connection, - 'version' => $version, - )); + $className = $this->_inflector->camelize($migrationName); + return new $className($this->_connection, $version); } /** -- 2.11.0