Пример #1
0
 /**
  * Testuje limit dubli dla zadanego uzytkownika dla uslugi dla klienta
  *
  * @param Base_Model_Table $model
  * @param integer $recipientId
  * @param Logic_WebService_Element_Content $content
  * @throws Logic_WebService_Exception
  * @return void
  */
 public function checkByContent(Base_Model_Table $model, $recipientId, Logic_WebService_Element_Content $content)
 {
     $clientParams = $this->_client->getParams();
     $serviceParams = $this->_service->getParams();
     $counterContent = $model->getCounterWithContent('day', $recipientId, $clientParams->id, $serviceParams->id, $content->getHash());
     if ($counterContent && $serviceParams->limit_day_duplicate) {
         $validatorDay = new Logic_Validate_ExpiryDay();
         if ($serviceParams->limit_day_duplicate <= $counterContent->subcounter && !$validatorDay->isValid($counterContent->count_at_first)) {
             throw new Logic_WebService_Exception('Osiagnieto limit dzienny dubli (' . $serviceParams->limit_day_duplicate . ') na usluge ' . $serviceParams->service_name . ' dla klienta ' . $clientParams->client_name, 432);
         }
     }
 }
Пример #2
0
 /**
  *
  * @return Logic_WebService_Abstract
  */
 protected function _checkClientServiceAuth()
 {
     $this->_client->checkServiceAuth($this->_client->getParams(), $this->_service->getParams());
     return $this;
 }