PHP Class Kahlan\Plugin\Monkey

Mostrar archivo Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_registered array Registered monkey patches.

Public Methods

Method Description
patch ( string $source, string $dest = null ) Setup a monkey patch.
patched ( string $namespace, string $ref, boolean $isFunc = true, &$substitute = null ) : string Patches the string.
reset ( string $source = null ) Clears the registered references.

Method Details

patch() public static method

Setup a monkey patch.
public static patch ( string $source, string $dest = null )
$source string A fully namespaced reference string.
$dest string A fully namespaced reference string.

patched() public static method

Patches the string.
public static patched ( string $namespace, string $ref, boolean $isFunc = true, &$substitute = null ) : string
$namespace string The namespace.
$ref string The fully namespaced class/function reference string.
$isFunc boolean Boolean indicating if $ref is a function reference.
return string A fully namespaced reference.

reset() public static method

Clears the registered references.
public static reset ( string $source = null )
$source string A fully-namespaced reference string or `null` to clear all.

Property Details

$_registered protected_oe static_oe property

Registered monkey patches.
protected static array $_registered
return array