PHPackages                             lullabot/mpx-php - 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. [API Development](/categories/api)
4. /
5. lullabot/mpx-php

ActiveLibrary[API Development](/categories/api)

lullabot/mpx-php
================

A PHP library for accessing and interacting with data MPX services from ThePlatform (mpx.theplatform.com).

3.1.3(5mo ago)645.6k—8.3%8[1 PRs](https://github.com/Lullabot/mpx-php/pulls)MITPHPPHP &gt;=8.1

Since Oct 26Pushed 5mo ago23 watchersCompare

[ Source](https://github.com/Lullabot/mpx-php)[ Packagist](https://packagist.org/packages/lullabot/mpx-php)[ Docs](http://bitbucket.com/lullabot/mpx-php)[ RSS](/packages/lullabot-mpx-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (23)Versions (65)Used By (0)

mpx for PHP
===========

[](#mpx-for-php)

[![CircleCI](https://camo.githubusercontent.com/0cdb2291925fc8e946c2009388bfcb3e8a1e8221d26a0b4b9a193030aa47144e/68747470733a2f2f636972636c6563692e636f6d2f67682f4c756c6c61626f742f6d70782d7068702e7376673f7374796c653d737667)](https://circleci.com/gh/Lullabot/mpx-php) [![Maintainability](https://camo.githubusercontent.com/28d76d2f8e5ea3f898bb9f804b0fec1b3be8a374a8c0f3d00479d7520ab94876/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63633434313737653761343663306439396438382f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Lullabot/mpx-php/maintainability) [![Test Coverage](https://camo.githubusercontent.com/ec9cdf852bac6df68a4815d1b29752846a2f83dd1f7c0a5f59959029c577cf39/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63633434313737653761343663306439396438382f746573745f636f766572616765)](https://codeclimate.com/github/Lullabot/mpx-php/test_coverage) [![Packagist](https://camo.githubusercontent.com/be8d3080ecc2fef7f3dc27dec0f6f124cf92f8fe5d2aecb2e21ee38b234b6987/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c756c6c61626f742f6d70782d7068702e737667)](https://packagist.org/packages/lullabot/mpx-php)

**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Quick Start](#quick-start)
- [Example](#example)
- [Implemented Data Services](#implemented-data-services)
- [Filtering results by fields and with Q Queries](#filtering-results-by-fields-and-with-q-queries)
- [Test client](#test-client)
- [Logging](#logging)
- [Implementing custom mpx fields](#implementing-custom-mpx-fields)
    - [1. Use the console tool to create initial classes](#1-use-the-console-tool-to-create-initial-classes)
- [Related Projects](#related-projects)
- [Overview of main classes](#overview-of-main-classes)
    - [Lullabot\\Mpx\\Client](#lullabot%5Cmpx%5Cclient)
    - [Lullabot\\Mpx\\AuthenticatedClient](#lullabot%5Cmpx%5Cauthenticatedclient)
    - [Lullabot\\Mpx\\Service\\IdentityManagement\\UserSession](#lullabot%5Cmpx%5Cservice%5Cidentitymanagement%5Cusersession)
    - [Lullabot\\Mpx\\Token](#lullabot%5Cmpx%5Ctoken)
    - [Lullabot\\Mpx\\TokenCachePool](#lullabot%5Cmpx%5Ctokencachepool)
- [mpx Support](#mpx-support)
- [Known issues](#known-issues)

Quick Start
-----------

[](#quick-start)

- PHP &gt;= 7.4
- Composer

`composer require lullabot/mpx-php`

Example
-------

[](#example)

Here is a complete example showing how to load an account and media items from mpx. Most implementations should not contain all of this code in a single class. Instead, create functions, classes, or services to bridge the clients, caches, and locks into your application. For an example of how to do this, see the [media\_mpx module for Drupal 8](https://github.com/Lullabot/media_mpx).

A runnable version of this code is in a test at `\Lullabot\Mpx\Tests\Functional\ReadmeTest::testExample()`.

```
