Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/call/ConduitCall.php
Show All 9 Lines | |||||
*/ | */ | ||||
final class ConduitCall { | final class ConduitCall { | ||||
private $method; | private $method; | ||||
private $request; | private $request; | ||||
private $user; | private $user; | ||||
public function __construct($method, array $params) { | public function __construct($method, array $params) { | ||||
$this->method = $method; | $this->method = $method; | ||||
$this->handler = $this->buildMethodHandler($method); | $this->handler = $this->buildMethodHandler($method); | ||||
$param_types = $this->handler->defineParamTypes(); | $param_types = $this->handler->getParamTypes(); | ||||
foreach ($param_types as $key => $spec) { | foreach ($param_types as $key => $spec) { | ||||
if (ConduitAPIMethod::getParameterMetadataKey($key) !== null) { | if (ConduitAPIMethod::getParameterMetadataKey($key) !== null) { | ||||
throw new ConduitException( | throw new ConduitException( | ||||
pht( | pht( | ||||
'API Method "%s" defines a disallowed parameter, "%s". This '. | 'API Method "%s" defines a disallowed parameter, "%s". This '. | ||||
'parameter name is reserved.', | 'parameter name is reserved.', | ||||
$method, | $method, | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |