Download the PHP package mnapoli/metamodel without Composer
On this page you can find all versions of the php package mnapoli/metamodel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package metamodel
MetaModel
Meta is a DSL that enables to represent, traverse and operate on PHP objects.
Syntax
- Get a specific object by its ID:
MetaModel integrates with Doctrine, but can be connected to anything.
-
Get all objects of a type
-
Object graph traversing (get all the articles of a category):
-
Call methods:
- Field filtering (not implemented yet):
Operators:
- Service:
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:
-
Doctrine's Entity Manager:
MetaModel\Bridge\Doctrine\EntityManagerBridge
- PHP-DI container:
MetaModel\Bridge\PHPDI\PHPDIBridge
Add your own by submitting a pull request.
Usages
Those are both ideas and work in progress.
- MetaConsole: Simplified Model/DB manipulation from console
Instead of using phpMyAdmin, or building an admin interface, you can manipulate the DB with high level object queries.
-
Advanced replacement for PropertyAccess, e.g. to build forms, templates (Twig?)
-
Simplified object queries (from database)
- Paths for anything meta on your model: logs, AOP, ACL (e.g. "
User(1)
can editCategory(12).articles
")
Projects using MetaModel: