PHPackages                             xelax90/learning-context-client-module - 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. [Framework](/categories/framework)
4. /
5. xelax90/learning-context-client-module

ActiveLibrary[Framework](/categories/framework)

xelax90/learning-context-client-module
======================================

Zend Framework 2 module for the learning context client

v1.0.1(10y ago)0111BSD-2-Clause

Since Jun 12Compare

[ Source](https://github.com/xelax90/learning-context-client-module)[ Packagist](https://packagist.org/packages/xelax90/learning-context-client-module)[ RSS](/packages/xelax90-learning-context-client-module/feed)WikiDiscussions Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

Learning Context Client Module
==============================

[](#learning-context-client-module)

This is a small Zend Framework 2 module for xelax90/learning-context-client

Setup
-----

[](#setup)

- Install this module with composer

```
composer require xelax90/learning-context-client-module

```

- Add `LearningContextClientModule` to your modules array in `config/application.config.php`

```
 $config = array(
   'modules' => array(
     // ...
     'LearningContextClientModule',
     // ...
   ),
   // ...
);
```

- Copy the provided local configuration under `vendor/xelax90/learning-context-client-module/learning-context.local.php.dist` into your `config/autoload` folder and copy it again without the `.dist` extension.
- Enter your app id and secret into the `conig/autoload/learning-context.local.php` file.
- Enter the `callback_url`. The callback URL is the URL corresponding to the `learning-context/callback` route.
- Enter the `redirect_after_authentication`. It can be either a full URL or route name. This is the place where the authentication controller will redirect to after successful or unsuccessful authentication.

Usage
-----

[](#usage)

You can use the `learning-context/authenticate` route for authentication. Access `/learning-context/authenticate` in the browser and the authentication process starts.

You can access the client via `ServiceLocator` using its class name:

```
use LearningContextClient\Client;
$client = $container->get(Client::class);
```

To check wether the user is authenticated, check if the client has a refresh token:

```
$authenticated = $client->getRefreshToken() !== null;
if($authenticated){
  // authenticated
} else {
  // not authenticated
}
```

For documentation about the client and the Learning Context API consult the respective documentations:

- Client:
- Learning Context:

Events
------

[](#events)

The `LearningContextClientModule\Controller\LearningContextController` class triggers authentication events when the callback URL is accessed. It triggers `learning-context.authorized` if a refresh token was provided and `learning-context.unauthorized` if not.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~9 days

Total

2

Last Release

3661d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1559538?v=4)[xelax90](/maintainers/xelax90)[@xelax90](https://github.com/xelax90)

---

Top Contributors

[![xelax90](https://avatars.githubusercontent.com/u/1559538?v=4)](https://github.com/xelax90 "xelax90 (6 commits)")

### Embed Badge

![Health badge](/badges/xelax90-learning-context-client-module/health.svg)

```
[![Health](https://phpackages.com/badges/xelax90-learning-context-client-module/health.svg)](https://phpackages.com/packages/xelax90-learning-context-client-module)
```

PHPackages © 2026

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