PHPackages                             mrcnpdlk/grandstream-xmlapp - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mrcnpdlk/grandstream-xmlapp

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mrcnpdlk/grandstream-xmlapp
===========================

Grandstream telephone utils

v0.1.1(8y ago)4311[2 issues](https://github.com/mrcnpdlk/grandstream-xmlapp/issues)MITPHPPHP &gt;=7.0

Since Sep 21Pushed 8y ago2 watchersCompare

[ Source](https://github.com/mrcnpdlk/grandstream-xmlapp)[ Packagist](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)[ RSS](/packages/mrcnpdlk-grandstream-xmlapp/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/affa2389ad0ff1917ffba6b5d9a34cc6e4bd82f81913b03c5108e278d5a7c087/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702e737667)](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)[![Latest Unstable Version](https://camo.githubusercontent.com/ecedc456143e3a5cd8c02122faed772cd5c283c7544a52781336f2c4f0f3763d/68747470733a2f2f706f7365722e707567782e6f72672f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702f762f756e737461626c652e706e67)](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)[![Total Downloads](https://camo.githubusercontent.com/afafcb29408b8d4de37f02637d7207c380ad5a05f96c5872cc2455e6c8a29e6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702e737667)](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)[![Monthly Downloads](https://camo.githubusercontent.com/b7050fca30e4cd6fb3db3fecf6ac9aa78f50eec188b152b857dc9b911e7630b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702e737667)](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)[![License](https://camo.githubusercontent.com/48e35d0de0e0e5464c07f2dd17b0c74a685ea8db63c95b215365334b90de2ab0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702e737667)](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/dcace5ab803166396f8041393e142bf15cceaa2039e8d392c76abd604dbbb7e6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mrcnpdlk/grandstream-xmlapp/?branch=master)[![Build Status](https://camo.githubusercontent.com/7807bbefe6affabdcc6be063730725cc5b66e0e7c62e22f21eff9dc7e81a19f1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mrcnpdlk/grandstream-xmlapp/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/7240ab0a516c423ca5c6ce76670e55241ad9286f7e2cddd39d31fe636b7a0a8e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mrcnpdlk/grandstream-xmlapp/?branch=master)

[![Code Climate](https://camo.githubusercontent.com/95b99b14585d4ced4f38dd7aa9315d5c468ac32a13da49338a44c6a9fe9666f2/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d72636e70646c6b2f6772616e6473747265616d2d786d6c6170702f6261646765732f6770612e737667)](https://codeclimate.com/github/mrcnpdlk/grandstream-xmlapp)

GRANDSTREAM XMLAPP
==================

[](#grandstream-xmlapp)

This library supports to create AddressBook and XML Application for Grandstream Phones:

- GXP 2100
- GXP 2110
- GXP 2120
- GXP 2124

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

[](#installation)

Install the latest version with [composer](https://packagist.org/packages/mrcnpdlk/grandstream-xmlapp)

```
composer require mrcnpdlk/grandstream-xmlapp
```

Module for inserting images requires Imagick PHP extension. Pictures are converted `on the fly` to greyscale 8-bit format.

Basic usage
-----------

[](#basic-usage)

### AddressBook

[](#addressbook)

```
use mrcnpdlk\Grandstream\XMLApp\AddressBook\View;

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

$oView = new View();

$oView->addContact('Doe', '123123123', 'John');
$oView->addContact('Nowak', '456456456');

header('Content-type: application/xml; charset="utf-8"');

echo $oView->asTxt();
```

Result:

```

        Doe

            123123123
            1

        Nowak

            456456456
            1

```

### XML App

[](#xml-app)

```
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Components\ElemBitmap;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Components\ElemRectangle;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Components\ElemSelect;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Components\ElemString;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Container;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Event;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\SoftKey;
use mrcnpdlk\Grandstream\XMLApp\Application\Model\Styles;
use mrcnpdlk\Grandstream\XMLApp\Application\ModelConstant;
use mrcnpdlk\Grandstream\XMLApp\Application\View;
use mrcnpdlk\Grandstream\XMLApp\Helper\Color;
use mrcnpdlk\Grandstream\XMLApp\Helper\Rectangle;

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

$oView = new View();

/**
 * create 1st Container
 */
$oContainer_1 = new Container();
/**
 * create required elements
 */
$oString_1 = new ElemString('First line');
$oString_2 = new ElemString('Second line');
$oString_2->move(0, 10);
/**
 * Add some elements to Container and easy move all container on LCD Display
 * Pay attention to the size of the screen
 */
$oContainer_1->addElement($oString_1)
             ->addElement($oString_2)
             ->move(0, 60)
;
/**
 * Put Container on LCD Display
 */
$oView->addContainer($oContainer_1);

/**
 * create 2nd Container
 */
$oContainer_2 = new Container();

$oSelect_1 = new ElemSelect('select_1');
$oSelect_1->setStyles((new  Styles(100))
    ->setColorBg(new Color(100))
    ->setColor(new Color(0))
    ->setColorBorder(new Color(30))
)
          ->addItem('one', 1)
          ->addItem('two', 2)
          ->addItem('three', 3)
;

$oSelect_2 = new ElemSelect('select_2');
$oSelect_2->setStyles(new  Styles(100))
          ->addItem('apple', 1)
          ->addItem('orange', 2)
          ->addItem('lemon', 3)
          ->move(0, 20)
;

$oContainer_2
    ->addElement($oSelect_1)
    ->addElement($oSelect_2)
    ->move(0, 20)
;
$oView->addContainer($oContainer_2);

/**
 * Elements can be added directly on the View without using Container
 */
$oView->addElem(new ElemRectangle(10, 10));

/**
 * You can also define SoftKey
 */
$oView->addSoftkey(new SoftKey(ModelConstant::ACTION_QUIT_APP, 'Exit'));

/**
 * And define Events
 */
$oEvent = new Event(ModelConstant::STATE_OFFHOOK, ModelConstant::ACTION_DIAL, '299');
$oView->addEvent($oEvent);
/**
 * Add picture (100x100) to screen
 */
$oBitmap = new ElemBitmap(
    __DIR__ . '/../devel/logo.png',
    new Rectangle(100)
);
$oView->addElem($oBitmap->move(120, 0));

/**
 * Last thing. Left status bar can be disabled (more space on screen)
 */
$oView->setVisibleStatusLine(false);

/**
 * Echo text for phone
 */
header('Content-type: application/xml; charset="utf-8"');
echo $oView->asTxt();
```

Result:

```

        false

                0
                60
                First line

                0
                70
                Second line

                    one
                    two
                    three

                    apple
                    orange
                    lemon

                120
                0
                ..BASE_64_STRING..

```

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~3 days

Total

3

Last Release

3097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9b157a438a90ac875df96b1b332262157576dad35ab4a49ab7837dd1ed4bd2b?d=identicon)[mrcnpdlk](/maintainers/mrcnpdlk)

---

Top Contributors

[![mrcnpdlk](https://avatars.githubusercontent.com/u/22945316?v=4)](https://github.com/mrcnpdlk "mrcnpdlk (46 commits)")

---

Tags

xmladdressbookgrandstreamphonebookxmlappGXP2120GXP2110GXP2100GXP2124GXP1450GXP140xGXP116x

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrcnpdlk-grandstream-xmlapp/health.svg)

```
[![Health](https://phpackages.com/badges/mrcnpdlk-grandstream-xmlapp/health.svg)](https://phpackages.com/packages/mrcnpdlk-grandstream-xmlapp)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k234.7M187](/packages/masterminds-html5)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k133.8M779](/packages/jms-serializer)[jms/metadata

Class/method/property metadata management in PHP

1.8k150.5M84](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k88.3M570](/packages/jms-serializer-bundle)[sabre/xml

sabre/xml is an XML library that you may not hate.

52831.5M121](/packages/sabre-xml)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M30](/packages/goetas-webservices-xsd2php)

PHPackages © 2026

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