Home

Awesome

MetaModel

Meta is a DSL that enables to represent, traverse and operate on PHP objects.

Build Status Coverage Status

Syntax

Article(1)

MetaModel integrates with Doctrine, but can be connected to anything.

Article(*)
Category(1).articles
// Will call generateExtract() on all articles
Article(*).generateExtract()
Article[author="bob"]

Operators:

UserGroup[ users.contains(User(1)) ]
UserGroup[ users.count() > 0 ]
CacheService.flush()

MetaModel integrates with containers, registries, anything…

Integration

MetaModel finds objects in data sources. You can add any data source by implementing the simple interfaces: ObjectManager or Container.

Some libraries are already supported natively:

Add your own by submitting a pull request.

Usages

Those are both ideas and work in progress.

Instead of using phpMyAdmin, or building an admin interface, you can manipulate the DB with high level object queries.

Projects using MetaModel: