src/Loader/ArrayLoader.php 1 location
|
@@ 27-36 (lines=10) @@
|
24 |
|
* object resulting from a json_decode call. |
25 |
|
* @param JsonDecoderInterface|DecoderManager $decoders |
26 |
|
*/ |
27 |
|
public function __construct(array $schemas, $decoders = null) |
28 |
|
{ |
29 |
|
$this->schemas = $schemas; |
30 |
|
|
31 |
|
if($decoders instanceof DecoderInterface) { |
32 |
|
$this->decoders = new DecoderManager([$decoders]); |
33 |
|
} else { |
34 |
|
$this->decoders = $decoders ?: new DecoderManager(); |
35 |
|
} |
36 |
|
} |
37 |
|
|
38 |
|
/** |
39 |
|
* {@inheritdoc} |
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} |