public function __construct($limits) { $this->limits = $limits; $this->log = new Logger('limit', 'time-limit'); $this->log->debug = true; $this->log->verbose = true; $this->system = new MACCommands(); $this->system->setLogger($this->log); $this->user = $this->system->currentUser(); $this->system->setUser($this->user); if ($this->getLimit($this->user) !== false) { $file = sprintf('sqlite:%s/time-limit.db', __DIR__); $sqlite = new SimpleDB($file); $sqlite->setLogger($this->log); $this->time = new TimeLimitDB($sqlite); $this->time->setLogger($this->log); $this->time->init(); } }