conf problem
Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm faced to a conf pb that neither current nor new Conf design can solve.
For the SimpleEntity vortex package, I need a place to store a map
entity-base-class-name => path to class. What for?
For instance, I have in vortex/store an entity called Item.php.
I want to extend it in my own app, but keep everything else from
vortex/store. As the Item class is included and instanciated in many
places, I cannot extend it without copying the whole vortex/store dir
and modifying all files, simply to change the include_once line and set
my extended class path.
The solution I think to is this one:
* have a map 'base class name' => path in conf
* use include_entity(), defined in SimpleEntity
that uses this map to load the right class.
For instance for my item, with this in conf:
item => app/myapp/MyItem.php
include_entity('item') would include my extended class.
The problem is that I need that different packages using SimpleEntity
place their conf in the same path:
vortex/store should have a conf SimpleEntity containing
'item' => vortex/store/entities/Item.php
placed in simpleentity domain
(conf path being simpleentity/class_path/item)
and in my app I need to overide this value with
'item' => app/myapp/MyItemp.php
with the same conf path :/
Any solution ?
--
Jean-Christophe Michel