connector.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * ClientConfig
  4. *
  5. * Copyright 2011-2014 by Mark Hamstra <hello@markhamstra.com>
  6. *
  7. * ClientConfig is free software; you can redistribute it and/or modify it under the
  8. * terms of the GNU General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option) any later
  10. * version.
  11. *
  12. * ClientConfig is distributed in the hope that it will be useful, but WITHOUT ANY
  13. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  14. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along with
  17. * ClientConfig; if not, write to the Free Software Foundation, Inc., 59 Temple
  18. * Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. * @package clientconfig
  21. * @var modX $modx
  22. */
  23. require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
  24. require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
  25. require_once MODX_CONNECTORS_PATH.'index.php';
  26. $corePath = $modx->getOption('clientconfig.core_path',null,$modx->getOption('core_path').'components/clientconfig/');
  27. require_once $corePath.'model/clientconfig/clientconfig.class.php';
  28. $modx->clientconfig = new ClientConfig($modx);
  29. $modx->lexicon->load('clientconfig:default');
  30. /* handle request */
  31. $path = $modx->getOption('processorsPath',$modx->clientconfig->config,$corePath.'processors/');
  32. $modx->request->handleRequest(array(
  33. 'processors_path' => $path,
  34. 'location' => '',
  35. ));