https://github.com/libreworks/caridea-module
:fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy module loader.
https://github.com/libreworks/caridea-module
Last synced: about 1 year ago
JSON representation
:fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy module loader.
- Host: GitHub
- URL: https://github.com/libreworks/caridea-module
- Owner: libreworks
- License: apache-2.0
- Created: 2017-03-22T20:48:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-10T22:43:53.000Z (over 8 years ago)
- Last Synced: 2025-02-03T21:47:34.464Z (over 1 year ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# caridea-module
Caridea is a miniscule PHP application library. This shrimpy fellow is what you'd use when you just want some helping hands and not a full-blown framework.

This is its module loader. You can use it to write extensible applications.
[](https://packagist.org/packages/caridea/module)
[](https://travis-ci.org/libreworks/caridea-module)
[](https://scrutinizer-ci.com/g/libreworks/caridea-module/?branch=master)
[](https://scrutinizer-ci.com/g/libreworks/caridea-module/?branch=master)
## Installation
You can install this library using Composer:
```console
$ composer require caridea/module
```
* The master branch (version 3.x) of this project requires PHP 7.1 and depends on `caridea/container`.
* Version 2.x of this project requires PHP 7.0 and depends on `caridea/container`.
## Compliance
Releases of this library will conform to [Semantic Versioning](http://semver.org).
Our code is intended to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), and [PSR-4](http://www.php-fig.org/psr/psr-4/). If you find any issues related to standards compliance, please send a pull request!
## Features
The `Caridea\Module\System` class has three dependency containers: one for configuration properties, one for *back-end* objects and one for *front-end* objects. Modules can register objects in these containers. The configuration container is the parent of the back-end container, which in turn is parent of the front-end container.
```php
namespace Acme;
class MyModule extends \Caridea\Module\Module
{
}
$modules = ['Acme\MyModule'];
$conf = []; // Read in your configuration from somewhere.
$system = new \Caridea\Module\System($modules, $conf);
$myObj = $system->getFrontendContainer()->get('myObject');
```