بدون توضیح

gediminasm 219df530ff [mapping] event argument adapter for single listener support 14 سال پیش
bin 81472b0b3c [tree] root id support, diferent strategy support 14 سال پیش
lib 219df530ff [mapping] event argument adapter for single listener support 14 سال پیش
tests e24919e274 [tests] fix for base ODM test case to test connection 14 سال پیش
vendor ccfe61f2c3 updated vendors 14 سال پیش
.gitignore b37f0b2ce9 [tests] made temporary directory common for all tests 14 سال پیش
.gitmodules 81edcf7a9e created vendor dir, updated test running config 14 سال پیش
LICENSE 81472b0b3c [tree] root id support, diferent strategy support 14 سال پیش
README.markdown 42325be938 Update of README and identation fixes 14 سال پیش

README.markdown

Some Doctrine 2 Extensions

This package contains extensions for Doctrine 2 that hook into the facilities of Doctrine and offer new functionality or tools to use Doctrine 2 more efficently. This package contains mostly used behaviors which can be easily attached to your event system of Doctrine 2 and handle the records being flushed in the behavioral way. List of extensions:

  • Tree - this extension automates the tree handling process and adds some tree specific functions on repository. (closure or nestedset)
  • Translatable - gives you a very handy solution for translating records into diferent languages. Easy to setup, easier to use.
  • Sluggable - urlizes your specified fields into single unique slug
  • Timestampable - updates date fields on create, update and even property change.
  • Loggable - helps tracking changes and history of objects, also supports version managment.

Currently these extensions support Yaml and Annotation mapping. Additional mapping drivers can be easy implemented using Mapping extension to handle the additional metadata mapping.

Important

Recently where was a change for type hinting on object manager and other. These changes requires doctrine2 from master branch. Example:

git clone git://github.com/doctrine/doctrine2.git myproject/library/doctrine
git clone git://github.com/doctrine/common.git myproject/library/doctrine-common

To autoload these libraries use same class loader from doctrine common package for instance.

If you are using windows, there is msysgit tool available.

Latest updates

2011-03-27

  • Merged Gustavo Adrian pull request for Tree-closure adapter
  • Now tree extension supports nestedset or closure strategies, it can be used on same manager. Keep in mind that closure adapter is not stable yet

ODM MongoDB support

There is a plan to port all extensions for different object manager support and now half of extensions can be used with ODM also.

  • Translatable
  • Sluggable
  • Timestampable
  • Loggable

Are allready ported to support ODM MongoDB

All these extensions can be nested together. And most allready use only annotations without interface requirement to not to aggregate the entity itself and has implemented proper caching for metadata.

There is a post introducing to these extensions on doctrine project

You can test these extensions on my blog.

All tutorials for basic usage examples are on my blog also.

Running the tests:

PHPUnit 3.4 or newer is required. To setup and run tests follow these steps:

  • go to the root directory of extensions
  • run: git submodule init
  • run: git submodule update
  • go to tests directory: cd tests
  • run cp phpunit.dist.xml phpunit.xml
  • run: phpunit
  • optional - run mongodb in background to complete all tests

Contributors: