public function getFunctionArguments($class, $method) {

        $ReflectionMethod = new \ReflectionMethod($class, $method);

        $paramsArray = array();
        foreach ($ReflectionMethod->getParameters() as $param) {
            $auxParam = array('name' => $param->getName(), 'isOptional' => false, 'initialValue' => null);
            if ($param->isOptional()) {
                $auxParam['isOptional'] = true;
                $auxParam['initialValue'] = $param->getDefaultValue();
            }
            $paramsArray[] = $auxParam;
        }
        return $paramsArray;
    }
public function getFunctionArguments($class, $method) {

        $ReflectionMethod = new \ReflectionMethod($class, $method);

        $paramsArray = array();
        foreach ($ReflectionMethod->getParameters() as $param) {
            $auxParam = array('name' => $param->getName(), 'isOptional' => false, 'initialValue' => null);
            if ($param->isOptional()) {
                $auxParam['isOptional'] = true;
                $auxParam['initialValue'] = $param->getDefaultValue();
            }
            $paramsArray[] = $auxParam;
        }
        return $paramsArray;
    }
public function getFunctionArguments ( $ class , $ method ) { $ ReflectionMethod = new \ ReflectionMethod ( $ class , $ method ) ; $ paramsArray = array ( ) ; foreach ( $ ReflectionMethod -> getParameters ( ) as $ param ) { $ auxParam = array ( 'name' => $ param -> getName ( ) , 'isOptional' => false , 'initialValue' => null ) ; if ( $ param -> isOptional ( ) ) { $ auxParam [ 'isOptional' ] = true ; $ auxParam [ 'initialValue' ] = $ param -> getDefaultValue ( ) ; } $ paramsArray [ ] = $ auxParam ; } return $ paramsArray ; }
This function returns the arguments of the method in class send it in the
parameters.

@param string | object $class
@param string $method
@return array of parameters <'name', 'isOptional', 'initialValue'>
This function returns the arguments of the method in class send it in the parameters .