Create one EventCallbackUrl
@param EventCallbackUrl $eventCallbackUrl
@return array
517236
public function create(EventCallbackUrl $eventCallbackUrl)
    {
        $response = $this->mailjet->post(Resources::$Eventcallbackurl, ['body' => $eventCallbackUrl->format()]);
        if (!$response->success()) {
            $this->throwError("EventCallbackUrlService:create() failed", $response);
        }

        return $response->getData();
    }
870713
public function fromUrl(string $requestUrl)
    {
        return array_reduce(
            $this->factories,
            function ($lead, LeadFactoryInterface $factory) use ($requestUrl) {
                return $lead ?? $factory->fromUrl($requestUrl);
            }
        );
    }
772252
final protected function parseRedirectAndCallbackUrlFromRequest(array $body, $url): array
    {
        if (\is_string($url)) {
            $body['callback_url'] = $url;
        } elseif (\is_array($url)) {
            $body['callback_url'] = $url['callback_url'] ?? null;
            $body['redirect_url'] = $url['redirect_url'] ?? null;
        }

        return $body;
    }
316530
public function getCallbackUrl()
    {
        if ($callback = $this->scopeConfig->getValue(self::XML_PATH_CONNECTOR_CUSTOM_AUTHORIZATION)) {
            return $callback;
        }

        return $this->storeManager->getStore()->getBaseUrl(
            \Magento\Framework\UrlInterface::URL_TYPE_WEB,
            true
        );
    }
673870
public function handle($callback = null, $errorsCallback = null)
    {
        if ($this->posted()) {
            $errors = $this->check();

            if (!$errors) {
                if (null !== $callback) {
                    $callback($this->getData());
                }
            } else {
                if (null !== $errorsCallback) {
                    $errorsCallback($errors);
                }
                return $errors;
            }
        }

        return array();
    }
576121
function _runEventCallback($canvas, layer, eventType, callbacks, arg) {
	// Prevent callback from firing recursively
	if (callbacks[eventType] && layer._running && !layer._running[eventType]) {
		// Signify the start of callback execution for this event
		layer._running[eventType] = true;
		// Run event callback with the given arguments
		callbacks[eventType].call($canvas[0], layer, arg);
		// Signify the end of callback execution for this event
		layer._running[eventType] = false;
	}
}
307722
public function getCalledListeners(/* Request $request = null */)
    {
        if (null === $this->callStack) {
            return [];
        }

        $hash = 1 <= \func_num_args() && null !== ($request = \func_get_arg(0)) ? spl_object_hash($request) : null;
        $called = [];
        foreach ($this->callStack as $listener) {
            list($eventName, $requestHash) = $this->callStack->getInfo();
            if (null === $hash || $hash === $requestHash) {
                $called[] = $listener->getInfo($eventName);
            }
        }

        return $called;
    }
630692
protected function callChannelCallback($callback, $parameters)
    {
        if (is_string($callback)) {
            list($className, $method) = Str::parseCallback($callback, 'join');

            $callback = array(
                $instance = $this->container->make($className), $method
            );

            $reflector = new ReflectionMethod($instance, $method);
        } else {
            $reflector = new ReflectionFunction($callback);
        }

        return call_user_func_array(
            $callback, $this->resolveCallDependencies($parameters, $reflector)
        );
    }
1045000
public function getCallbackAttributes()
    {
        if ($this->callbackAttributes)
            return $this->callbackAttributes;
        if ($this->getParent())
            return $this->getParent()->getCallbackAttributes();
        return null;
    }
459262
public function createRequest($requestId, $url, UserEvent $event, EventQueue $queue)
    {
        $start = microtime(true);
        return new Request([
            'url' => $url,
            'responseCallback' => function ($headers, $code) use ($requestId, $start) {
                $end = microtime(true);
                $this->logDebug('[' . $requestId . ']Reponse (after ' . ($end - $start) . 's): ' . $code);
            },
            'resolveCallback' =>
                function ($data, $headers, $code) use ($requestId, $url, $event, $queue, $start) {
                    $end = microtime(true);
                    $message = '[';
                    $message .= $requestId;
                    $message .= ']Download complete (after ';
                    $message .= ($end - $start);
                    $message .= 's): ';
                    $message .= strlen($data);
                    $message .= ' in length length';
                    $this->logDebug($message);
                    $this->emitShorteningEvents($requestId, $url)->then(
                        function ($shortUrl) use ($url, $data, $headers, $code, $end, $start, $event, $queue) {
                            $this->sendMessage(
                                new Url($url, $data, $headers, $code, $end - $start, $shortUrl),
                                $event,
                                $queue
                            );
                        },
                        function () use ($url, $data, $headers, $code, $end, $start, $event, $queue) {
                            $this->sendMessage(new Url($url, $data, $headers, $code, $end - $start), $event, $queue);
                        }
                    );
                }
            ,
        ]);
    }
1349393
public function setCallbackURL($url)
    {
    	// Sequence validation
        $this->ensureIsProxy();
    	// Argument Validation
    	if (gettype($url) != 'string')
        	throw new CAS_TypeMismatchException($url, '$url', 'string');

        return $this->_callback_url = $url;
    }
662965
public function setDeliveryReceiptNotificationUrl($url, $sender = null)
    {
        return $this->client->executeRequest(
            new SMSDRRegisterCallbackRequest($url, $sender ?: $this->senderNumber)
        );
    }
385386
public function callback($primaryCallbackURL)
    {
        if (is_string($primaryCallbackURL)) {
            $this->setPrimaryCallbackURL($primaryCallbackURL)
                ->setSecondaryCallbackURL($primaryCallbackURL);
        }

        return $this;
    }
814337
public final function on( $eventName, $eventCallback ) {
			
			if ( !is_string( $eventName ) ) {
			
				throw new \browserfs\Exception('Invalid argument $eventName: string expected');
			
			} else {
			
				if ( !strlen( $eventName ) ) {
			
					throw new \browserfs\Exception('Invalid argument $eventName: expected non-empty string');
			
				} else {
			
					if ( !is_callable( $eventCallback ) ) {
			
						throw new \browserfs\Exception('Invalid argument $eventCallback: callable expected' );
			
					} else {

						$this->events[ $eventName ] = isset( $this->events[ $eventName ] ) 
							? $this->events[ $eventName ] 
							: [];

						$this->events[ $eventName ][] = [
							'once' => false,
							'callback' => $eventCallback,
							'fireId' => 0
						];

					}
				}
			}

		}
15203
public function getListenersForEvent($eventClassName)
    {
        if (FALSE === array_key_exists($eventClassName, $this->eventMap))
        {
            return [];
        }
        return $this->eventMap[$eventClassName];
    }
744655
private function _getCallbackURL()
    {
        // the URL is built when needed only
        if ( empty($this->_callback_url) ) {
            $final_uri = '';
            // remove the ticket if present in the URL
            $final_uri = 'https://';
            $final_uri .= $this->_getClientUrl();
            $request_uri = $_SERVER['REQUEST_URI'];
            $request_uri = preg_replace('/\?.*$/', '', $request_uri);
            $final_uri .= $request_uri;
            $this->_callback_url = $final_uri;
        }
        return $this->_callback_url;
    }
70166
public function createCalled(
        $callback,
        Arguments $arguments
    ): CalledEvent {
        return new CalledEvent(
            $this->sequencer->next(),
            $this->clock->time(),
            $callback,
            $arguments
        );
    }