Skip to content

Instantly share code, notes, and snippets.

@Fi1osof
Last active December 10, 2015 21:09
Show Gist options
  • Save Fi1osof/4493453 to your computer and use it in GitHub Desktop.
Save Fi1osof/4493453 to your computer and use it in GitHub Desktop.
$modx->runProcessor()
<?php
MODx{
function runProcessor($action = '',$scriptProperties = array(),$options = array()){
if($class = $this->loadProcessorClass($action, $options){
$processor = new $class($scriptProperties,$options);
return $processor->process();
}
return ;
}
function loadProcessorClass($action = '',$options = array()){
return $class;
}
}
$modx->runProcessor('run');
$class = $modx->loadProcessorClass('run');
new $class();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment