times[] = time(); $this->simultane = 1; } function refreshTime($lieu) { if (empty($this->files[$lieu]) || count($this->files[$lieu]) < 1) $this->times[$lieu] = time(); } function reajusteVacances($timelost) { foreach($this->times as $key => $time) $this->times[$key] += $timelost; return serialize($this); } function hasObject() { foreach($this->files as $file) { if (count($file) > 0) return true; } return false; } function checkMaxSize(surface $planete, $lieu = null) { $nombre = 0; if (isset($lieu)) { if (!empty($this->files[$lieu])) $nombre = count($this->files[$lieu]); } else { foreach($this->files as $file) { $nombre += count($file); } } return ($nombre < dDonnees::tailleFile($planete)); } function findShorter() { $short = 0; $value = 99; foreach($this->files as $key => $file) { if ($key >= $this->simultane) break; $count = count($file); if ($value > $count) { $value = $count; $short = $key; } } return $short; } function findFirstKey($lieu) { foreach($this->files[$lieu] as $key => $file) return $key; } function DEBUG__print() { var_dump($this); var_dump($this->files); } function DEBUG__setTime($lieu, $moins) { $this->times[$lieu] -= $moins; return $this->times[$lieu]; } } ?>