Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/puli/repository
A filesystem-like repository for storing arbitrary resources.
https://github.com/puli/repository
Last synced: 3 months ago
JSON representation
A filesystem-like repository for storing arbitrary resources.
- Host: GitHub
- URL: https://github.com/puli/repository
- Owner: puli
- License: mit
- Created: 2014-01-31T11:14:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T00:07:43.000Z (about 7 years ago)
- Last Synced: 2024-03-20T16:54:50.576Z (3 months ago)
- Language: PHP
- Homepage: http://puli.io
- Size: 1.41 MB
- Stars: 443
- Watchers: 28
- Forks: 40
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-php-zh_CN - Puli - 一个检测资源绝对路径的库 (资源管理 Asset Management)
- awesome-php - Puli - A library for determining assets absolute paths. (Asset Management)
- awesome-php - Puli - A library for determining assets absolute paths. (Asset Management)
- awesome-stripe - Puli - A library for determining assets absolute paths. (Table of Contents / Asset Management)
README
The Puli Repository Component
=============================[![Build Status](https://travis-ci.org/puli/repository.svg?branch=1.0)](https://travis-ci.org/puli/repository)
[![Build status](https://ci.appveyor.com/api/projects/status/a0g5jdtj78wv53c0/branch/1.0?svg=true)](https://ci.appveyor.com/project/webmozart/repository/branch/1.0)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/puli/repository/badges/quality-score.png?b=1.0)](https://scrutinizer-ci.com/g/puli/repository/?branch=1.0)
[![Latest Stable Version](https://poser.pugx.org/puli/repository/v/stable.svg)](https://packagist.org/packages/puli/repository)
[![Total Downloads](https://poser.pugx.org/puli/repository/downloads.svg)](https://packagist.org/packages/puli/repository)
[![Dependency Status](https://www.versioneye.com/php/puli:repository/1.0.0/badge.svg)](https://www.versioneye.com/php/puli:repository/1.0.0)Latest release: [1.0.0-beta10](https://packagist.org/packages/puli/repository#1.0.0-beta10)
PHP >= 5.3.9
The [Puli] Repository Component provides an API for storing arbitrary resources
in a filesystem-like repository:```php
use Puli\Repository\InMemoryRepository;
use Puli\Repository\Resource\DirectoryResource;$repo = new InMemoryRepository();
$repo->add('/config', new DirectoryResource('/path/to/resources/config'));// /path/to/resources/config/routing.yml
echo $repo->get('/config/routing.yml')->getBody();
```The following [`ResourceRepository`] implementations are currently supported:
* [`InMemoryRepository`]
* [`FilesystemRepository`]
* [`NullRepository`]
* [`JsonRepository`]
* [`OptimizedJsonRepository`]The following [`Resource`] implementations are currently supported:
* [`GenericResource`]
* [`FileResource`]
* [`DirectoryResource`]
* [`LinkResource`]Authors
-------* [Bernhard Schussek] a.k.a. [@webmozart]
* [The Community Contributors]Installation
------------Follow the [Getting Started] guide to install Puli in your project.
Documentation
-------------Read the [Puli Documentation] to learn more about Puli.
Contribute
----------Contributions to Puli are always welcome!
* Report any bugs or issues you find on the [issue tracker].
* You can grab the source code at Puli’s [Git repository].Support
-------If you are having problems, send a mail to [email protected] or shout out to
[@webmozart] on Twitter.License
-------All contents of this package are licensed under the [MIT license].
[Puli]: http://puli.io
[Bernhard Schussek]: http://webmozarts.com
[The Community Contributors]: https://github.com/puli/repository/graphs/contributors
[Installation guide]: http://docs.puli.io/en/latest/installation.html
[Puli Documentation]: http://docs.puli.io/en/latest/index.html
[issue tracker]: https://github.com/puli/issues/issues
[Git repository]: https://github.com/puli/repository
[@webmozart]: https://twitter.com/webmozart
[MIT license]: LICENSE
[`ResourceRepository`]: http://api.puli.io/latest/class-Puli.Repository.Api.ResourceRepository.html
[`InMemoryRepository`]: http://api.puli.io/latest/class-Puli.Repository.InMemoryRepository.html
[`FilesystemRepository`]: http://api.puli.io/latest/class-Puli.Repository.FilesystemRepository.html
[`NullRepository`]: http://api.puli.io/latest/class-Puli.Repository.NullRepository.html
[`JsonRepository`]: http://api.puli.io/latest/class-Puli.Repository.JsonRepository.html
[`OptimizedJsonRepository`]: http://api.puli.io/latest/class-Puli.Repository.OptimizedJsonRepository.html
[`Resource`]: http://api.puli.io/latest/class-Puli.Repository.Api.Resource.Resource.html
[`GenericResource`]: http://api.puli.io/latest/class-Puli.Repository.Resource.GenericResource.html
[`FileResource`]: http://api.puli.io/latest/class-Puli.Repository.Resource.FileResource.html
[`DirectoryResource`]: http://api.puli.io/latest/class-Puli.Repository.Resource.DirectoryResource.html
[`LinkResource`]: http://api.puli.io/latest/class-Puli.Repository.Resource.LinkResource.html