orbt / resource-mirror
Resource Mirror is a library for mirroring webpage resources in a local directory for serving over the web as a mirror.
Requires
- php: >=5.3.0
- symfony/event-dispatcher: >=2.0.0,<2.2-dev
This package is not auto-updated.
Last update: 2024-05-11 11:27:20 UTC
README
Resource Mirror is a library for mirroring webpage resources in a local directory for serving over the web as a mirror. This library uses the Symfony Event Dispatcher to dispatch resource events for registered event listeners to perform further actions, e.g. on resources that have just been materialized.
This library contains these main components:
ResourceMirror
: Main handler for materializing resources given a path on a specified base URL.Resource
: Interface for accessing resources and maintaining metadata about resources for the mirror to use.GenericResource
: Base resource type. A generic resource can resolve another relative path based on itself.Materialized
: Interface for accessing resource content. AMaterializedResource
can be constructed around aResource
once it has been materialized and is accessible.ResourceCollection
: A collection of resources. Some utilities can accept a collection of resources and produce a new collection with completely different resources (e.g. by aggregating them).ResourceEvent
: Event dispatched containing a resource collection.
Installation using Composer
Add the following to the "require"
list in your composer.json
file:
"orbt/resource-mirror": "dev-master"
Run composer to update dependencies:
$ composer update
Or to just download this library:
$ composer update orbt/resource-mirror
License
This library is licensed under the MIT License. See the LICENSE file for detailed license information.