connector.php 786 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Collections Connector
  4. *
  5. * @package collections
  6. *
  7. * @var modX $modx
  8. */
  9. require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config.core.php';
  10. require_once MODX_CORE_PATH . 'config/' . MODX_CONFIG_KEY . '.inc.php';
  11. require_once MODX_CONNECTORS_PATH . 'index.php';
  12. $corePath = $modx->getOption('collections.core_path', null, $modx->getOption('core_path') . 'components/collections/');
  13. require_once $corePath . 'model/collections/collections.class.php';
  14. $modx->collections = new Collections($modx);
  15. $modx->lexicon->load('collections:default');
  16. /* handle request */
  17. $path = $modx->getOption('processorsPath', $modx->collections->config, $corePath . 'processors/');
  18. $modx->request->handleRequest(array(
  19. 'processors_path' => $path,
  20. 'location' => '',
  21. ));