DbPatch_Core_Writer::warning PHP Method

warning() public method

Write an warning messages
public warning ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer
    public function warning($message)
    {
        return $this->_message('WARNING: ' . $message, 'warning');
    }

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));
     }
 }
All Usage Examples Of DbPatch_Core_Writer::warning