PHP Class Eloquent\Phony\Mock\Builder\MockDefinition

Mostra file Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( array $types, array $customMethods, array $customProperties, array $customStaticMethods, array $customStaticProperties, array $customConstants, string | null $className, boolean $isTraitSupported, boolean $isRelaxedKeywordsSupported ) Construct a new mock definition.
className ( ) : string | null Get the class name.
customConstants ( ) : mixed>\array Get the custom constants.
customMethods ( ) : array> Get the custom methods.
customProperties ( ) : mixed>\array Get the custom properties.
customStaticMethods ( ) : array> Get the custom static methods.
customStaticProperties ( ) : mixed>\array Get the custom static properties.
interfaceNames ( ) : array Get the interface names.
isEqualTo ( MockDefinition $definition ) : boolean Check if the supplied definition is equal to this definition.
methods ( ) : MethodDefinitionCollection Get the method definitions.
parentClassName ( ) : string | null Get the parent class name.
signature ( ) : mixed Get the signature.
traitNames ( ) : array Get the trait names.
typeNames ( ) : array Get the type names.
types ( ) : ReflectionClass>\array Get the types.

Private Methods

Method Description
buildMethods ( )
inspectTypes ( )

Method Details

__construct() public method

Construct a new mock definition.
public __construct ( array $types, array $customMethods, array $customProperties, array $customStaticMethods, array $customStaticProperties, array $customConstants, string | null $className, boolean $isTraitSupported, boolean $isRelaxedKeywordsSupported )
$types array
$customMethods array
$customProperties array
$customStaticMethods array
$customStaticProperties array
$customConstants array
$className string | null The class name.
$isTraitSupported boolean True if traits are supported.
$isRelaxedKeywordsSupported boolean True if relaxed keywords are supported.

className() public method

Get the class name.
public className ( ) : string | null
return string | null The class name.

customConstants() public method

Get the custom constants.
public customConstants ( ) : mixed>\array
return mixed>\array

customMethods() public method

Get the custom methods.
public customMethods ( ) : array>
return array>

customProperties() public method

Get the custom properties.
public customProperties ( ) : mixed>\array
return mixed>\array

customStaticMethods() public method

Get the custom static methods.
public customStaticMethods ( ) : array>
return array>

customStaticProperties() public method

Get the custom static properties.
public customStaticProperties ( ) : mixed>\array
return mixed>\array

interfaceNames() public method

Get the interface names.
public interfaceNames ( ) : array
return array

isEqualTo() public method

Check if the supplied definition is equal to this definition.
public isEqualTo ( MockDefinition $definition ) : boolean
$definition MockDefinition
return boolean True if equal.

methods() public method

Calling this method will finalize the mock builder.
public methods ( ) : MethodDefinitionCollection
return Eloquent\Phony\Mock\Builder\Method\MethodDefinitionCollection The method definitions.

parentClassName() public method

Get the parent class name.
public parentClassName ( ) : string | null
return string | null The parent class name, or null if the mock will not extend a class.

signature() public method

This is an opaque value designed to aid in determining whether two mock definitions are the same.
public signature ( ) : mixed
return mixed The signature.

traitNames() public method

Get the trait names.
public traitNames ( ) : array
return array

typeNames() public method

Get the type names.
public typeNames ( ) : array
return array

types() public method

Get the types.
public types ( ) : ReflectionClass>\array
return ReflectionClass>\array