private function _getHsp() { if ($this->hspId != null) { return; } $hsp = new Hsp(); $hsp->setEmployeeId($this->getEmployeeId()); $hsp->setAllotmentId($this->getAllotmentId()); $hspArr = $hsp->fetchHsps(); if (is_array($hspArr) && isset($hspArr[0])) { $this->hspId = $hspArr[0]->getId(); } else { throw new HspPaymentRequestException("No hsp", HspPaymentRequestException::NO_HSP); } }