Ejemplo n.º 1
0
 function __construct($hooks, $info = NULL, $settings = array())
 {
     parent::__construct($hooks, $info, $settings);
     if (isset($this->settings['format']) && $this->settings['format'] == "json" && !function_exists('json_decode')) {
         $this->log("JSON exchange format is not supported - will use PHP instead", LL_WARNING);
         $this->settings['format'] = "php";
     }
 }
Ejemplo n.º 2
0
 function __construct($exchanger, $info, $hooks, $settings)
 {
     $this->exchanger = $exchanger;
     try {
         parent::__construct($hooks, $info, $settings);
     } catch (ApibotException $exception) {
         throw new ApibotException_InternalError("Module " . $this->modulename . " appears to be unsupported by this wiki");
     }
 }
Ejemplo n.º 3
0
 protected function paramdesc()
 {
     $paramdesc = parent::paramdesc();
     if (!is_null($paramdesc) && $this->is_generator) {
         if (isset($paramdesc['generator'])) {
             $paramdesc['prefix'] = "g" . $paramdesc['prefix'];
         } else {
             throw new ApibotException_InternalError("Module '" . $this->modulename() . "' cannot be a generator");
         }
     }
     return $paramdesc;
 }