PHPackages                             xms/xms - 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. xms/xms

ActiveLibrary[Framework](/categories/framework)

xms/xms
=======

xml based cmf with dom events support, observable instance methods and properties

5.0.6(9y ago)4132[1 issues](https://github.com/mekanixms/xms/issues)[2 PRs](https://github.com/mekanixms/xms/pulls)GPL-V2PHPPHP &gt;=5.4.0

Since May 4Pushed 3y ago3 watchersCompare

[ Source](https://github.com/mekanixms/xms)[ Packagist](https://packagist.org/packages/xms/xms)[ Docs](http://aws-dms.com)[ RSS](/packages/xms-xms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (7)Used By (0)

### Xms

[](#xms)

**Requirements:**

- php 5.4 or above
- php xsl extension installed and loaded

**Xms** is a php *content management framework using xml as web application support*. It provides an event based DOM infrastructure as well as observable methods and properties.

Why xml? Easy, is fast, reliable and everywhere...

Since it is a CM framework, *Xms defines* **case** and **import** *directives* to use on the client in order *to manage the source code*, which can be imported from *local or remote resources*.

*To execute php code Xms provides* the php processing instruction  - looks familiar? So, what about this? Well, the beauty is that *with Xms you can access the DOM directly* meaning above can do

```

```

and take advantage of the features above: events and observable methods and properties.

Note:

- for above example $el is the parentNode of the php processing instruction

Ok, what about observable methods and properties? By default, the native objects in php don't offer support to add instance properties and methods, so:

```
//$myDOMElement is an instance of DOMElement
$myDOMElement->myVar = "some val";
```

Would not work and trigger a notice "*PHP Notice: Undefined property: DOMElement::$myVar in...*".

But with Xms

```
//$myDOMElement is an instance of XmsDomElement
$myDOMElement->myVar = "some val";
```

Works just fine, moreover you can bind a callback to observe when the value of the property changes

```
//$myDOMElement is an instance of XmsDomElement
$myDOMElement->myVar = "some val";
$myDOMElement->bind("change","myVar",function($newVal,$oldVal){
$this->setAttribute("property","changed");
print $newVal;
});
```

Similar for instance methods, just that you can add callback for before and after the instance method is invoked

```
//$myDOMElement is an instance of XmsDomElement
$myDOMElement->myMethod = function($someParameter){
//do something
};

$myDOMElement->bind("before","myMethod",function(someParameter){
//receives the same parameters that $myDOMElement->myMethod is invoked with
});

$myDOMElement->bind("after","myMethod",function(someParameter){
});
//add as many callbacks as needed
$myDOMElement->bind("before","myMethod",function(someParameter){
});

$myDOMElement->myMethod("someValue");
```

An example is like a thousand words…

```

                some xml code
                other xml code or import from showhere

```

Defining your own directives is easy: either add them to Xms class directly in $builtinDirectives public property or either at runtime. Currently supported directive types are: DOMElement and DOMProcessingInstruction.

As *case, import and php processing instruction* are client directives, in Xms we have application directives to help us initialize the application or use additional resources.

- *remotetemplate* - think that you might already have an application and need to do only some minor changes, basically offer some sort of mirror - this is when remotetemplate comes in place; see *test/docs.ex.remotetemplate.1.xml*,*test/docs.ex.remotetemplate.2.xml*,*test/docs.ex.remotetemplate.3.xml*; Note: - I am not responsible for whatpeople are using this for - this is a functionality implemented to help not harm anyone
- *use* - when code from another Xms application is needed to be used in current application; See *test/docs.ex.use.1.xml* and *test/docs.ex.use.2.xml*
- *init* - is a directive to be used to initialize the application; additionally it can return a value in the global context but is recommended to use a more local context ($el-&gt;topmost()); See *test/docs.ex.domiterator.2.xml* or other examples

Now, what if remotetemplate or use directives bring some elements that need some change but since they are not in the current application I don't have access to them? This is where *filters* join the game.

In Xms 5.x we have 3 filters:

- *xpath* - helps to execute some code for each node given by the xpath; see *test/docs.ex.xpath.1.xml*
- *domiterator* - use it to generate repeating xml using an array of assoc arrays (like generate multiple tr on a table); see *test/docs.ex.domiterator.1.xml* and *test/docs.ex.domiterator.2.xml*
- *import* - does exactly the same thing like the directive just that is defined somewhere else - see *test/docs.ex.import.3.xml*

Usually filters are executed automatically after Xms executes all directives in client (/app/client) however if needed a filter can be invoked from your code to execute when needed only; for a filter to be invokable it has to have the invokable class and an id set to it. See *test/docs.ex.import.3.xml*

Last but not least Xms has, what I call, *parsers* which are very similar with xpath filter but they *executed for all applications* - see parsers.xml in the root directory of Xms; there is also the possibility to define application parsers in /app/parsers however they are rarely used since xpath filter provide the same functionality

Like all other cm frameworks, Xms has a router which is to be found in *router.xml*; there are a couple of models but you have all freedom to make your own.

*access.xml* is a script that tells Xms if an application can be accessed or not given the circumstances - I wrote a simple implementation but again, you can be creative and make your own or modify existing to meet your needs.

Multilanguage support is a work in progress however Xms uses lang.xml to match predefined dom elements in the client side and alter the content - very likely this approch to change in later releases.

Xms uses it's own xml editor called **Designer**, empowering the developers to code online, without needing any other tool.

Additional resources can be found on my website Classes documentation can be found at

Since the documentation is a work in progress don't hesitate to ask any questions directly via email or on the website.

[![Build Status](https://camo.githubusercontent.com/4f4b92303804435eb107ffdbed3144723abb8adddeeba5dcb07b50f2146d55d6/68747470733a2f2f7472617669732d63692e636f6d2f6d656b616e69786d732f786d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/mekanixms/xms)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

Recently: every ~180 days

Total

6

Last Release

3312d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93cb6187f1ea16aaf3051d8a9266007491ff096236de904769fbad258180bc32?d=identicon)[mekanixms](/maintainers/mekanixms)

---

Top Contributors

[![mekanixms](https://avatars.githubusercontent.com/u/12233330?v=4)](https://github.com/mekanixms "mekanixms (12 commits)")

---

Tags

eventframeworkxmldomxms

### Embed Badge

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

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

###  Alternatives

[davidepastore/slim-config

A slim middleware to read configuration from different files based on hassankhan/config

338.9k1](/packages/davidepastore-slim-config)

PHPackages © 2026

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