Recommend this page to a friend! |
Classes of Duong Huynh Nghia | PHP Slim Framework 3 Modular Application | libraries/vendor/league/flysystem/docs/creating-an-adapter.md | Download |
|
Downloadlayout: default permalink: /creating-an-adapter/ title: Creating an adapterCreating an adapterIf you want to address a file system, and there's no adapter available, you'll need to create your own. What is an adapterAn adapter can be seen as a plug - it bridges the gap between initially incompatible API's. The job of the adapter is to translate requests into calls the file system understands and re-format responses to comply with the interface of the generic file system. An adapter should __NEVER__ be used directly. It should
__ONLY__ be used to create a The main interface to implementAn adapter is required to be an implementation of
Responses from adapters are often arrays containing the
requested value. This is done because many calls to
file systems return more values than initially requested
by the client. In order to be able to optimize file system
handling, all metadata is returned. For instance, when a
Response valueskey | description | type
----------- | ------------------------ | -----------
type | Sharing the wealthHave you created an adapter? Be sure to let us know! Either create an issue on the GitHub repository, or send a PR adding a link to the README. Contributions are always very welcome. |