PHP Class luya\helpers\ObjectHelper

Author: Basil Suter ([email protected])
Afficher le fichier Open project: zephir/luya Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat object

toArray() public static méthode

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