Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 83... Línea 83...
83
    private function predictEndpoint()
83
    private function predictEndpoint()
84
    {
84
    {
85
        return static function (callable $handler) {
85
        return static function (callable $handler) {
86
            return function (
86
            return function (
87
                CommandInterface $command,
87
                CommandInterface $command,
88
                RequestInterface $request = null
88
                ?RequestInterface $request = null
89
            ) use ($handler) {
89
            ) use ($handler) {
90
                if ($command->getName() === 'Predict') {
90
                if ($command->getName() === 'Predict') {
91
                    $request = $request->withUri(new Uri($command['PredictEndpoint']));
91
                    $request = $request->withUri(new Uri($command['PredictEndpoint']));
92
                }
92
                }
93
                return $handler($command, $request);
93
                return $handler($command, $request);