PHPackages                             ma-jonzz/alpha-orm - 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. ma-jonzz/alpha-orm

ActiveLibrary

ma-jonzz/alpha-orm
==================

Alpha is a micro-orm for Silex/Flex built on Doctrine DBAL

1.0.0(4y ago)076MITPHPPHP &gt;=7.0.0

Since Dec 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ma-jonzz/alpha-orm)[ Packagist](https://packagist.org/packages/ma-jonzz/alpha-orm)[ RSS](/packages/ma-jonzz-alpha-orm/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Alpha ORM
=========

[](#alpha-orm)

Alpha ORM is a micro-ORM built on Doctrine DBAL specifically tailored for usage in the Silex micro-framework and Symfony Flex application.

Install
=======

[](#install)

In your composer.json, add

```
"troisyaourts/alpha": "dev-master"

```

to the list of requirements and then

```
composer update

```

In your typical "app.php" add the following lines :

```
$app->register(new Provider\DoctrineServiceProvider(), array('db.options' => $config['db.options']));
$app->register(new Alpha\ServiceProvider());

```

This will make the Alpha Manager available under "models" in your Controllers. The Alpha Manager use the main $app\['db'\] object.

Some examples of usage are provided in the "examples" directory.

To run some tests, clone the current release and do

```
curl -s http://getcomposer.org/installer | php
php composer.phar install
php examples/test.php

```

Usage
=====

[](#usage)

Class file
----------

[](#class-file)

In "Model" create a file "MyObject.php"

```

```

Fetching a new object
---------------------

[](#fetching-a-new-object)

```

```

Fetching a object by primary\_id
--------------------------------

[](#fetching-a-object-by-primary_id)

```

```

Fetching a list of object using a defined static function
---------------------------------------------------------

[](#fetching-a-list-of-object-using-a-defined-static-function)

```

```

And append a new object to the list

```

```

Saving an object
----------------

[](#saving-an-object)

```
