original_string: function register(
          $name, $in = [], $out = [], $namespace = FALSE, $soapaction = FALSE, $style = FALSE, $use = FALSE, $documentation = '',
          $encodingStyle = ''
      ) {
          global $HTTP_SERVER_VARS;
  
          if ($this->externalWSDLURL) {
              die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
          }
          if (!$name) {
              die('You must specify a name when you register an operation');
          }
          if (!is_array($in)) {
              die('You must provide an array for operation inputs');
          }
          if (!is_array($out)) {
              die('You must provide an array for operation outputs');
          }
          if (FALSE == $namespace) {
          }
          if (FALSE == $soapaction) {
              if (isset($_SERVER)) {
                  $SERVER_NAME = $_SERVER['SERVER_NAME'];
                  $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
                  $HTTPS       = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off');
              } elseif (isset($HTTP_SERVER_VARS)) {
                  $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
                  $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
                  $HTTPS       = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off';
              } else {
                  $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
              }
              if ($HTTPS == '1' || $HTTPS == 'on') {
                  $SCHEME = 'https';
              } else {
                  $SCHEME = 'http';
              }
              $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name";
          }
          if (FALSE == $style) {
              $style = "rpc";
          }
          if (FALSE == $use) {
              $use = "encoded";
          }
          if ($use == 'encoded' && $encodingStyle == '') {
              $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
          }
  
          $this->operations[$name] = [
              'name'       => $name,
              'in'         => $in,
              'out'        => $out,
              'namespace'  => $namespace,
              'soapaction' => $soapaction,
              'style'      => $style];
          if ($this->wsdl) {
              $this->wsdl->addOperation($name, $in, $out, $namespace, $soapaction, $style, $use, $documentation, $encodingStyle);
          }
  
          return TRUE;
      }
code: function register(
          $name, $in = [], $out = [], $namespace = FALSE, $soapaction = FALSE, $style = FALSE, $use = FALSE, $documentation = '',
          $encodingStyle = ''
      ) {
          global $HTTP_SERVER_VARS;
  
          if ($this->externalWSDLURL) {
              die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
          }
          if (!$name) {
              die('You must specify a name when you register an operation');
          }
          if (!is_array($in)) {
              die('You must provide an array for operation inputs');
          }
          if (!is_array($out)) {
              die('You must provide an array for operation outputs');
          }
          if (FALSE == $namespace) {
          }
          if (FALSE == $soapaction) {
              if (isset($_SERVER)) {
                  $SERVER_NAME = $_SERVER['SERVER_NAME'];
                  $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
                  $HTTPS       = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off');
              } elseif (isset($HTTP_SERVER_VARS)) {
                  $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
                  $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
                  $HTTPS       = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off';
              } else {
                  $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
              }
              if ($HTTPS == '1' || $HTTPS == 'on') {
                  $SCHEME = 'https';
              } else {
                  $SCHEME = 'http';
              }
              $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name";
          }
          if (FALSE == $style) {
              $style = "rpc";
          }
          if (FALSE == $use) {
              $use = "encoded";
          }
          if ($use == 'encoded' && $encodingStyle == '') {
              $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
          }
  
          $this->operations[$name] = [
              'name'       => $name,
              'in'         => $in,
              'out'        => $out,
              'namespace'  => $namespace,
              'soapaction' => $soapaction,
              'style'      => $style];
          if ($this->wsdl) {
              $this->wsdl->addOperation($name, $in, $out, $namespace, $soapaction, $style, $use, $documentation, $encodingStyle);
          }
  
          return TRUE;
      }
code_tokens: function register ( $ name , $ in = [ ] , $ out = [ ] , $ namespace = FALSE , $ soapaction = FALSE , $ style = FALSE , $ use = FALSE , $ documentation = '' , $ encodingStyle = '' ) { global $ HTTP_SERVER_VARS ; if ( $ this -> externalWSDLURL ) { die ( 'You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.' ) ; } if ( ! $ name ) { die ( 'You must specify a name when you register an operation' ) ; } if ( ! is_array ( $ in ) ) { die ( 'You must provide an array for operation inputs' ) ; } if ( ! is_array ( $ out ) ) { die ( 'You must provide an array for operation outputs' ) ; } if ( FALSE == $ namespace ) { } if ( FALSE == $ soapaction ) { if ( isset ( $ _SERVER ) ) { $ SERVER_NAME = $ _SERVER [ 'SERVER_NAME' ] ; $ SCRIPT_NAME = isset ( $ _SERVER [ 'PHP_SELF' ] ) ? $ _SERVER [ 'PHP_SELF' ] : $ _SERVER [ 'SCRIPT_NAME' ] ; $ HTTPS = isset ( $ _SERVER [ 'HTTPS' ] ) ? $ _SERVER [ 'HTTPS' ] : ( isset ( $ HTTP_SERVER_VARS [ 'HTTPS' ] ) ? $ HTTP_SERVER_VARS [ 'HTTPS' ] : 'off' ) ; } elseif ( isset ( $ HTTP_SERVER_VARS ) ) { $ SERVER_NAME = $ HTTP_SERVER_VARS [ 'SERVER_NAME' ] ; $ SCRIPT_NAME = isset ( $ HTTP_SERVER_VARS [ 'PHP_SELF' ] ) ? $ HTTP_SERVER_VARS [ 'PHP_SELF' ] : $ HTTP_SERVER_VARS [ 'SCRIPT_NAME' ] ; $ HTTPS = isset ( $ HTTP_SERVER_VARS [ 'HTTPS' ] ) ? $ HTTP_SERVER_VARS [ 'HTTPS' ] : 'off' ; } else { $ this -> setError ( "Neither _SERVER nor HTTP_SERVER_VARS is available" ) ; } if ( $ HTTPS == '1' || $ HTTPS == 'on' ) { $ SCHEME = 'https' ; } else { $ SCHEME = 'http' ; } $ soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name" ; } if ( FALSE == $ style ) { $ style = "rpc" ; } if ( FALSE == $ use ) { $ use = "encoded" ; } if ( $ use == 'encoded' && $ encodingStyle == '' ) { $ encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/' ; } $ this -> operations [ $ name ] = [ 'name' => $ name , 'in' => $ in , 'out' => $ out , 'namespace' => $ namespace , 'soapaction' => $ soapaction , 'style' => $ style ] ; if ( $ this -> wsdl ) { $ this -> wsdl -> addOperation ( $ name , $ in , $ out , $ namespace , $ soapaction , $ style , $ use , $ documentation , $ encodingStyle ) ; } return TRUE ; }
docstring: register a service function with the server
  
  @param string $name             the name of the PHP function, class.method or class..method
  @param array  $in               assoc array of input values: key = param name, value = param type
  @param array  $out              assoc array of output values: key = param name, value = param type
  @param mixed  $namespace        the element namespace for the method or false
  @param mixed  $soapaction       the soapaction for the method or false
  @param mixed  $style            optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers
  are created for you automatically
  @param mixed  $use              optional (encoded|literal) or false
  @param string $documentation    optional Description to include in WSDL
  @param string $encodingStyle    optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
  
  @access   public
docstring_tokens: register a service function with the server