Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class ConduitGetCapabilitiesConduitAPIMethod extends ConduitAPIMethod { pu..

Decoded Output download

<?php

final class ConduitGetCapabilitiesConduitAPIMethod extends ConduitAPIMethod {

  public function getAPIMethodName() {
    return 'conduit.getcapabilities';
  }

  public function shouldRequireAuthentication() {
    return false;
  }

  public function getMethodDescription() {
    return pht(
      'List capabilities, wire formats, and authentication protocols '.
      'available on this server.');
  }

  protected function defineParamTypes() {
    return array();
  }

  protected function defineReturnType() {
    return 'dict<string, any>';
  }

  public function getRequiredScope() {
    return self::SCOPE_ALWAYS;
  }

  protected function execute(ConduitAPIRequest $request) {
    $authentication = array(
      'token',
      'asymmetric',
      'session',
      'sessionless',
    );

    $oauth_app = 'PhabricatorOAuthServerApplication';
    if (PhabricatorApplication::isClassInstalled($oauth_app)) {
      $authentication[] = 'oauth';
    }

    return array(
      'authentication' => $authentication,
      'signatures' => array(
        'consign',
      ),
      'input' => array(
        'json',
        'urlencoded',
      ),
      'output' => array(
        'json',
        'human',
      ),
    );
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class ConduitGetCapabilitiesConduitAPIMethod extends ConduitAPIMethod {

  public function getAPIMethodName() {
    return 'conduit.getcapabilities';
  }

  public function shouldRequireAuthentication() {
    return false;
  }

  public function getMethodDescription() {
    return pht(
      'List capabilities, wire formats, and authentication protocols '.
      'available on this server.');
  }

  protected function defineParamTypes() {
    return array();
  }

  protected function defineReturnType() {
    return 'dict<string, any>';
  }

  public function getRequiredScope() {
    return self::SCOPE_ALWAYS;
  }

  protected function execute(ConduitAPIRequest $request) {
    $authentication = array(
      'token',
      'asymmetric',
      'session',
      'sessionless',
    );

    $oauth_app = 'PhabricatorOAuthServerApplication';
    if (PhabricatorApplication::isClassInstalled($oauth_app)) {
      $authentication[] = 'oauth';
    }

    return array(
      'authentication' => $authentication,
      'signatures' => array(
        'consign',
      ),
      'input' => array(
        'json',
        'urlencoded',
      ),
      'output' => array(
        'json',
        'human',
      ),
    );
  }

}

Function Calls

None

Variables

None

Stats

MD5 d9a3b531121138f3fb870bf7bd3693ac
Eval Count 0
Decode Time 84 ms