TorneLIB\Module\Network\NetWrapper
Class NetWrapper Taking over from v6.0 MODULE_CURL.
Synopsis
class NetWrapper
implements
WrapperInterface
{
- // members
- private WrapperConfig $CONFIG;
- private $selectedWrapper;
- private bool $isSoapRequest = false;
- private array $multiRequest = ;
- private bool $allowInternalMulti = false;
- private bool $instantCurlMultiErrors = false;
- private WrapperInterface $instance;
- // methods
- public void __construct()
- private void initializeWrappers()
- public NetWrapper setIdentifiers()
- public NetWrapper setHeader()
- public string getVersion()
- public bool getIsSoap()
- public mixed getWrappers()
- public bool getAllowInternalMulti()
- public NetWrapper setAllowInternalMulti()
- public NetWrapper setConfig()
- public WrapperConfig getConfig()
- public NetWrapper setAuthentication()
- public array getAuthentication()
- public string register()
- public mixed getBody()
- public mixed getParsed()
- private mixed|null getMultiInstance()
- public mixed getCode()
- public WrapperInterface getWrapper()
- private array handleMultiUrl()
- private NetWrapper getMultiInternalRequest()
- public void request()
- private mixed|null getResultFromInternals()
- public $this setProxy()
- public $this setCurlMultiInstantException()
- private mixed|WrapperInterface getProperInstanceWrapper()
- public string getSelectedWrapper()
- public string getCurrentWrapperClass()
- private void getInstantiationException()
- private mixed|null requestExternalExecute()
- private mixed|null requestExternal()
- public mixed __call()
Hierarchy
Implements
Members
private
- $CONFIG — TorneLIB\Module\Config\WrapperConfig
- $allowInternalMulti — TorneLIB\Module\Network\bool
- $instance — TorneLIB\Model\Interfaces\WrapperInterface
- $instantCurlMultiErrors — TorneLIB\Module\Network\bool
- $isSoapRequest — TorneLIB\Module\Network\bool
- $multiRequest — array
- $selectedWrapper
—
string
Chosen wrapper.
Methods
private
- getInstantiationException() — Check if return value is null and if, do thrown an exception. This is done if no instances has been successfully created during request.
- getMultiInstance()
- getMultiInternalRequest()
- getProperInstanceWrapper() — Get proper instance.
- getResultFromInternals() — Make request from built in wrappers (the internally supported).
- handleMultiUrl()
- initializeWrappers()
- requestExternal() — Make a request with help from external wrappers.
- requestExternalExecute() — Initiate an external wrapper request. This actually initiates a "wrapper loop" that runs through each registered wrapper and uses the first that responds correctly. Method is collected here as it runs both in the top of request (if prioritized like that) and in the bottom if developers primarily prefers to use internal classes before their own.
public
- __construct()
- __call()
- getAllowInternalMulti()
- getAuthentication()
- getBody() — Return body of the request.
- getCode()
- getConfig()
- getCurrentWrapperClass() — Get current used wrapper class name (short or with full namespace).
- getIsSoap()
- getParsed()
- getSelectedWrapper() — Entry point.
- getVersion()
- getWrapper()
- getWrappers() — Get list of internal wrappers.
- register() — Register an external wrapper/module/communicator.
- request()
- setAllowInternalMulti()
- setAuthentication()
- setConfig()
- setCurlMultiInstantException() — Set up so that curlwrapper makes instant exceptions on curl_multi requests, if they occur. Mirrormethod.
- setHeader()
- setIdentifiers() — Allows strict identification in user-agent header.
- setProxy() — Set up proxy.