Skip to content

Commit 65a92f6

Browse files
committed
Added Porter logo to readme.
Updated readme with new ProviderResource::fetch() interface.
1 parent 88bb54f commit 65a92f6

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Porter
1+
Porter <img src="https://github.com/ScriptFUSION/Porter/wiki/images/porter%20222x.png" align="right">
22
======
33

44
[![Latest version][Version image]][Releases]
@@ -228,12 +228,14 @@ Resources fetch data using the supplied connector and format it as a collection
228228
```php
229229
public function getProviderClassName() : string;
230230
public function getProviderTag() : string;
231-
public function fetch(Connector $connector) : Iterator;
231+
public function fetch(Connector $connector, EncapsulatedOptions $options = null) : Iterator;
232232
```
233233

234234
A resource supplies the class name of the provider it expects a connector from when `getProviderClassName()` is called. A used-defined tag can be specified to identify a particular Provider instance when `getProviderTag()` is called.
235235

236-
When `fetch()` is called it is passed the connector from which data must be fetched. The resource must ensure data is formatted as iterator of array values whilst remaining as true to the original format as possible; that is, we must avoid renaming or restructuring data because it is the caller's prerogative to perform data customization if desired.
236+
When `fetch()` is called it is passed the connector from which data must be fetched. The resource must ensure data is formatted as an iterator of array values whilst remaining as true to the original format as possible; that is, we must avoid renaming or restructuring data because it is the caller's prerogative to perform data customization if desired.
237+
238+
Providers may also supply options to `fetch()`. Such options are typically used to convey API keys or other options common to all of a provider's resources. When specified, a resource must ensure the options are transmitted to the connector.
237239

238240
### Writing a resource
239241

@@ -331,7 +333,14 @@ Limitations
331333
Testing
332334
-------
333335

334-
Porter is fully unit tested. Run the tests with `bin/test` from a shell.
336+
Porter is almost fully unit tested. Run the tests with `bin/test` from a shell.
337+
338+
License
339+
-------
340+
341+
Porter is published under the open source GNU Lesser General Public License v3.0. However, the original Porter character and artwork is copyright &copy; 2016 [Bilge](https://github.com/Bilge) and may not be reproduced or modified without express written permission.
342+
343+
![][Porter icon]
335344

336345

337346
[Releases]: https://github.com/ScriptFUSION/Porter/releases
@@ -348,4 +357,5 @@ Porter is fully unit tested. Run the tests with `bin/test` from a shell.
348357
[Provider]: https://github.com/provider
349358
[Mapper]: https://github.com/ScriptFUSION/Mapper
350359
[PSR-6]: http://www.php-fig.org/psr/psr-6
360+
[Porter icon]: https://github.com/ScriptFUSION/Porter/wiki/images/porter%20head%2032x.png
351361
[Class diagram]: https://github.com/ScriptFUSION/Porter/wiki/images/diagrams/Porter%20UML%20class%20diagram%201.0.png

0 commit comments

Comments
 (0)