@@ 23-49 (lines=27) @@ | ||
20 | /** |
|
21 | * Guzzle Teleporter implementation for HTTP resources |
|
22 | */ |
|
23 | class GuzzleTeleporter extends GenericTeleporter |
|
24 | { |
|
25 | /** |
|
26 | * @param Client $client |
|
27 | * @param ResourceReaderFactory $readerFactory |
|
28 | * @param ResourceLocator $resourceLocator |
|
29 | */ |
|
30 | public function __construct( |
|
31 | Client $client = null, |
|
32 | ResourceReaderFactory $readerFactory = null, |
|
33 | ResourceLocator $resourceLocator = null |
|
34 | ) { |
|
35 | parent::__construct($readerFactory ?: new LegacyGuzzleReaderFactory($client), new FilesystemWriter(), |
|
36 | $resourceLocator); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * Creates the GuzzleTeleporter |
|
41 | * |
|
42 | * @deprecated |
|
43 | * @return GuzzleTeleporter |
|
44 | */ |
|
45 | public static function create() |
|
46 | { |
|
47 | return new static(); |
|
48 | } |
|
49 | } |
|
50 |
@@ 23-49 (lines=27) @@ | ||
20 | /** |
|
21 | * Guzzle Teleporter implementation for HTTP resources |
|
22 | */ |
|
23 | class LegacyGuzzleTeleporter extends GenericTeleporter |
|
24 | { |
|
25 | /** |
|
26 | * @param Client $client |
|
27 | * @param ResourceReaderFactory $readerFactory |
|
28 | * @param ResourceLocator $resourceLocator |
|
29 | */ |
|
30 | public function __construct( |
|
31 | Client $client = null, |
|
32 | ResourceReaderFactory $readerFactory = null, |
|
33 | ResourceLocator $resourceLocator = null |
|
34 | ) { |
|
35 | parent::__construct($readerFactory ?: new LegacyGuzzleReaderFactory($client), new FilesystemWriter(), |
|
36 | $resourceLocator); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * Creates the GuzzleTeleporter |
|
41 | * |
|
42 | * @deprecated |
|
43 | * @return LegacyGuzzleTeleporter |
|
44 | */ |
|
45 | public static function create() |
|
46 | { |
|
47 | return new static(); |
|
48 | } |
|
49 | } |
|
50 |