Function Hook_translation_bing_translator->_bing_translator_api_request

Definitions

sources/hooks/systems/translation/bing_translator.php

  • Call a Bing Translator API.Needs to be public as it is used in a callback.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$url URLPATH No No required parameter N/A N/A API URL to call
$request ?array No No Null N/A N/A Request data (null: GET request)
&$errormsg ?string Yes No Null N/A N/A Error message (returned by reference) (null: not set yet)

Returns

  • Result (null: some kind of error)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Call a Bing Translator API.Needs to be public as it is used in a callback.
 *
 * @param  URLPATH $url API URL to call
 * @param  ?array $request Request data (null: GET request)
 * @param  ?string $errormsg Error message (returned by reference) (null: not set yet)
 * @return ?array Result (null: some kind of error)
 */

public function _bing_translator_api_request(string $url, ?array $request = null, ?string &$errormsg = null) : ?array