PHPackages                             devhelp/resource-core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. devhelp/resource-core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devhelp/resource-core
=====================

abstraction over resource that can read content of itself

09PHP

Since Apr 4Pushed 11y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Installation
------------

[](#installation)

please check [composer website](http://getcomposer.org) for more information.

```
$ composer require 'devhelp/resource-core'

```

Purpose
-------

[](#purpose)

Provides abstraction over resource that can read content of itself

Usage
-----

[](#usage)

### Usage of FileResource

[](#usage-of-fileresource)

```
$resource = new FileResource($filePath);

$resource->getContent(); // returns content of file at $filePath
```

### Usage of ResourcesChain

[](#usage-of-resourceschain)

```
$chain = new ResourcesChain([
    new FileResource($filePath),
    new JsonResource()
]);

$chain->getContent(); // returns json decoded as array from file at $filePath
```

### Collecting Resources

[](#collecting-resources)

ResourceCollector together with ResourceIterator implementations are designed to return collection of Resource instances.

There are no implementations of ResourceIterator but they might exist for example for:

- files
- arrays
- web pages
- etc...

```
$myIterator = new MyResourceIterator();

$collector = new ResourceCollector($myIterator);

$resources = $collector->collect(); //returns Resource[]
```

Credits
-------

[](#credits)

Brought to you by : Devhelp.pl ()

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/1479355?v=4)[devhelp](/maintainers/devhelp)[@devhelp](https://github.com/devhelp)

---

Top Contributors

[![pawelbaranski](https://avatars.githubusercontent.com/u/219097?v=4)](https://github.com/pawelbaranski "pawelbaranski (2 commits)")

### Embed Badge

![Health badge](/badges/devhelp-resource-core/health.svg)

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

###  Alternatives

[vinicius73/seotools

A package containing SEO helpers.

245.2k](/packages/vinicius73-seotools)

PHPackages © 2026

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