public function getClientById($id) { if (!isset($this->ids[$id])) { $temp = new Client($this->System); $temp->loadFromId($id); $this->ids[$temp->id] =& $temp; return $this->ids[$temp->id]; } else { return $this->ids[$id]; } }