"Aide.", 'log' => "", )); $opts->parse(); $optionsNb = count($opts->getOptions()); } catch (Zend_Console_Getopt_Exception $e) { $displayUsage = true; } // --- Aide / Options if ($optionsNb == 0 || isset($opts->help)) { $displayUsage = true; } // --- Usage if ($displayUsage) { echo "\nLog\n\n"; echo $opts->getUsageMessage(); exit; } if ($opts->log) { $sql = "SELECT * FROM sdv1.logs_item"; $stmt = $conn->prepare($sql); $stmt->execute(); $outPath = APPLICATION_PATH . '/../library/Scores/Account/Log/List.php'; $outFile = $outPath . '/Config.php'; if ($stmt->rowCount() > 0) { $result = $stmt->fetchAll(\PDO::FETCH_OBJ); 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); } }