/** * Loads pad with given id and if not found, throws BadRequestException. * @param int $id * @throws BadRequestException */ private function loadPad($id) { $this->id = $id; $this->pad = $this->padManager->find($this->id); if (!$this->pad) { throw new BadRequestException("Pad with given id not found"); } }