1 | <?php |
||
21 | class LocalDirectoryAdapter implements SourceAdapterInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array Option collection |
||
25 | */ |
||
26 | private $options; |
||
27 | |||
28 | /** |
||
29 | * @var string Directory to read |
||
30 | */ |
||
31 | private $directory; |
||
32 | |||
33 | /** |
||
34 | * @var array Found files |
||
35 | */ |
||
36 | private $fileNames; |
||
37 | |||
38 | /** |
||
39 | * @param array $options Options |
||
40 | */ |
||
41 | 2 | public function __construct(array $options = array()) |
|
48 | |||
49 | /** |
||
50 | * Configures options. |
||
51 | * |
||
52 | * @param OptionsResolver $resolver |
||
53 | */ |
||
54 | 2 | protected function configureOptions(OptionsResolver $resolver) |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 1 | public function receive(Request $request) |
|
74 | |||
75 | /** |
||
76 | * Checks whether there are more files left. |
||
77 | * |
||
78 | * @param CallbackIterator $iterator |
||
79 | * |
||
80 | * @return bool |
||
81 | */ |
||
82 | 1 | public function validCallback(CallbackIterator $iterator) |
|
86 | |||
87 | /** |
||
88 | * Returns a file object. |
||
89 | * |
||
90 | * @param CallbackIterator $iterator |
||
91 | * |
||
92 | * @return ValueObject |
||
93 | */ |
||
94 | 1 | public function currentCallback(CallbackIterator $iterator) |
|
105 | } |
||
106 |