PHPackages                             learnosity/learnosity-sdk-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. learnosity/learnosity-sdk-php

ActiveLibrary[API Development](/categories/api)

learnosity/learnosity-sdk-php
=============================

Include this package into your own codebase to ease integration with any of the Learnosity APIs

v1.2.1(3mo ago)10417.8k↑11%11[5 PRs](https://github.com/Learnosity/learnosity-sdk-php/pulls)1Apache-2.0PHPPHP &gt;=8.2CI passing

Since Dec 1Pushed 3mo ago58 watchersCompare

[ Source](https://github.com/Learnosity/learnosity-sdk-php)[ Packagist](https://packagist.org/packages/learnosity/learnosity-sdk-php)[ Docs](https://github.com/Learnosity/learnosity-sdk-php)[ RSS](/packages/learnosity-learnosity-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (39)Used By (1)

[![](docs/images/image-logo-graphic.png)](docs/images/image-logo-graphic.png)

Learnosity SDK - PHP
====================

[](#learnosity-sdk---php)

Everything you need to start building your app in Learnosity, with the PHP programming language.
 (Prefer another language? [Click here](https://help.learnosity.com/hc/en-us/sections/360000194318-Server-side-development-SDKs))
An official Learnosity open-source project.

[![Latest Stable Version](https://camo.githubusercontent.com/1e88f69b89fb9b224e90c18d7ff901dfd270a588d70b171edcba0637b8961219/68747470733a2f2f706f7365722e707567782e6f72672f6c6561726e6f736974792f6c6561726e6f736974792d73646b2d7068702f76657273696f6e2e737667)](https://packagist.org/packages/learnosity/learnosity-sdk-php)[![Build Status](https://camo.githubusercontent.com/3e6ed474b044c9dc4972db56374d74550c1b5b396d4d62f2ba4fd6044538aba8/68747470733a2f2f6170702e7472617669732d63692e636f6d2f4c6561726e6f736974792f6c6561726e6f736974792d73646b2d7068702e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/Learnosity/learnosity-sdk-php)[![License](https://camo.githubusercontent.com/624a7ce2c806bec73dd2307b4200c1e060eb84db725d31af50223e3e95302f5b/68747470733a2f2f706f7365722e707567782e6f72672f6c6561726e6f736974792f6c6561726e6f736974792d73646b2d7068702f6c6963656e73652e737667)](https://packagist.org/packages/learnosity/learnosity-sdk-php)[![Downloads](https://camo.githubusercontent.com/877893dc8c93bdc8747d0c157d649cf5aca081151289692186e9a87ce78dd1ed/68747470733a2f2f706f7365722e707567782e6f72672f6c6561726e6f736974792f6c6561726e6f736974792d73646b2d7068702f642f746f74616c2e737667)](https://packagist.org/packages/learnosity/learnosity-sdk-php)[![Latest Unstable Version](https://camo.githubusercontent.com/2d251c6c234393287ade3994ff4a27e08730600954b1ca01050172f4ef777597/68747470733a2f2f706f7365722e707567782e6f72672f6c6561726e6f736974792f6c6561726e6f736974792d73646b2d7068702f762f756e737461626c652e737667)](https://packagist.org/packages/learnosity/learnosity-sdk-php)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

Table of Contents
-----------------

[](#table-of-contents)

- [Overview: what does it do?](#overview-what-does-it-do)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick start guide](#quick-start-guide)
- [Next steps: additional documentation](#next-steps-additional-documentation)
- [Contributing to this project](#contributing-to-this-project)
- [License](#license)
- [Usage tracking](#usage-tracking)
- [Further reading](#further-reading)

Overview: what does it do?
--------------------------

[](#overview-what-does-it-do)

The Learnosity PHP SDK makes it simple to interact with Learnosity APIs.

[![image-concept-overview.png](docs/images/image-concept-overview.png)](docs/images/image-concept-overview.png)

It provides a number of convenience features for developers, that make it simple to do the following essential tasks:

- Creating signed security requests for API initialization, and
- Interacting with the Data API.

For example, the SDK helps with creating a signed request for Learnosity:

[![image-signed-request-creation.png](docs/images/image-signed-request-creation.png)](docs/images/image-signed-request-creation.png)

Once the SDK has created the signed request for you, your app sends that on to an API in the Learnosity cloud, which then retrieves the assessment you are asking for, as seen in the diagram below:

[![image-assessment-retrieval.png](docs/images/image-assessment-retrieval.png)](docs/images/image-assessment-retrieval.png)

This scenario is what you can see running in the Quick start guide example ([see below](#quick-start-guide)).

There's more features, besides. See the detailed list of SDK features on the [reference page](REFERENCE.md).

[(Back to top)](#table-of-contents)

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

[](#requirements)

1. Runtime libraries for PHP 8 installed. ([instructions](https://help.learnosity.com/hc/en-us/articles/360000757757-Environment-Setup-Guide))
2. The [Composer](https://getcomposer.org/) package manager installed OR the self-contained ZIP from [GitHub Releases](https://github.com/Learnosity/learnosity-sdk-php/releases/)

Not using PHP? See the [SDKs for other languages](https://help.learnosity.com/hc/en-us/sections/360000194318-Server-side-development-SDKs).

[(Back to top)](#table-of-contents)

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

[](#installation)

### **Installation via Composer**

[](#installation-via-composer)

Using Composer is the recommended way to install the Learnosity SDK for PHP in production. The easiest way is to run this from your parent project folder:

```
composer require learnosity/learnosity-sdk-php "^1.0"

```

You can also specify the requirement manually by adding "learnosity/learnosity-sdk-php" as a dependency in your project's composer.json file.

```
{
    "require": {
        "learnosity/learnosity-sdk-php": "^1.0"
    }
}

```

Then, install the new dependency with

```
composer update learnosity/learnosity-sdk-php

```

### **Alternative method 1: download the zip file**

[](#alternative-method-1-download-the-zip-file)

Download the latest version of the SDK as a self-contained ZIP file from the [GitHub Releases](https://github.com/Learnosity/learnosity-sdk-php/releases) page. The distribution ZIP file contains all the necessary dependencies.

You may then include the SDK bootstrap file in your project, for example if the SDK is unzipped to `/srv/learnosity-sdk-php` then you could specify the following in your project to include the SDK:

```
