Class Horde_Log_Filter_Constraint
Filters log events using defined constraints on one or more fields of the
$event array.
-
Horde_Log_Filter_Constraint
implements
Horde_Log_Filter
Methods summary
public
|
#
__construct( Horde_Constraint_Coupler $coupler = null )
Constructor
Parameters
- $coupler
- <p>The default kind of
constraint to use to couple
multiple constraints.
Defaults to And.</p>
|
public
Horde_Log_Filter_Constraint
|
#
addConstraint( string $field, Horde_Constraint $constraint )
Add a constraint to the filter
Add a constraint to the filter
Parameters
- $field
- <p>The field to apply the constraint
to.</p>
- $constraint
- The constraint to apply.
Returns
|
public
Horde_Log_Filter_Constraint
|
#
addRegex( string $field, string $regex )
Add a regular expression to filter by
Add a regular expression to filter by
Takes a field name and a regex, if the regex does not match then the
event is filtered.
Parameters
- $field
- <p>The name of the field that should be part of the
event.</p>
- $regex
- The regular expression to filter by.
Returns
|
public
Horde_Log_Filter_Constraint
|
#
addRequiredField( string $field )
Add a required field to the filter
Add a required field to the filter
If the field does not exist on the event, then it is filtered.
Parameters
- $field
- <p>The name of the field that should be part of the
event.</p>
Returns
|
public
Horde_Log_Filter_Constraint
|
#
addRequiredFields( )
Adds all arguments passed as required fields
Adds all arguments passed as required fields
Returns
|
public
boolean
|
#
accept( array $event )
Returns Horde_Log_Filter::ACCEPT to accept the message,
Horde_Log_Filter::IGNORE to ignore it.
Returns Horde_Log_Filter::ACCEPT to accept the message,
Horde_Log_Filter::IGNORE to ignore it.
Parameters
Returns
boolean accepted?
Implementation of
|