Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionQuery.php
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | final public static function callConduitWithDiffusionRequest( | ||||
if ($drequest->getBranch() !== null) { | if ($drequest->getBranch() !== null) { | ||||
$core_params['branch'] = $drequest->getBranch(); | $core_params['branch'] = $drequest->getBranch(); | ||||
} | } | ||||
// If the method we're calling doesn't actually take some of the implicit | // If the method we're calling doesn't actually take some of the implicit | ||||
// parameters we derive from the DiffusionRequest, omit them. | // parameters we derive from the DiffusionRequest, omit them. | ||||
$method_object = ConduitAPIMethod::getConduitMethod($method); | $method_object = ConduitAPIMethod::getConduitMethod($method); | ||||
$method_params = $method_object->defineParamTypes(); | $method_params = $method_object->getParamTypes(); | ||||
foreach ($core_params as $key => $value) { | foreach ($core_params as $key => $value) { | ||||
if (empty($method_params[$key])) { | if (empty($method_params[$key])) { | ||||
unset($core_params[$key]); | unset($core_params[$key]); | ||||
} | } | ||||
} | } | ||||
$params = $params + $core_params; | $params = $params + $core_params; | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |