Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/method/ConduitAPIMethod.php
| Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | abstract class ConduitAPIMethod | ||||
| public function getRequiredScope() { | public function getRequiredScope() { | ||||
| return self::SCOPE_NEVER; | return self::SCOPE_NEVER; | ||||
| } | } | ||||
| public function executeMethod(ConduitAPIRequest $request) { | public function executeMethod(ConduitAPIRequest $request) { | ||||
| $this->setViewer($request->getUser()); | $this->setViewer($request->getUser()); | ||||
| $client = $this->newConduitCallProxyClient($request); | |||||
| if ($client) { | |||||
| // We're proxying, so just make an intracluster call. | |||||
| return $client->callMethodSynchronous( | |||||
| $this->getAPIMethodName(), | |||||
| $request->getAllParameters()); | |||||
| } | |||||
| return $this->execute($request); | return $this->execute($request); | ||||
| } | } | ||||
| protected function newConduitCallProxyClient(ConduitAPIRequest $request) { | |||||
| return null; | |||||
| } | |||||
| abstract public function getAPIMethodName(); | abstract public function getAPIMethodName(); | ||||
| /** | /** | ||||
| * Return a key which sorts methods by application name, then method status, | * Return a key which sorts methods by application name, then method status, | ||||
| * then method name. | * then method name. | ||||
| */ | */ | ||||
| public function getSortOrder() { | public function getSortOrder() { | ||||
| $name = $this->getAPIMethodName(); | $name = $this->getAPIMethodName(); | ||||
| ▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines | |||||