You should simply be able to switch packages by calling $xpdo->setPackage(’packagename’, ’root_dir_location’)
Handling aggregate and composite relations between classes in different packages has not been tested specifically, but there shouldn’t be too many problems using the package switching approach, other than those imposed by PHP (i.e. the classes must have unique names regardless of the package they are in).
-
- 18 Posts
Hi,
You mean I can perform queries using both packages at the same time ?! I’d like to set the path for the packages and then just not set a default package at all. I’d use "modx.*" for modx classes and "mypackage.*" for my own classes. Is this possible ?
Regards,
MaDrense