PHPackages                             lernpad/zapi - 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. lernpad/zapi

ActiveSymfony-bundle[API Development](/categories/api)

lernpad/zapi
============

ZApi for some hidden project

050PHPCI failing

Since Jul 4Pushed 6y agoCompare

[ Source](https://github.com/lernpad/zapi)[ Packagist](https://packagist.org/packages/lernpad/zapi)[ RSS](/packages/lernpad-zapi/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Getting Started With ZApiBundle
===============================

[](#getting-started-with-zapibundle)

Step 1: Download ZApiBundle using composer
------------------------------------------

[](#step-1-download-zapibundle-using-composer)

Require the bundle with composer:

```
$ composer require lernpad/zapi dev-master
```

Step 2: Getting Started
-----------------------

[](#step-2-getting-started)

```
require __DIR__.'/vendor/autoload.php';

use Lernpad\ZApi\ClientProtocol;
use Lernpad\ZApi\Exception\TimeoutException;
use Lernpad\ZApi\Model\StatusMsg;
use Lernpad\ZApi\Model\UserMsg;
use Lernpad\ZApi\Model\EventMsg;
use Symfony\Component\Validator\Exception\ValidatorException;

$authUser = new UserMsg();
$authUser->setLogin(2);
$authUser->setPassword('PhnOpwAS');

// Client Api service
$cp = new ClientProtocol();
$cp->connect('10.10.10.10', 1234, $authUser);

//--- Try to create new User
$newUser = new UserMsg();
$newUser->setLogin(1068);
$newUser->setPassword('12345678');
$newUser->setGroup(0);
$newUser->setName('Ivan Urgant');
$newUser->setEnabled(true);

$status = StatusMsg::statusError;
try {
    $status = $cp->userCreate($newUser);
    echo "new user status(".$status.",".StatusMsg::getName($status).")\n";
} catch (\ZMQSocketException $e) {
    // ...
} catch (ValidatorException $e) {
    // ...
} catch (TimeoutException $e) {
    // ...
}
```

Check if User exists

```
$user = new UserMsg();
$status = $cp->userGet($login, $user);
echo "get user status(".$status.",".StatusMsg::getName($status).")\n";
```

Try to get EventCalendar

```
$events = $cp->eventsGet();
/* @var $item EventMsg */
foreach ($events as $item) {
    echo $item->getDatetime().",".$item->getTitle()."\n";
}
```

Change User password

```
$status = $cp->userPassword($login, "foobar");
echo "password status(".$status.",".StatusMsg::getName($status).")\n";
```

Change User service

```
$status = $cp->userService($login, new \DateTime('+3 month'));
echo "service status(".$status.",".StatusMsg::getName($status).")\n";
```

Get version of application

```
$appId = 1;
$result = $cp->versionGet($appId);
$code = $result['status']->getCode();
$ver = $result['version'];
echo "service status(".$code.",".StatusMsg::getName($code).")\n";
/* @var $ver VersionMsg */
echo "version " . $ver->getMajor() . '.' . $ver->getMinor() . '.' . $ver->getPatch() . " URL: " . $ver->getLink() . "\n";
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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/28893888?v=4)[Andrey Chernov](/maintainers/Lernpad)[@lernpad](https://github.com/lernpad)

---

Top Contributors

[![lernpad](https://avatars.githubusercontent.com/u/28893888?v=4)](https://github.com/lernpad "lernpad (7 commits)")

### Embed Badge

![Health badge](/badges/lernpad-zapi/health.svg)

```
[![Health](https://phpackages.com/badges/lernpad-zapi/health.svg)](https://phpackages.com/packages/lernpad-zapi)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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