src/Loader/CurlWebLoader.php 1 location
|
@@ 32-42 (lines=11) @@
|
29 |
|
* @param array $curlOptions |
30 |
|
* @param JsonDecoderInterface|DecoderManager $decoders |
31 |
|
*/ |
32 |
|
public function __construct($prefix, array $curlOptions = null, $decoders = null) |
33 |
|
{ |
34 |
|
$this->prefix = $prefix; |
35 |
|
$this->setCurlOptions($curlOptions); |
36 |
|
|
37 |
|
if ($decoders instanceof DecoderInterface) { |
38 |
|
$this->decoders = new DecoderManager([$decoders]); |
39 |
|
} else { |
40 |
|
$this->decoders = $decoders ?: new DecoderManager(); |
41 |
|
} |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
|
* {@inheritdoc} |
src/Loader/FileLoader.php 1 location
|
@@ 20-27 (lines=8) @@
|
17 |
|
/** |
18 |
|
* @param JsonDecoderInterface|DecoderManager $decoders |
19 |
|
*/ |
20 |
|
public function __construct($decoders = null) |
21 |
|
{ |
22 |
|
if ($decoders instanceof DecoderInterface) { |
23 |
|
$this->decoders = new DecoderManager([$decoders]); |
24 |
|
} else { |
25 |
|
$this->decoders = $decoders ?: new DecoderManager(); |
26 |
|
} |
27 |
|
} |
28 |
|
|
29 |
|
/** |
30 |
|
* {@inheritdoc} |
src/Loader/ArrayLoader.php 1 location
|
@@ 28-37 (lines=10) @@
|
25 |
|
* |
26 |
|
* @param JsonDecoderInterface|DecoderManager $decoders |
27 |
|
*/ |
28 |
|
public function __construct(array $schemas, $decoders = null) |
29 |
|
{ |
30 |
|
$this->schemas = $schemas; |
31 |
|
|
32 |
|
if ($decoders instanceof DecoderInterface) { |
33 |
|
$this->decoders = new DecoderManager([$decoders]); |
34 |
|
} else { |
35 |
|
$this->decoders = $decoders ?: new DecoderManager(); |
36 |
|
} |
37 |
|
} |
38 |
|
|
39 |
|
/** |
40 |
|
* {@inheritdoc} |