PHP Class Kahlan\Plugin\Call\Message

Datei anzeigen Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_args array Message arguments.
$_classes array Class dependencies.
$_name string Message name.
$_parent mixed Parent instance.
$_reference mixed Message reference.
$_static boolean Static call.

Public Methods

Method Description
__construct ( array $config = [] ) The Constructor.
args ( ) : array Get message arguments.
isStatic ( ) : boolean Check if the method is a static method.
match ( array $call, boolean $withArgs = true ) : boolean Check if this message is compatible with passed call array.
matchArgs ( array $args ) : boolean Check if this stub is compatible with passed args.
name ( ) : string Get message name.
parent ( ) : mixed Get the parent.
reference ( ) : mixed Get the message reference.
where ( $requirements = [] ) : self Set arguments requirement indexed by method name.
with ( ) : self Set arguments requirement.

Method Details

__construct() public method

The Constructor.
public __construct ( array $config = [] )
$config array Possible options are: - `'reference'` _mixed_ : The message reference. - `'name'` _string_ : The message name. - `'args'` _array_ : The message arguments. - `'static'` _boolean_: `true` if the method is static, `false` otherwise.

args() public method

Get message arguments.
public args ( ) : array
return array

isStatic() public method

Check if the method is a static method.
public isStatic ( ) : boolean
return boolean

match() public method

Check if this message is compatible with passed call array.
public match ( array $call, boolean $withArgs = true ) : boolean
$call array A call array.
$withArgs boolean Boolean indicating if matching should take arguments into account.
return boolean

matchArgs() public method

Check if this stub is compatible with passed args.
public matchArgs ( array $args ) : boolean
$args array The passed arguments.
return boolean

name() public method

Get message name.
public name ( ) : string
return string

parent() public method

Get the parent.
public parent ( ) : mixed
return mixed

reference() public method

Get the message reference.
public reference ( ) : mixed
return mixed

where() public method

Set arguments requirement indexed by method name.
public where ( $requirements = [] ) : self
return self

with() public method

Set arguments requirement.
public with ( ) : self
return self

Property Details

$_args protected_oe property

Message arguments.
protected array $_args
return array

$_classes protected_oe property

Class dependencies.
protected array $_classes
return array

$_name protected_oe property

Message name.
protected string $_name
return string

$_parent protected_oe property

Parent instance.
protected mixed $_parent
return mixed

$_reference protected_oe property

Message reference.
protected mixed $_reference
return mixed

$_static protected_oe property

Static call.
protected bool $_static
return boolean