Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mongo Class Reference

Mongo log writer. More...

Public Member Functions

 __construct ($mongo, $database=null, $collection=null, array $saveOptions=[])
 Constructor.
 
 setFormatter ($formatter)
 This writer does not support formatting.
 
- Public Member Functions inherited from AbstractWriter
 __construct ($options=null)
 Constructor.
 
 addFilter ($filter, array $options=null)
 Add a filter specific to this writer.
 
 getFilterPluginManager ()
 Get filter plugin manager.
 
 setFilterPluginManager ($plugins)
 Set filter plugin manager.
 
 filterPlugin ($name, array $options=null)
 Get filter instance.
 
 getFormatterPluginManager ()
 Get formatter plugin manager.
 
 setFormatterPluginManager ($plugins)
 Set formatter plugin manager.
 
 formatterPlugin ($name, array $options=null)
 Get formatter instance.
 
 write (array $event)
 Log a message to this writer.
 
 setFormatter ($formatter, array $options=null)
 Set a new formatter for this writer.
 
 setConvertWriteErrorsToExceptions ($convertErrors)
 Set convert write errors to exception flag.
 
 shutdown ()
 Perform shutdown activities such as closing open resources.
 
- Public Member Functions inherited from WriterInterface
 addFilter ($filter)
 Add a log filter to the writer.
 

Protected Member Functions

 doWrite (array $event)
 Write a message to the log.
 
- Protected Member Functions inherited from AbstractWriter
 getFormatter ()
 Get formatter.
 
 hasFormatter ()
 Check if the writer has a formatter.
 
 doWrite (array $event)
 Write a message to the log.
 

Protected Attributes

 $mongoCollection
 
 $saveOptions
 
- Protected Attributes inherited from AbstractWriter
 $filterPlugins
 
 $formatterPlugins
 
 $filters = []
 
 $formatter
 
 $convertWriteErrorsToExceptions = true
 
 $errorsToExceptionsConversionLevel = E_WARNING
 

Detailed Description

Mongo log writer.

Constructor & Destructor Documentation

__construct (   $mongo,
  $database = null,
  $collection = null,
array  $saveOptions = [] 
)

Constructor.

Parameters
MongoC | MongoClient | array | Traversable$mongo
string$database
string$collection
array$saveOptions
Exceptions
Exception\InvalidArgumentException
Exception\ExtensionNotLoadedException

Member Function Documentation

doWrite ( array  $event)
protected

Write a message to the log.

Parameters
array$eventEvent data
Returns
void
Exceptions
Exception\RuntimeException
setFormatter (   $formatter)

This writer does not support formatting.

Parameters
string | FormatterInterface$formatter
Returns
WriterInterface

Implements WriterInterface.

Member Data Documentation

$mongoCollection
protected
$saveOptions
protected