1 | <?php |
||
22 | class Loader extends \Nelmio\Alice\Fixtures\Loader implements LoaderInterface |
||
23 | { |
||
24 | /** |
||
25 | * @param string $locale |
||
26 | * @param ProviderChain $providerChain |
||
27 | * @param int $seed |
||
28 | * @param array $parameters |
||
29 | */ |
||
30 | 120 | public function __construct($locale = 'en_US', ProviderChain $providerChain, $seed = 1, array $parameters = []) |
|
34 | |||
35 | /** |
||
36 | * Loads a fixture file. |
||
37 | * |
||
38 | * @param string|array $dataOrFilename May either be the path to the file in which case it will be parsed, or be |
||
39 | * an array of data (then skips the parsing). The format of the array of data |
||
40 | * depends of the builders used. |
||
41 | * @param array $references Array where the key is the object name and the value the actual object |
||
42 | * class. The references are used to inject objects which the loader should be |
||
43 | * aware of while loading the file. |
||
44 | * |
||
45 | * @return array|\object[] |
||
46 | */ |
||
47 | 78 | public function load($dataOrFilename, array $references = []) |
|
48 | { |
||
49 | 78 | $this->setReferences($references); |
|
50 | 78 | $objects = parent::load($dataOrFilename); |
|
51 | 78 | $this->setReferences([]); |
|
52 | |||
53 | 78 | return $objects; |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return PersisterInterface |
||
58 | */ |
||
59 | 78 | public function getPersister() |
|
63 | } |
||
64 |