Пример #1
0
 function __construct(xPDO &$modx)
 {
     /** @var modX $modx */
     parent::__construct($modx);
     if (property_exists($modx, 'parser')) {
         $this->parser = $modx->parser;
     }
 }
 /** {inheritDoc} */
 public function __construct(xPDO &$modx)
 {
     parent::__construct($modx);
     $parser = $this->modx->getOption('parser_class', null, 'modParser');
     $parser_class_path = $this->modx->getOption('parser_class_path', null, null);
     if ($parser != 'modParser' && $this->modx->loadClass($parser, $parser_class_path)) {
         $this->parser = new $parser($modx);
     }
 }
Пример #3
0
 /**
  * @param xPDO $modx
  */
 function __construct(xPDO &$modx)
 {
     parent::__construct($modx);
     $fqn = $modx->getOption('pdoTools.class', null, 'pdotools.pdotools', true);
     $path = $modx->getOption('pdotools_class_path', null, MODX_CORE_PATH . 'components/pdotools/model/', true);
     if ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {
         $this->pdoTools = new $pdoClass($modx);
     }
 }
Пример #4
0
 /**
  * twiggyParser constructor.
  *
  * @param xPDO $modx
  */
 function __construct(xPDO &$modx)
 {
     parent::__construct($modx);
     $fqn = $modx->getOption('twiggy_class', null, 'twiggy.twiggy', true);
     $path = $modx->getOption('twiggy_class_path', null, MODX_CORE_PATH . 'components/twiggy/model/', true);
     if ($twiggyClass = $modx->loadClass($fqn, $path, false, true)) {
         $this->twiggy = new $twiggyClass($modx);
     }
 }
Пример #5
0
 /**
  * @param xPDO $modx
  */
 function __construct(xPDO &$modx)
 {
     parent::__construct($modx);
     $fqn = $modx->getOption('pdoTools.class', null, 'pdotools.pdotools', true);
     if ($pdoClass = $modx->loadClass($fqn, '', false, true)) {
         $this->pdoTools = new $pdoClass($modx);
     } elseif ($pdoClass = $modx->loadClass($fqn, MODX_CORE_PATH . 'components/pdotools/model/', false, true)) {
         $this->pdoTools = new $pdoClass($modx);
     } else {
         $modx->log(modX::LOG_LEVEL_ERROR, '[pdoParser] Could not load pdoTools from "MODX_CORE_PATH/components/pdotools/model/".');
     }
 }