We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I'm looking for ways to replace the functionality of Provisioner. I'd like to be able to connect from one Revo installation to another, and use getObject and getCollection to return objects from the remote Revo installation.

    I am using this code to make the connection:
    $remote = new xPDO($dsn, $usr, $pwd, $xpdoOptions, $pdoDriverOptions);
    $o=($remote->connect()) ? 'Connected' : 'Not Connected';

    ($dsn, $usr, $pwd are my remote Revo db name, user and password).

    The connection works. But I'm not having any success at being able to use getObject and getCollection on remote resources.

    This code returns true:
    $remote->addPackage('modx', MODX_CORE_PATH . 'model/');

    but it doesn't let me use those get functions.

    Jason helped me with the syntax of the addPackage code, but warned me it was untested and I might need to use a service instead. I tried copying some 'getService' code I've used elsewhere, but that did not seem to work.

    What am I missing here?