pomm-project/ModelManager

Name: ModelManager

Owner: pomm project

Description: Model Manager for the Pomm database framework.

Created: 2014-09-29 20:30:07.0

Updated: 2018-01-15 16:43:29.0

Pushed: 2017-08-07 19:51:56.0

Homepage: null

Size: 390

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Pomm ModelManager

Latest Stable Version Scrutinizer Code Quality Build Status Monthly Downloads License

ModelManager is a Pomm project package. It makes developers able to manage entities upon the database through model classes. It is not an ORM, it grants developers with the ability to perform native queries using all of Postgres?SQL and use almost all its types. This makes model layer to meet with performances while staying lean.

This package will provide:

The model layer also proposes methods to leverage Postgres nice transaction settings (constraint deferring, isolation levels, read / write access modes etc.).

Installation

Pomm components are available on packagist using composer. To install and use Pomm's model manager, add a require line to "pomm-project/model-manager" in your composer.json file. It is advised to install the CLI package as well.

In order to load the model manager's poolers at startup, it is possible to use the provided SessionBuilder in Pomm's configuration:

m = new Pomm([
'project_name' => [
    'dsn' => ?,
    'class:session_builder' => '\PommProject\ModelManager\SessionBuilder',
],
?

It is better to provide dedicated session builders with your project.

Documentation

The model manager?s documentation is available either online or directly in the documentation folder.

Tests

This package uses Atoum as unit test framework. The tests are located in sources/tests. This package also provides a ModelSessionAtoum class so the test classes can directly get sessions with the model and model layer poolers loaded.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.