Xyster does ORM (Object-relational mapping). Several PHP projects do the same, and quite well, but we like how we did it better. The Zend Framework itself has the Zend_Db_Table concept, and it's very useful, but it's also very limited. Further, we don’t like the Active Record pattern, and we also wanted to be able to support more than just databases as backends.
- Read the ORM User Manual
- Read the API Documentation (choose the Xyster_Orm package)
Use Any Backend
Our ORM system is based on the Data Mapper design pattern. This pattern allows for you to move data between your objects and their data store without either knowing about each other. The data store can be anything: a database, an LDAP server, an XML document, whatever. Xyster comes with an adapter for use with Zend_Db, but you can quickly write an adapter for any storage system.
Relationships
Take full advantage of one-to-one, one-to-many, and many-to-many relationships in your domain model. The ORM layer will automatically save any changes made to related objects.
Caching
The ORM system can utilize Zend_Cache, so you can persist your objects in Danga's Memcached or PHP's APC for lightning-fast performance.
Concurrent Change Locking
Xyster implements a simple optimistic offline lock using a numeric version field in your entity. The ORM layer will throw an exception if an attempt is made to save changes to an entity that was modified by another session.
Queries
There's also a powerful object query language (to which we lovingly refer as XSQL) that lets you filter and aggregate information from your objects, whether that information comes from a database or a method on the object itself!
Plugins
You can easily write plugins that intercept many events from the ORM layer.
Validation
Add Zend_Validate objects to the fields of your entity to allow runtime validation. You can specify whether checks are performed as properties are set or right before an entity is saved.
Lookups
You can write small plugins that sit on the entity itself and return values. We've already written lookups that give you Zend_Date objects based on the value of a date/time field and also one that returns Xyster_Enum objects based on field values.