mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 11:21:01 +01:00
Require Conduit methods to be instances of ConduitAPIMethod
Test Plan: Deleted `extends ConduitAPIMethod`, then: $ echo '{}' | arc call-conduit conduit.ping Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4190
This commit is contained in:
parent
b05b9f2408
commit
95a99e71c6
1 changed files with 9 additions and 1 deletions
|
@ -81,7 +81,15 @@ final class ConduitCall {
|
||||||
"base class.");
|
"base class.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return newv($method_class, array());
|
$method = newv($method_class, array());
|
||||||
|
|
||||||
|
if (!($method instanceof ConduitAPIMethod)) {
|
||||||
|
throw new ConduitException(
|
||||||
|
"Method '{$method}' is not valid; the implementation must be ".
|
||||||
|
"a subclass of ConduitAPIMethod.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue