Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 54... Línea 54...
54
            $f = new PresignUrlMiddleware($options, $endpointProvider, $client, $handler);
54
            $f = new PresignUrlMiddleware($options, $endpointProvider, $client, $handler);
55
            return $f;
55
            return $f;
56
        };
56
        };
57
    }
57
    }
Línea 58... Línea 58...
58
 
58
 
59
    public function __invoke(CommandInterface $cmd, RequestInterface $request = null)
59
    public function __invoke(CommandInterface $cmd, ?RequestInterface $request = null)
60
    {
60
    {
61
        if (in_array($cmd->getName(), $this->commandPool)
61
        if (in_array($cmd->getName(), $this->commandPool)
62
            && (!isset($cmd->{'__skip' . $cmd->getName()}))
62
            && (!isset($cmd['__skip' . $cmd->getName()]))
63
        ) {
63
        ) {
64
            $cmd['DestinationRegion'] = $this->client->getRegion();
64
            $cmd['DestinationRegion'] = $this->client->getRegion();
65
            if (!empty($cmd['SourceRegion']) && !empty($cmd[$this->presignParam])) {
65
            if (!empty($cmd['SourceRegion']) && !empty($cmd[$this->presignParam])) {
66
                goto nexthandler;
66
                goto nexthandler;
Línea 82... Línea 82...
82
        CommandInterface $cmd
82
        CommandInterface $cmd
83
    ) {
83
    ) {
84
        $cmdName = $cmd->getName();
84
        $cmdName = $cmd->getName();
85
        $newCmd = $client->getCommand($cmdName, $cmd->toArray());
85
        $newCmd = $client->getCommand($cmdName, $cmd->toArray());
86
        // Avoid infinite recursion by flagging the new command.
86
        // Avoid infinite recursion by flagging the new command.
87
        $newCmd->{'__skip' . $cmdName} = true;
87
        $newCmd['__skip' . $cmdName] = true;
Línea 88... Línea 88...
88
 
88
 
89
        // Serialize a request for the operation.
89
        // Serialize a request for the operation.
90
        $request = \Aws\serialize($newCmd);
90
        $request = \Aws\serialize($newCmd);
91
        // Create the new endpoint for the target endpoint.
91
        // Create the new endpoint for the target endpoint.