1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02: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:
vrana 2012-12-14 17:00:43 -08:00
parent b05b9f2408
commit 95a99e71c6

View file

@ -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;
} }