diff options
Diffstat (limited to 'lib/sfIsisImporterManager.class.php')
-rw-r--r-- | lib/sfIsisImporterManager.class.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/lib/sfIsisImporterManager.class.php b/lib/sfIsisImporterManager.class.php index c08545a..b7c4608 100644 --- a/lib/sfIsisImporterManager.class.php +++ b/lib/sfIsisImporterManager.class.php @@ -105,6 +105,38 @@ class sfIsisImporterManager extends IsisConnector } /** + * Show database information. + * + * @param mixed $databases Optional database names + */ + public function info($caller, $section = 'info', $databases = null) + { + // Additional logging settings. + $this->logger->setCaller($caller); + $this->logger->setSection($section); + + if ($databases == null) + { + $databases = $this->databases(); + } + elseif (!is_array($databases)) + { + $databases = array($databases); + } + + foreach ($databases as $database) + { + // Open database. + $importer = $this->newImporter($database); + + if ($importer) + { + $this->log("Database $database: ". $importer->isis->entries .' rows.'); + } + } + } + + /** * After import procedure. */ public function afterImport() { @@ -130,7 +162,7 @@ class sfIsisImporterManager extends IsisConnector * @param string $section Caller section (whether an action or task) * @param int $entries Number of entries to import (defaults to all) */ - public function massImport($caller, $section, $entries = NULL, $offset = 0) + public function massImport($caller, $section, $entries = null, $offset = 0) { // Additional logging settings. $this->logger->setCaller($caller); |