"Aide.", 'log' => "", ) ); $opts->parse(); } catch (Zend_Console_Getopt_Exception $e) { $displayUsage = true; } // --- Aide / Options if (count($opts->getOptions())==0 || isset($opts->help)) { $displayUsage = true; } // --- Usage if ($displayUsage) { echo "\nLog\n\n"; echo $opts->getUsageMessage(); exit; } if ($opts->log) { $c = new Zend_Config($application->getOptions()); $db = Zend_Db::factory($c->profil->db->metier); Zend_Db_Table::setDefaultAdapter($db); $sql = $db->select()->from('logs_item', '*', 'sdv1'); $stmt = $db->query($sql); $outPath = APPLICATION_PATH . '/../library/Scores/Account/Log/List.php'; $outFile = $outPath . '/Config.php'; if ($stmt->rowCount() > 0) { $result = $stmt->fetchAll(Zend_Db::FETCH_ASSOC); file_put_contents($outFile, "Code . "' => array(,\n", FILE_APPEND); file_put_contents($outFile, "\t\t'Label' => ". $c->Label . ",\n", FILE_APPEND); file_put_contents($outFile, "\t\'Description' => ". $c->Description . ",\n", FILE_APPEND); file_put_contents($outFile, "\t\t'Category' => ". $c->Category . ",\n", FILE_APPEND); file_put_contents($outFile, "\t),\n", FILE_APPEND); } file_put_contents($outFile, ");\n", FILE_APPEND); } }