protected function __construct(WAPConfig $config) { $this->wapConfig = $config; $this->dbType = $config->getDBType(); $this->startDate = wfTimestamp(TS_MW, strtotime("-1 day", strtotime(date('Ymd', time())))); $this->endDate = wfTimestamp(TS_MW, strtotime(date('Ymd', time()))); }
public function __construct(WAPConfig $config) { global $wgUser; $this->config = $config; $this->dbType = $config->getDBType(); $userClass = $config->getUserClassName(); $this->cu = $userClass::newFromUserObject($wgUser, $this->dbType); $this->wapDB = WAPDB::getInstance($this->dbType); }