PHPackages                             managlea/resource-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. managlea/resource-handler

ActiveLibrary

managlea/resource-handler
=========================

011PHP

Since Oct 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/managlea/ResourceHandler)[ Packagist](https://packagist.org/packages/managlea/resource-handler)[ RSS](/packages/managlea-resource-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ResourceHandler
===============

[](#resourcehandler)

Package to provide wrapper for handling resources (resource as in RESTful APIs etc)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4b1233fb5755593dfba1f600d2cfeac97cf1cce8592e57cd8fe59cf76e7a07c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616e61676c65612f5265736f7572636548616e646c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/managlea/ResourceHandler/?branch=master) [![Build Status](https://camo.githubusercontent.com/631d7c0ab279721c9ede1d637eff428f4cbcbf1a04cf383db70ccf4a36fa6e26/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616e61676c65612f5265736f7572636548616e646c65722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/managlea/ResourceHandler/build-status/master) [![Code Coverage](https://camo.githubusercontent.com/c281da92bf3e380ba9ff443ae01f7150fe4ef5a587fc9ab6a11c986e0218fc46/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616e61676c65612f5265736f7572636548616e646c65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/managlea/ResourceHandler/?branch=master)
[![Code Climate](https://camo.githubusercontent.com/e856b36ac56497fb9e03c27f1c5f4fc430d59cae8a2b468364d781361490d6e0/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d616e61676c65612f5265736f7572636548616e646c65722f6261646765732f6770612e737667)](https://codeclimate.com/github/managlea/ResourceHandler) [![Test Coverage](https://camo.githubusercontent.com/e64acaf5050764ab39efd1069155521a375f39aa71b5009f1e52ae8b0765643f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d616e61676c65612f5265736f7572636548616e646c65722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/managlea/ResourceHandler/coverage)
[![SensioLabsInsight](https://camo.githubusercontent.com/6479a3fbf0fbab2abb24915ac6abe2668f6711372c814a40029ed8ed2626780b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33396534366464632d646139352d343434392d613130342d3631366131663535646465392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/39e46ddc-da95-4449-a104-616a1f55dde9)
[![Codacy Badge](https://camo.githubusercontent.com/2d26f60bad1b0dc00d51cdb025ae9a3f6a47098b42710defffcc939e0078a437/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f67726164652f3064393764623435363737623431616538653934316562663939643166376530)](https://www.codacy.com/app/Managlea/ResourceHandler)
[![Build Status](https://camo.githubusercontent.com/cde77c9992dadd6054187f1efe98ea955ac9195df949cfdaffddf9029e7279a0/68747470733a2f2f7472617669732d63692e6f72672f6d616e61676c65612f5265736f7572636548616e646c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/managlea/ResourceHandler) [![Circle CI](https://camo.githubusercontent.com/790fd18225d76a2a4143b9933d9ca4187cd37cb3055360f28a6963482e991328/68747470733a2f2f636972636c6563692e636f6d2f67682f6d616e61676c65612f5265736f7572636548616e646c65722f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/managlea/ResourceHandler/tree/master)
[![PHP-Eye](https://camo.githubusercontent.com/445f9d7433070aca2fd7a1eb3fd18bb4aceba1e39549f91ddf6bbc2c6873dce0/687474703a2f2f7068702d6579652e636f6d2f62616467652f6d616e61676c65612f7265736f757263652d68616e646c65722f7465737465642e737667)](http://php-eye.com/package/managlea/resource-handler)

Basic usage
-----------

[](#basic-usage)

Read more about packages which are required by ResourceHandler

- [Managlea/ResourceMapper](https://github.com/managlea/ResourceMapper) - for mapping resources to objects
- [Managlea/EntityManager](https://github.com/managlea/EntityManager) - for getting objects from DB

```
// Create new EntityManagerFactory (instanceof Managlea\Component\EntityManagerFactoryInterface)
$entityManagerFactory = new EntityManagerFactory();

// Create new ResourceMapper by passing $entityManagerFactory in as parameter
$resourceMapper = ResourceMapper::initialize($entityManagerFactory);

// Create new resourceHandler (by passing correct resourceMapper in as parameter)
$resourceHandler = ResourceHandler::initialize($resourceMapper);

// Get single foo object with id 1
$foo = $resourceHandler->getSingle('foo', 1);

// Get collection of foos (by default 20 items, without any filters)
$fooCollection = $resourceHandler->getCollection('foo');
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c2a60196ecf5aa21a862db9d35161146ee824366621439380ef212a774ffe75?d=identicon)[managlea-adm](/maintainers/managlea-adm)

---

Top Contributors

[![kaurikk](https://avatars.githubusercontent.com/u/4194333?v=4)](https://github.com/kaurikk "kaurikk (61 commits)")[![managlea-adm](https://avatars.githubusercontent.com/u/11567820?v=4)](https://github.com/managlea-adm "managlea-adm (16 commits)")

### Embed Badge

![Health badge](/badges/managlea-resource-handler/health.svg)

```
[![Health](https://phpackages.com/badges/managlea-resource-handler/health.svg)](https://phpackages.com/packages/managlea-resource-handler)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
