Returns currently used SOAP library hook.

If no library hook is set, a new one is created.

@return SoapHook SOAP library hook.
191234
protected function getLibraryHook()
    {
        if (empty($this->soapHook)) {
            $this->soapHook = VCRFactory::get('VCR\LibraryHooks\SoapHook');
        }

        return $this->soapHook;
    }
1346610
private function getHandle()
    {
        // make sure to clean up old handles
        if ($this->handle !== null && feof($this->handle)) {
            $this->resetHandle();
        }

        // provision new handle
        if ($this->handle == null) {
            $params = $this->params;
            if (!empty($this->getResourceVersion())) {
                $params['resourceVersion'] = $this->getResourceVersion();
            }
            $query = http_build_query($params);
            $base = $this->getClient()->getConfig()->getServer().$this->endpoint;
            $url = $base;

            if (!empty($query)) {
                $parsed = parse_url($base);
                if (key_exists('query', $parsed) || substr($base, -1) == "?") {
                    $url .= '&'.$query;
                } else {
                    $url .= '?'.$query;
                }
            }
            $handle = @fopen($url, 'r', false, $this->getClient()->getStreamContext());
            if ($handle === false) {
                $e = error_get_last();
                throw new \Exception($e['message'], $e['type']);
            }
            stream_set_timeout($handle, 0, $this->getStreamTimeout());
            $this->handle = $handle;
        }

        return $this->handle;
    }
731286
public function createHandler()
    {
        $this->pushHeaderMiddleware(
            function (RequestInterface $request) {
                return $request->withHeader('User-Agent', Pay::CLIENT . ' v' . Pay::VERSION);
            }
        );

        $this->pushBasicAuthMiddleware(
            function (RequestInterface $request) {
                return $request->withHeader(
                    'Authorization', 'Basic ' . base64_encode(
                        $this->config->getClientId() . ':' . $this->config->getClientSecret()
                    )
                );
            }
        );

        $this->pushRetryMiddleware(self::decider(), self::delay());

        return $this->stack;
    }
92838
public function getHook(string $fn = null)
    {
        if ($fn == null) {
            return $this->hookMap;
        }
        if (isset($this->hookMap[$fn])) {
            return $this->hookMap[$fn];
        }
        return null;
    }
1024701
protected function getHookSourceCode(string $hook) : string
    {
        $absRepoPath = realpath($this->repository->getRoot());
        $vendorPath  = getcwd() . '/vendor';
        $configPath  = realpath($this->config->getPath());
        return Template::getCode($hook, $absRepoPath, $vendorPath, $configPath);
    }
458579
protected function getSoap()
    {
        if ($this->SOAPClient === null) {
            $this->SOAPClient = new \SoapClient($this->url,
                [
                    'trace' => 1,
                    'cache_wsdl' => WSDL_CACHE_NONE
                ]);
            if ($this->location) {
                $this->SOAPClient->__setLocation($this->location);
            }
        }
        return $this->SOAPClient;
    }
244815
protected function getHook($hookName, $hookType)
    {
        $hook = HookQuery::create()
            ->filterByCode($hookName)
            ->filterByType($hookType)
            ->findOne();

        if (null === $hook) {
            $this->logAlertMessage(sprintf("Hook %s is unknown.", $hookName));

            return null;
        }

        if (! $hook->getActivate()) {
            $this->logAlertMessage(sprintf("Hook %s is not activated.", $hookName), true);
        }

        return $hook;
    }
913914
protected function getHandler()
    {
        $stack = HandlerStack::create();

        foreach ($this->middlewares as $middleware) {
            $stack->push($middleware);
        }

        if (isset(static::$defaults['handler']) && is_callable(static::$defaults['handler'])) {
            $stack->push(static::$defaults['handler'], self::USER_DEFINED_HANDLER);
        }

        return $stack;
    }
1076870
public synchronized ServletHandler getServletHandler()
    {
        if (_servletHandler==null)
            _servletHandler=(ServletHandler) getHandler(ServletHandler.class);
        if (_servletHandler==null)
        {
            _servletHandler=new ServletHandler();
            addHandler(_servletHandler);
        }
        return _servletHandler;
    }
603170
protected function initializeSoapClient()
    {
        $this->soap = new SoapClient(
            dirname(__FILE__) . '/assets/services.wsdl',
            array(
                'user' => $this->username,
                'password' => $this->password,
                'location' => 'https://' . $this->server . '/EWS/Exchange.asmx',
                'classmap' => $this->classMap(),
                'curlopts' => $this->curl_options,
                'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
            )
        );

        return $this->soap;
    }
914512
public function getHooks($name = null)
    {
        if ($name == null) {
            return $this->hooks;
        }
        return isset($this->hooks[$name]) ? $this->hooks[$name] : array();
    }
1315119
public function setHook(string $hook) : Hook
    {
        if (!Util::isValid($hook)) {
            throw new \RuntimeException('Invalid hook name');
        }
        $this->hookToExecute = $hook;
        return $this;
    }
249831
public static Predicate<GitHubServerConfig> allowedToManageHooks() {
        return new NullSafePredicate<GitHubServerConfig>() {
            @Override
            protected boolean applyNullSafe(@NonNull GitHubServerConfig github) {
                return github.isManageHooks();
            }
        };
    }
925913
public function handleRequest(): self
    {
        if ($this->params->getBotParam('webhook.url')) {
            return $this->handleWebhook();
        }

        if ($loop_time = $this->getLoopTime()) {
            return $this->handleGetUpdatesLoop($loop_time, $this->getLoopInterval());
        }

        return $this->handleGetUpdates();
    }
1235717
function hook() {
      var comp = hook.proxy.apply(null, arguments);
      for(var i = 0;i < hooks.length;i++) {
        hooks[i].apply(comp, arguments);
      }
      return comp;
    }
1177295
public function getContext($sid) {
        return new WebhookContext(
            $this->version,
            $this->solution['serviceSid'],
            $this->solution['channelSid'],
            $sid
        );
    }
794241
public function queryHook()
    {
        return function ($next, $query, $bag) {
            $method = $bag->get('method');
            $args   = $bag->get('args');
            $column = $args->get('column');

            if ($this->hasMapping($column)) {
                return call_user_func_array([$this, 'mappedQuery'], [$query, $method, $args]);
            }

            if (in_array($method, ['select', 'addSelect'])) {
                call_user_func_array([$this, 'mappedSelect'], [$query, $args]);
            }

            return $next($query, $bag);
        };
    }