static function callMethodWithParams($actionClass, $method, $callParams = null) { if (is_object($actionClass)) { $reflectionClass = new ReflectionClass($actionClass); $params = __Request::getParams(); if ($reflectionClass->hasMethod($method)) { $reflectionMethod = $reflectionClass->getMethod($method); $methodParams = $reflectionMethod->getParameters(); $params = array(); foreach ($methodParams as $v) { $params[] = is_array($callParams) && isset($callParams[$v->name]) ? $callParams[$v->name] : __Request::get($v->name); } return call_user_func_array(array($actionClass, $method), $params); } } return false; }