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