Skip to content

Instantly share code, notes, and snippets.

@clue
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save clue/7ba3d639de9247085213 to your computer and use it in GitHub Desktop.

Select an option

Save clue/7ba3d639de9247085213 to your computer and use it in GitHub Desktop.
<?php
class EnterpriseApi extends Clue\React\Soap\Proxy
{
public function __call($method, $args)
{
if (!in_array($method, array('DoAuthenticateUserWithPlaintextPassword', 'BypassTheAuthenticationFramework', 'debug'))) {
$d = new React\Promise\Deferred();
$d->reject(new \Exception('This is an enterprise API!!11'));
return $d->promise();
}
return parent::__call($method, $args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment