Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 1... Línea 1...
1
<?php
1
<?php
2
namespace Aws\CloudSearchDomain;
2
namespace Aws\CloudSearchDomain;
Línea 3... Línea 3...
3
 
3
 
4
use Aws\AwsClient;
4
use Aws\AwsClient;
-
 
5
use Aws\CommandInterface;
5
use Aws\CommandInterface;
6
use Aws\HandlerList;
6
use GuzzleHttp\Psr7\Uri;
7
use GuzzleHttp\Psr7\Uri;
7
use Psr\Http\Message\RequestInterface;
8
use Psr\Http\Message\RequestInterface;
Línea 8... Línea 9...
8
use GuzzleHttp\Psr7;
9
use GuzzleHttp\Psr7;
Línea 33... Línea 34...
33
        $args['region']['default'] = function (array $args) {
34
        $args['region']['default'] = function (array $args) {
34
            // Determine the region from the provided endpoint.
35
            // Determine the region from the provided endpoint.
35
            // (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
36
            // (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
36
            return explode('.', new Uri($args['endpoint']))[1];
37
            return explode('.', new Uri($args['endpoint']))[1];
37
        };
38
        };
-
 
39
        unset($args['endpoint']['default']);
Línea 38... Línea 40...
38
 
40
 
39
        return $args;
41
        return $args;
Línea 40... Línea 42...
40
    }
42
    }
Línea 47... Línea 49...
47
    private function searchByPost()
49
    private function searchByPost()
48
    {
50
    {
49
        return static function (callable $handler) {
51
        return static function (callable $handler) {
50
            return function (
52
            return function (
51
                CommandInterface $c,
53
                CommandInterface $c,
52
                RequestInterface $r = null
54
                ?RequestInterface $r = null
53
            ) use ($handler) {
55
            ) use ($handler) {
54
                if ($c->getName() !== 'Search') {
56
                if ($c->getName() !== 'Search') {
55
                    return $handler($c, $r);
57
                    return $handler($c, $r);
56
                }
58
                }
57
                return $handler($c, self::convertGetToPost($r));
59
                return $handler($c, self::convertGetToPost($r));