dev-master
9999999-dev https://github.com/dSpaceLabs/FilesystemFilesystem abstract for PHP
MIT
The Requires
The Development Requires
by Joshua Estes
filesystem
Wallogit.com
2017 © Pedro Peláez
Filesystem abstract for PHP
Filesystem is generic PHP wrapper around the filesystem that allows you to setup your application to store files almost anywhere. The problem this solves is that during development you want to store things on disk, next you deploy your application to Heroku and now you are having to deal with messy code that is checking to see if you are on localhost or on a Heroku instance., (*1)
psr/log packagecomposer require "dspacelabs/filesystem:0.1@dev"
Each adapter has it's own configuration, I've tried to document that in the adapter files. Use the source., (*4)
<?php
$adapter = new \Dspacelabs\Component\Filesystem\Adapter\LocalAdapter('/tmp');
$filesystem = new \Dspacelabs\Component\Filesystem\Filesystem($adapter);
// Everything uses the `dspace` protocol, you can swap out different adapters
// but the protocol will always stay the same.
$handle = fopen('dspace://file.txt', 'w+');
fwrite($handle, 'testing');
fclose($handle);
$ cat /tmp/file.txt testing
For more usage example, check out the tests directory., (*5)
Just run phpunit to run all the tests., (*6)
phpunit
See CHANGELOG.md., (*7)
See LICENSE., (*9)
Filesystem abstract for PHP
MIT
filesystem