connector.php 923 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Fred package.
  4. *
  5. * Copyright (c) MODX, LLC
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Fred Connector
  12. *
  13. * @package fred
  14. */
  15. require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config.core.php';
  16. require_once MODX_CORE_PATH . 'config/' . MODX_CONFIG_KEY . '.inc.php';
  17. require_once MODX_CONNECTORS_PATH . 'index.php';
  18. $corePath = $modx->getOption('fred.core_path', null, $modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/fred/');
  19. /** @var Fred $fred */
  20. $fred = $modx->getService(
  21. 'fred',
  22. 'Fred',
  23. $corePath . 'model/fred/',
  24. array(
  25. 'core_path' => $corePath
  26. )
  27. );
  28. $modx->request->handleRequest(
  29. array(
  30. 'processors_path' => $fred->getOption('processorsPath', [], $corePath . 'processors/'),
  31. 'location' => '',
  32. )
  33. );