PHPackages                             northeastern-web/pim-fim-adapter - 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. northeastern-web/pim-fim-adapter

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

northeastern-web/pim-fim-adapter
================================

PIM/FIM 2.0 Adapter Composer Package

v1.0.15(4mo ago)0570[3 issues](https://github.com/ITS-Digital-Technology/pim-fim-adapter/issues)MITPHPPHP ^8.0

Since Aug 1Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/ITS-Digital-Technology/pim-fim-adapter)[ Packagist](https://packagist.org/packages/northeastern-web/pim-fim-adapter)[ RSS](/packages/northeastern-web-pim-fim-adapter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (45)Used By (0)

pim-fim-adapter
===============

[](#pim-fim-adapter)

PIM/FIM 2.0 Adapter Composer Package - for PHP and WordPress based websites

Requirements
------------

[](#requirements)

- PHP 8.0+ (PHP Core on Server)
- ext-json (PHP Extension on Server)
- ext-mbstring (PHP Extension on Server)

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

[](#installation)

### Package Install

[](#package-install)

1. In the project you're wanting to integrate PIMFIMAdapter to (where your project's `composer.json` resides), run `composer require northeastern-web/pim-fim-adapter`.
2. Add a .env (copy `.env.example` in `.env` file) to project's root directory with constants or define constants in your PHP application's config (WordPress `wp-config.php`).

### Development Install

[](#development-install)

1. `cd` into project's root directory.
2. Run `composer install` on the command-line/terminal.
3. Add a .env (copy `.env.example` in `.env` file) to project's root directory with constants.

Configuration
-------------

[](#configuration)

This package supports the use of the PHP Dotenv package for setting and reading environment variables. If your PHP project doesn't use Dotenv, declare the variable as a constant (`define()`) in the application's configuration. In WordPress, this configuration would be the `wp-config.php` file.

### PIM

[](#pim)

Environment VariableDescription`PIM_ACCESS_TOKEN`Provides the Access Token for reading data from the Contentful PIM Space`PIM_PREVIEW_ACCESS_TOKEN`Provides the Access Token for reading data from the Contentful Preview API PIM Space (includes draft programs)`PIM_SPACE_ID`Provides the Space ID for the Contentful PIM Space`PIM_ENVIRONMENT_ID`Provides the Environment ID for the Contentful PIM Space (e.g., 'master', 'staging', 'development')`PIM_PREVIEW_MODE`Set this to `true` to read data from the Contentful Preview API PIM Space (must also set `PIM_PREVIEW_ACCESS_TOKEN`)### FIM

[](#fim)

Environment VariableDescription`FIM_ACCESS_TOKEN`Provides the Access Token for reading data from the Contentful FIM Space`FIM_SPACE_ID`Provides the Space ID for the Contentful FIM Space`FIM_ENVIRONMENT_ID`Provides the Environment ID for the Contentful FIM Space (e.g., 'master', 'staging', 'development')Usage
-----

[](#usage)

The PiM/FIM adapter package allows you to quickly query results from Contentful without having to build-up complex queries or know the content model. Each response in the PIM/FIM adapter classes returns a Contentful object, this can be converted to a Laravel collection, JSON, or other formats.

You may see `test/fim/index.php` and `test/pim/index.php`, they are testing files that can be used for development and validating or previewing responses for each adapter method.

### Contentful Adapter

[](#contentful-adapter)

The `ContentfulAdapter.php` class file is intended to expose methods that interact with the Contentful API via the Contentful PHP SDK. Each method to get Entries requires a [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html) object to be passed-in as a parameter. By Default, each Query will automatically resolve reference entries 1 level deep. Additional levels of Link resolution will need to occur via separate get Entry calls

Below is a list of methods available in the Contentful Adapter:

NameDescription`getEntries`Get entries by custom [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html)`getEntriesByContentType`Get entries by Content Type and custom [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html)### PIM

[](#pim-1)

Below are a list of methods available in the `PIMAdapter` class

NameParametersDescription`getAllPrograms`N/AList all Programs, no query parameters.`getUniversity`N/AFetch University fields, no query parameters.`getCollegeList`[Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html) `$query` - optionalLists all or some Colleges by Query. Use Query object to filter by specific id(s)`getLinkedBannerEntriesByEntryId`string `$entry_id`Fetches entries (Programs) linked to Banner entries by matching Banner entry Id (`$entry_id`/`sys.id`)`getProgramsByCollege`string `$college_name`, [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html) `$query` - optionalThis method walks backwards from the College Entry to the Banner Entry and finally to the linked Entries attached to the Banner Entry such as a Program Entry. Using the College Entry Id that's found when doing a lookup of Colleges by `$college_name`, we filter the API by `$college[0]['id']` with the ID of the fields.`college.sys.id` value in the Banner Entry. Finally, we get linked Entries belonging to the Banner entry. **This method will only return Program entries as Banner entries are only attached to Program Entries.**`getProgramById`string `$id`Fetch Program entry by `sys.id``getProgramByName`string `$name`Fetch Program entry by `fields.name``getProgramsByLocationName`string `$name`Fetch Programs by linked Location entry's `fields.name``getProgramsByMajorName`string `$major`Fetch Programs by linked Banner entry's `fields.major``getProgramsByDegreeType`string `$degreeType`Fetch Programs by linked Banner entry's `fields.degreeType`. Accepts the following values: "CAGS", "Dual Degree", "Master's Certificate", "Professional Doctorate"`getProgramsByUndergradDegreeType`string `$undergradDegreeType`Fetch Programs by linked Banner entry's `fields.undergradDegreeType`. Accepts the following values: "N/A", "Bachelor's", "Certificate", "Post-Baccalaureate"`getProgramsByCustom`[Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html) `$query`Fetch Programs by Custom [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html)### FIM

[](#fim-1)

Below are a list of methods available in the `FIMAdapter` class

NameParametersDescription`getAllProfiles`N/AList all Profiles, no query parameters.`getProfileById`string `$id`Fetch Profile entry by `sys.id``getProfileByName`string `name`Fetch Profile entry by `fields.banner.fields.displayNameInternal``getProfilesByCollege`string `$college_name`Fetch Profile entries by `fields.banner.fields.collegeAffiliation``getProfilesByCustom`[Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html) `$query`Fetch Profiles by Custom [Query](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/Query.html)### Responses

[](#responses)

Responses are in PHP Array or Contentful [ResourceArray](https://contentful.github.io/contentful.php/api/6.4.0/Contentful/ResourceArray.html). Use the methods attached to `ResourceArray` to map data to fields.

Utilize the PIM/FIM Models to map content types to plain associative PHP arrays.

### Rich Text

[](#rich-text)

You may encounter Rich Text fields in the PHP response. To Convert to HTML, you may need to look into the [`Contentful\RichText\Renderer` class](https://github.com/contentful/rich-text.php#rendering). There's class that can be used within Model classes for rendering Rich Text (`RendersRichText`).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance77

Regular maintenance activity

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.4% 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.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~87 days

Total

16

Last Release

127d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15341d89a7f9b4961f53dc4a9783a8d0b3ad32b2f496a6b12ec8677f73744866?d=identicon)[northeastern-web](/maintainers/northeastern-web)

---

Top Contributors

[![cam-vanorman](https://avatars.githubusercontent.com/u/5124234?v=4)](https://github.com/cam-vanorman "cam-vanorman (127 commits)")[![kenwilliams-nu](https://avatars.githubusercontent.com/u/111528790?v=4)](https://github.com/kenwilliams-nu "kenwilliams-nu (33 commits)")

---

Tags

adaptercontentfulfimphppimnortheastern-webPIM adapterFIM adapter

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/northeastern-web-pim-fim-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/northeastern-web-pim-fim-adapter/health.svg)](https://phpackages.com/packages/northeastern-web-pim-fim-adapter)
```

###  Alternatives

[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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