Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1178

Have access to "original" metadata in events subscribed to loadClassMetadata


    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.x
    • Fix Version/s: 2.x
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:


      If you subscribe to loadClassMetadata you will usually modify the metadata for some classes.
      The problem is, that that data has to be loaded from somewhere. But later down the chain you can't get to it. Now data specific to what you need in your loadClassMetadata would ideally reside in the same location.
      If we take for example a file, than all data for a specific entity is in the same file.

      My proposal would be to add function get(Original|Raw)MappingData into interface Doctrine\ORM\Mapping\Driver\Driver which would either return raw data or data in a object specific for that Driver or null if it doesn't make sense for that driver. Please note, that when loading from e.g XmlDriver we should return simplexmlnode or dom node as loadClassMetadata should be in its own namespace and not pollute the Doctrine one.



          • Assignee:
            beberlei Benjamin Eberlei
            mvrhov Miha Vrhovnik
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: