Skip to content

apparat/resource

Repository files navigation

apparat/resource

Build Status Coverage Status Scrutinizer Code Quality Code Climate Documentation Status

Purpose of this module:

  • Provide an abstract low-level interface for basic file operations
    • Creating
    • Reading
    • Writing / Updating
    • Deleting
    • Copying (= Reading + Writing with a different name)
    • Moving / Renaming
  • Provide an easy-to-use interface for multipart files (e.g. files with YAML front matter)
    • Support for arbitrary content models
      • Parsing
      • Serialisation
    • File part operations
      • Creating
      • Reading
      • Writing / Updating
      • Deleting (?)
      • Copying (?)
  • Reading from / writing to different sources
    • In-Memory
    • File system
    • Standard input / output (?)
    • FTP (?)
    • Remote storage (?)
  • Implementing several file types and structures (see below)
    • Possibly special behaviour based on file type

Documentation

Please find the project documentation in the doc directory. I recommend reading it via Read the Docs.

Installation

This library requires PHP 5.6 or later. I recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies.

Dependencies

Composer dependency graph

Quality

To run the unit tests at the command line, issue composer install and then phpunit at the package root. This requires Composer to be available as composer, and PHPUnit to be available as phpunit.

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.