DbPatch_Core_Writer::line PHP Method

line() public method

Outputs a message with a new line
public line ( string $message = '' ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer
    public function line($message = '')
    {
        return $this->info($message);
    }

Usage Example

Example #1
0
 /**
  * Store patchfile entry to the changelog table
  * 
  * @param array $patchFile
  * @param string $description
  * @return void
  */
 protected function addToChangelog($patchFile, $description = null)
 {
     if ($description == null) {
         $description = $patchFile->description;
     }
     if ($this->isPatchApplied($patchFile->patch_number, $patchFile->branch)) {
         $this->writer->warning(sprintf('Skip %s, already exists in the changelog', $patchFile->basename));
     } else {
         $db = $this->getDb();
         $sql = sprintf("\n                INSERT INTO %s (patch_number, branch, completed, filename, description, hash)\n                VALUES(%d, %s, NOW(), %s, %s, %s)", $db->quoteIdentifier(self::TABLE), $patchFile->patch_number, $db->quote($patchFile->branch), $db->quote($patchFile->basename), $db->quote($description), $db->quote($patchFile->hash));
         $db->query($sql);
         $db->commit();
         $this->writer->line(sprintf('added %s to the changelog ', $patchFile->basename));
     }
 }