PHPackages                             xeoncross/unitengine - 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. xeoncross/unitengine

ActiveLibrary[Framework](/categories/framework)

xeoncross/unitengine
====================

A distributed PHP framework powered by small units of social, dependency-aware code

96PHP

Since Jan 9Pushed 12y ago3 watchersCompare

[ Source](https://github.com/Xeoncross/UnitEngine)[ Packagist](https://packagist.org/packages/xeoncross/unitengine)[ RSS](/packages/xeoncross-unitengine/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

UnitEngine
==========

[](#unitengine)

A distributed PHP framework powered by small units of social, dependency-aware code. UnitEngine allows you to bring small functions and classes from the [gist.github.com](https://gist.github.com) universe into your project with ease. It's basically like [composer](http://getcomposer.org/) for gists.

About
-----

[](#about)

Developers often find existing libraries and frameworks lacking certain foresight, performance optimisations, documentation, or unit tests. This is often expected since libraries are usually written by less than a couple people. The old saying, "No one can do everything, but everyone can do something." rings true in many projects lacking enough hands.

Unit Engine splits code generation, documentation, and unit tests up into smaller bit-size chunks allowing many people to contribute in a very easy way. This means that each person can write the small bit of code they specialize in resulting in much better quality, performance, and documentation.

Features
--------

[](#features)

- Supports nested, recursive dependencies
- Based on git version control (though code can be managed completely through the [gist.github.com](https://gist.github.com) web interface)
- Supports [unit tests](http://phpunit.de/manual/3.7/en/writing-tests-for-phpunit.html)
- [Easy to contribute](https://gist.github.com/Xeoncross/8336861)

### Install

[](#install)

There are three ways to begin using UnitEngine for your projects.

A) (Recommended) Download the project using [composer](http://getcomposer.org/doc/00-intro.md) by creating a `composer.json` and running "`$ composer install`" from the command line.

```
{
	"require": {
		"xeoncross/unitengine": "dev-master"
	},
}

```

B) Simply checkout the latest copy of UnitEngine

```
$ git clone https://github.com/Xeoncross/UnitEngine.git

```

C) Manually download the latest [zip release of UnitEngine](https://github.com/Xeoncross/UnitEngine/archive/master.zip) and extract it.

Once you have UnitEngine installed you can begin using other developers units - or writing your own!

Share Your Code
---------------

[](#share-your-code)

Have a good unit of code you want to share? Simply [fork the starter gist](https://gist.github.com/Xeoncross/8336861) with your code, edit the readme, and create a simple unit test. Only takes a couple minutes to make your function available to the world.

Getting Started
---------------

[](#getting-started)

From your project folder you can now create a `readme.md` which contains the URL's of all the gists you need for your project (along with any text you want). For example, consider the following example `readme.md` fileL

```
# My FooBar Project

We need a good simple [router](https://gist.github.com/Xeoncross/8337101) so we can build
an awesome foo::bar!

```

After you have a `readme.md` file you can run the unit engine update manager to checkout the latest versions of the functions and classes you need.

```
$ php UnitEngine/update.php

```

Or if you installed it via composer:

```
$ php vendor/Xeoncross/UnitEngine/update.php

```

After UnitEngine installs all the required units in your `readme.md`, (and their dependencies), you can include the compiled output by including the `UnitEngine/UnitEngine.php` file in your code.

```
