| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- $tStart= microtime(true);
- define('MODX_API_MODE', true);
- $modx_cache_disabled = false;
- require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/config.core.php';
- if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/core/');
- /* include the modX class */
- if (!@include_once (MODX_CORE_PATH . "model/modx/modx.class.php")) {
- exit();
- }
- /* start output buffering */
- ob_start();
- /* Create an instance of the modX class */
- $modx= new modX();
- if (!is_object($modx) || !($modx instanceof modX)) {
- ob_get_level() && @ob_end_flush();
- exit();
- }
- $modx->startTime= $tStart;
- $modx->initialize('web');
- $corePath = $modx->getOption('collections.core_path', null, $modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/collections/');
- /** @var Collections $collections */
- $collections = $modx->getService(
- 'collections',
- 'Collections',
- $corePath . 'model/collections/',
- array(
- 'core_path' => $corePath
- )
- );
- $ajax = new \Collections\Endpoint\Ajax($collections);
- $ajax->run();
|