PHP Класс luya\helpers\ObjectHelper

Автор: Basil Suter ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
callMethodSanitizeArguments ( object $object, string $method, array $argumentsList = [] ) : object Call a method and ensure arguments.
toArray ( object $object ) Convert Object to Array

Описание методов

callMethodSanitizeArguments() публичный статический Метод

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.
Результат object

toArray() публичный статический Метод

Convert Object to Array
С версии: 1.0.0-beta7
public static toArray ( object $object )
$object object