示例#1
0
 public function runStep(XenForo_ControllerAdmin_Abstract $controller = null, XenForo_ImportSession $session, $step, $start, array $options = array())
 {
     if (!$step || !method_exists($this, 'step' . $step)) {
         throw new XenForo_Exception('Invalid step ' . $step);
     }
     ignore_user_abort(true);
     $this->_session = $session;
     $this->_controller = $controller;
     $this->_bootstrapImporter($session->getConfig());
     $steps = $this->getSteps();
     if (isset($steps[$step])) {
         if (!$this->_importModel->canRunStep($step, $steps, $session->getRunSteps())) {
             throw new XenForo_Exception('Step ' . $step . ' cannot be run.');
         }
     }
     return $this->{'step' . $step}($start, $options);
 }