PHP Class Neos\Flow\ResourceManagement\Publishing\MessageCollector

Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$messages SplObjectStorage
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Public Methods

Method Description
__construct ( ) Message Collector Constructor
__destruct ( ) : void Flush all notification during the object lifecycle
append ( string $message, string $severity = Error::SEVERITY_ERROR, integer $code = null ) : void
flush ( callable $callback = null ) : void
hasMessages ( ) : boolean

Method Details

__construct() public method

Message Collector Constructor
public __construct ( )

__destruct() public method

Flush all notification during the object lifecycle
public __destruct ( ) : void
return void

append() public method

public append ( string $message, string $severity = Error::SEVERITY_ERROR, integer $code = null ) : void
$message string The message to log
$severity string An integer value, one of the Error::SEVERITY_* constants
$code integer A unique error code
return void

flush() public method

public flush ( callable $callback = null ) : void
$callback callable a callback function to process every notification
return void

hasMessages() public method

public hasMessages ( ) : boolean
return boolean

Property Details

$messages protected property

protected SplObjectStorage $messages
return SplObjectStorage

$systemLogger protected property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
return Neos\Flow\Log\SystemLoggerInterface