MatchInterface Interface Reference

Inheritance diagram for MatchInterface:

MatchGatekeeper MatchGroup MatchListInterface MatchName MatchRegularExpression

List of all members.

Public Member Functions

 setNotFoundValue ($objNotFoundValue)
 getNotFoundValue ()
 found ($objName)
 match ($objName)


Detailed Description

Author:
Thiago Henrique Ramos da Mata <thiago.henrique.mata@gmail.com>
Since:
2009-06-16
Define the behavior of one match

One match implementation deal with names <name> and with values <value>.

What value the match method MatchInterface::match() will returns it is customizable to each implementation of this interface.

When MatchInterface::found() method be called, the class should returns true , when the matching process be successfuly or false , otherwise.

When MatchInterface::match() method be called, the matching process should return the value of the matching sucessfuly process.

Case, the received name be unable to match sucessfuly, the MatchInterface::match() should return the NotFoundValue informed into the MatchInterface::setNotFoundValue().

Definition at line 31 of file MatchInterface.interface.php.


Member Function Documentation

found ( objName  ) 

Match the name received and returns true if successfully match or false otherwise.

Implements:
MatchInterface::found( <name> object )
Parameters:
object <name> $objName
Returns:
boolean

Implemented in MatchGatekeeper, MatchGroup, MatchName, and MatchRegularExpression.

getNotFoundValue (  ) 

Get the not found value.

This value will be returned when the name received don't match with any element into the item list in the match() method

Implements:
MatchInterface::getNotFoundValue()
See also:
MatchInterface::match( <name> object )
Returns:
object <value>

Implemented in MatchGatekeeper, MatchGroup, MatchName, and MatchRegularExpression.

match ( objName  ) 

When MatchInterface::match() method be called, the matching process should return the <value> of the matching sucessfuly process.

Case, the received <name> be unable to match sucessfuly, the MatchInterface::match() should return the NotFoundValue informed into the MatchInterface::setNotFoundValue().

Implements:
MatchInterface::match( <name> object )
See also:
MatchInterface::getNotFoundValue()
Parameters:
object <name> $objName
Returns:
object <value>

Implemented in MatchGatekeeper, MatchGroup, MatchName, and MatchRegularExpression.

setNotFoundValue ( objNotFoundValue  ) 

Set the not found value.

Changing this value will change how the result of the match() method when not item match with the received name

Implements:
MatchInterface::match( <name> object )
See also:
MatchInterface::setNotFoundValue( <value> object )
Parameters:
object $objNotFoundValue
Returns:
MatchInterface me

Implemented in MatchGatekeeper, MatchGroup, MatchName, and MatchRegularExpression.


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

Generated on Thu Feb 3 03:55:03 2011 for CodeToDiagram by  doxygen 1.5.9