Plop
A simple logging library for PHP
Plop\FormatterInterface Interface Reference

Interface to a record formatter. More...

+ Inheritance diagram for Plop\FormatterInterface:

Public Member Functions

 format (\Plop\RecordInterface $record)
 
 getDateFormat ()
 
 getFormat ()
 
 getInterpolator ()
 
 getPythonLike ()
 
 getTimezone ()
 
 setDateFormat ($dateFormat)
 
 setFormat ($format)
 
 setInterpolator (\Plop\InterpolatorInterface $interpolator)
 
 setPythonLike ($pythonLike)
 
 setTimezone (\DateTimeZone $timezone=null)
 

Detailed Description

Interface to a record formatter.

Definition at line 27 of file FormatterInterface.php.

Member Function Documentation

Plop\FormatterInterface::format ( \Plop\RecordInterface  $record)

Format a record.

Parameters
Plop::RecordInterface$recordThe record to format.
Return values
stringFormatted string representing the given record.

Implemented in Plop\Formatter.

Plop\FormatterInterface::getDateFormat ( )

Return the format used to render dates.

Return values
stringThe format used to render dates.

Implemented in Plop\Formatter.

Plop\FormatterInterface::getFormat ( )

Return the general format used to render records.

Return values
stringThe format used to render records.

Implemented in Plop\Formatter.

Plop\FormatterInterface::getTimezone ( )

Return the timezone object used to format dates/times.

Return values
DateTimeZoneTimezone object used to format dates/times.
nullReturned when no particular timezone is used to format dates/times (ie. the local timezone is used).

Implemented in Plop\Formatter.

Plop\FormatterInterface::setDateFormat (   $dateFormat)

Set the format used to render dates.

Parameters
string$dateFormatThe new format to use.
Return values
Plop::FormatterInterfaceThe formatter instance (ie. $this).

Implemented in Plop\Formatter.

Plop\FormatterInterface::setFormat (   $format)

Set the format used to render records.

Parameters
string$formatThe new format to use.
Return values
Plop::FormatterInterfaceThe formatter instance (ie. $this).

Implemented in Plop\Formatter.

Plop\FormatterInterface::setTimezone ( \DateTimeZone  $timezone = null)

Set the timezone to use to format dates/times.

Parameters
DateTimeZone | null$timezone(optional) Timezone to use to format dates/times. If null or omitted, the defaut (local) timezone is used.
Return values
Plop::FormatterInterfaceThe formatter instance (ie. $this).

Implemented in Plop\Formatter.


The documentation for this interface was generated from the following file: