PHP Class DataSift\Storyplayer\PlayerLib\Action_LogItem

Show file Open project: datasift/storyplayer Class Usage Examples

Public Methods

Method Description
__construct ( DataSift\Storyplayer\Injectables $injectables, integer $nestLevel )
addStep ( string $text, callback $callable ) : mixed
captureOutput ( $text ) : void
closeAllOpenSubActions ( ) : void
endAction ( mixed $message = null )
endStep ( ) : void
getEndTime ( ) : float | null
getIsComplete ( ) : boolean
getIsOpen ( ) : boolean
getNestLevel ( ) : integer
getOpenAction ( ) : Action_LogItem | null
getStartTime ( ) : float | null
newNestedAction ( ) : Action_LogItem
startAction ( mixed $message, array | null $codeLine = null ) : Action_LogItem
startStep ( $text ) : void

Protected Methods

Method Description
writeToLog ( $text, $codeLine = null ) : void

Method Details

__construct() public method

public __construct ( DataSift\Storyplayer\Injectables $injectables, integer $nestLevel )
$injectables DataSift\Storyplayer\Injectables
$nestLevel integer

addStep() public method

public addStep ( string $text, callback $callable ) : mixed
$text string the message to write
$callable callback the function / lambda to call
return mixed

captureOutput() public method

public captureOutput ( $text ) : void
return void

closeAllOpenSubActions() public method

public closeAllOpenSubActions ( ) : void
return void

endAction() public method

public endAction ( mixed $message = null )
$message mixed

endStep() public method

public endStep ( ) : void
return void

getEndTime() public method

public getEndTime ( ) : float | null
return float | null

getIsComplete() public method

public getIsComplete ( ) : boolean
return boolean TRUE if the action is complete FALSE if the action is currently in progress or has never been started

getIsOpen() public method

public getIsOpen ( ) : boolean
return boolean TRUE if the action is currently in progress FALSE if the action is complete or has never been started

getNestLevel() public method

public getNestLevel ( ) : integer
return integer

getOpenAction() public method

public getOpenAction ( ) : Action_LogItem | null
return Action_LogItem | null

getStartTime() public method

public getStartTime ( ) : float | null
return float | null

newNestedAction() public method

public newNestedAction ( ) : Action_LogItem
return Action_LogItem

startAction() public method

public startAction ( mixed $message, array | null $codeLine = null ) : Action_LogItem
$message mixed the message to log. if it isn't a string, we'll convert it and apply the user's -V preference before logging
$codeLine array | null metadata about the line of code that we're logging about
return Action_LogItem return $this for fluent interfaces

startStep() public method

public startStep ( $text ) : void
return void

writeToLog() protected method

protected writeToLog ( $text, $codeLine = null ) : void
return void