PHP Class luya\helpers\ObjectHelper

Author: Basil Suter ([email protected])
Exibir arquivo Open project: zephir/luya Class Usage Examples

Public Methods

Method Description
callMethodSanitizeArguments ( object $object, string $method, array $argumentsList = [] ) : object Call a method and ensure arguments.
toArray ( object $object ) Convert Object to Array

Method Details

callMethodSanitizeArguments() public static method

Call a class method with arguments and verify the arguments if they are in the list of method arguments or not. php ObjectHelper::callMethodSanitizeArguments(new MyClass(), 'methodToCall', ['paramName' => 'paramValue']);
public static callMethodSanitizeArguments ( object $object, string $method, array $argumentsList = [] ) : object
$object object The class object where the method must be found.
$method string The class method to call inside the object.
$argumentsList array A massiv assigned list of array items, where the key is bind to the method argument and the value to be passed in the method on call.
return object

toArray() public static method

Convert Object to Array
Since: 1.0.0-beta7
public static toArray ( object $object )
$object object