/** * If a constructor is required, then the * parent class must be called first. */ public function __construct() { parent::__construct(); // do some stuff starting here // NOTE: don't touch too much MediaWiki's internals here; // use the 'setup' method to do this instead. }
public function __construct() { if (self::$instance !== null) { throw new Exception(__CLASS__ . ": singleton pattern"); } self::$instance = $this; parent::__construct(); }
/** * Constructor */ public function __construct() { if (self::$instance !== null) { throw new Exception(__CLASS__ . ": there can only be one instance of this class"); } self::$instance = $this; parent::__construct(); $this->registerDefaultStorages(); }
/** * If a constructor is required, then the * parent class must be called first. */ public function __construct() { global $wgAutoloadClasses; $dir = dirname(__FILE__) . '/'; foreach (self::$components as $classe => &$filename) { $wgAutoloadClasses[$classe] = $dir . $filename . '.php'; } parent::__construct(); }
/** * If a constructor is required, then the * parent class must be called first. */ public function __construct() { parent::__construct(); }