Download the PHP package 99designs/moa without Composer
On this page you can find all versions of the php package 99designs/moa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download 99designs/moa
More information about 99designs/moa
Files in 99designs/moa
Download 99designs/moa
More information about 99designs/moa
Files in 99designs/moa
Vendor 99designs
Package moa
Short Description The rightweight data mapper for mongoDB and PHP 5.3+
License MIT
Package moa
Short Description The rightweight data mapper for mongoDB and PHP 5.3+
License MIT
Please rate this library. Is it a good library?
Informations about the package moa
Moa: the rightweight mongoDB ODM
Moa is an Object - Document Mapper, built to persist business domain objects in mongoDB.
Why?
- Does the bare minimum to be useful
- Mongo query methods are already pretty good, all that's missing is some validation and typed de/serialisation
- Built to integrate easily into existing applications
- Zero dependencies
- Well tested
- Easy to create custom types with de/serialisation behaviours and validation rules
Installation
- Install via composer:
composer require 99designs/moa
- via github https://github.com/99designs/moa
Getting Started
In your app start up code, add something that looks like the following:
Optionally, a callback can be provided to lazily connect on demand:
Also, extra databases can be configured:
Defining Models
Model classes can be defined like so:
- For a full list of field types and their behaviours, see the Moa\Types namespace
- Indexes may also be defined (override
DomainObject::indexes()
) - Domain objects can also specify the database they want to persist to (override
DomainObject::getDatabaseName()
)
Querying
The query syntax is the same as the default PHP mongo driver, but accessed statically from the domain object you hope to query, eg
All versions of moa with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.2
The package 99designs/moa contains the following files
Loading the files please wait ....