Handle the current request

@param callable $callBack Result handler

@return boolean
493828
public function handle(callable $callBack = null)
    {
        $ip = $this->getIpAddress();

        $isAllowed = $this->listMerger->isAllowed($ip, $this->defaultState);

        if ($callBack !== null) {
            return call_user_func($callBack, array($this, $isAllowed));
        } else {
            return $isAllowed;
        }
    }
271846
public function handleScanNotify(callable $callback)
    {
        $notify = $this->getNotify();

        if (!$notify->isValid()) {
            throw new FaultException('Invalid request payloads.', 400);
        }

        $notify = $notify->getNotify();

        try {
            $prepayId = call_user_func_array($callback, [$notify->get('product_id'), $notify->get('openid'), $notify]);
            $response = [
                'return_code' => 'SUCCESS',
                'appid'       => $this->merchant->app_id,
                'mch_id'      => $this->merchant->merchant_id,
                'nonce_str'   => uniqid(),
                'prepay_id'   => strval($prepayId),
                'result_code' => 'SUCCESS',
            ];
            $response['sign'] = generate_sign($response, $this->merchant->key);
        } catch (\Exception $e) {
            $response = [
                'return_code'  => 'SUCCESS',
                'return_msg'   => $e->getCode(),
                'result_code'  => 'FAIL',
                'err_code_des' => $e->getMessage(),
            ];
        }

        return new Response(XML::build($response));
    }
1195594
private function _catch($callback) {
        if ($this->state === self::REJECTED) {
            $this->value = $callback($this->value);
        }
        return $this;
    }
213117
public function addOnFulfilled(callable $callback): void
    {
        if ($this->getState() === Promise::PENDING) {
            $this->onFulfilled[] = $callback;
        } elseif ($this->getState() === Promise::FULFILLED) {
            $response = call_user_func($callback, $this->responseBuilder->getResponse());
            if ($response instanceof ResponseInterface) {
                $this->responseBuilder->setResponse($response);
            }
        }
    }
244129
protected function handleCallback($callback, array $args = [])
    {
        $response = null;

        // Check if $callback is a closure.
        if ($callback instanceof \Closure || is_array($callback)) {
            $response = call_user_func($callback, $args);
        } elseif (is_string($callback)) {
            if (false !== strpos($callback, '@') || class_exists($callback)) {
                // We use a "ClassName@method" syntax.
                // Let's get a class instance and call its method.
                $callbackArray = $this->handleClassCallback($callback);
                $response = call_user_func($callbackArray, $args);
            } else {
                // Used as a classic callback function.
                $response = call_user_func($callback, $args);
            }
        }

        return $response;
    }
871793
public function registerCallback(callable $callback)
    {
        $this->pipeline
            ->pipe($callback)
            ->process($this->config);

        return $this;
    }
1357981
public function postprocess(callable $callback)
    {
        if ($callback instanceof Closure) {
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getPostprocessor()->register($callback);
        return $this;
    }
994845
protected static function callback($callback)
    {
        if( is_string($callback) && ! is_callable($callback) )
        {
            return self::controllerCallback($callback);
        }

        return $callback;
    }
712786
public function each($callback)
    {
        Argument::i()->test(1, 'callable');

        foreach ($this->list as $key => $value) {
            call_user_func($callback, $key, $value);
        }

        return $this;
    }
591867
public function set_ack_handler($callback)
    {
        if (!is_callable($callback)) {
            throw new \InvalidArgumentException(sprintf(
                'Given callback "%s" should be callable. %s type was given.',
                $callback,
                gettype($callback)
            ));
        }

        $this->ack_handler = $callback;
    }
571875
public function setCallback(callable $callback): EventObserver
    {
        $this->callback = $callback;
        $this->id = $this->getId($callback);

        return $this;
    }
758323
public function apply(callable $callback)
    {
        foreach ($this->pairs as &$pair) {
            $pair->value = $callback($pair->key, $pair->value);
        }
    }
618984
public function setCallback($callback){
		if(!is_callable($callback))
			throw new Exception('Invalid callback passed for logging: '.$callback);
		$this->callback = $callback;
		return $this;
	}
828808
public function wrap_callback(callable $callback, array $args=[]) {
		self::$logger->debug(sprintf("Router: %s '%s'.",
			$this->request_method, $this->request_path));
		$callback($args);
		static::halt();
	}
990707
public function listen($callback) {
		if ($this->listening) {
			$this->connection->read(function ($line) use ($callback) {
				$this->checkForError($line);
				$change = $this->parseChangeLine($line);
				if ($change) {
					return $callback($change);
				}
			});
		}
	}
648705
public function handle($passable, Closure $callback)
    {
        $pipeline = array_reduce(array_reverse($this->pipes), function ($stack, $pipe)
        {
            return $this->createSlice($stack, $pipe);

        }, $this->prepareDestination($callback));

        return call_user_func($pipeline, $passable);
    }
39745
public function push(callable $callback)
    {
        if ($callback instanceof self) {
            $this->queue = array_merge($this->queue, $callback->queue);
            return;
        }

        $this->queue[] = $callback;
    }