PHP Class DbPatch_Core_Writer

Author: Sandy Pleyte
Author: Martijn De Letter
Mostra file Open project: dbpatch/dbpatch Class Usage Examples

Protected Properties

Property Type Description
$_color DbPatch_Core_Color
$_debug boolean

Public Methods

Method Description
_message ( string $message, string $pallet = '' ) : DbPatch_Core_Writer Write an optionally colored message
debug ( string $message ) : DbPatch_Core_Writer Write a debug message
error ( string $message ) : DbPatch_Core_Writer Write a error message
indent ( integer $spaces = 4 ) : DbPatch_Core_Writer Indent output with spaces
info ( string $message ) : DbPatch_Core_Writer Write an info message
line ( string $message = '' ) : DbPatch_Core_Writer Outputs a message with a new line
output ( string $message = '', resource $stream = null ) : DbPatch_Core_Writer Outputs a message to the console
separate ( ) : DbPatch_Core_Writer Separate the output by outputting a dashed line
setColor ( DbPatch_Core_Color $color ) : DbPatch_Core_Writer Writer uses ANSI coloring when color object provided
setDebug ( $debug )
success ( string $message ) : DbPatch_Core_Writer Write a success message
version ( ) : DbPatch_Core_Writer Outputs the version of DbPatch
warning ( string $message ) : DbPatch_Core_Writer Write an warning messages

Method Details

_message() public method

Write an optionally colored message
public _message ( string $message, string $pallet = '' ) : DbPatch_Core_Writer
$message string
$pallet string
return DbPatch_Core_Writer

debug() public method

Write a debug message
public debug ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

error() public method

Write a error message
public error ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

indent() public method

Indent output with spaces
public indent ( integer $spaces = 4 ) : DbPatch_Core_Writer
$spaces integer
return DbPatch_Core_Writer

info() public method

Write an info message
public info ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

line() public method

Outputs a message with a new line
public line ( string $message = '' ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

output() public method

Outputs a message to the console
public output ( string $message = '', resource $stream = null ) : DbPatch_Core_Writer
$message string
$stream resource OPTIONAL, writes to standard output by default
return DbPatch_Core_Writer

separate() public method

Separate the output by outputting a dashed line
public separate ( ) : DbPatch_Core_Writer
return DbPatch_Core_Writer

setColor() public method

Writer uses ANSI coloring when color object provided
public setColor ( DbPatch_Core_Color $color ) : DbPatch_Core_Writer
$color DbPatch_Core_Color
return DbPatch_Core_Writer

setDebug() public method

public setDebug ( $debug )

success() public method

Write a success message
public success ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

version() public method

Outputs the version of DbPatch
public version ( ) : DbPatch_Core_Writer
return DbPatch_Core_Writer

warning() public method

Write an warning messages
public warning ( string $message ) : DbPatch_Core_Writer
$message string
return DbPatch_Core_Writer

Property Details

$_color protected_oe property

protected DbPatch_Core_Color $_color
return DbPatch_Core_Color

$_debug protected_oe property

protected bool $_debug
return boolean