Thruway\Registration::getInvokeType PHP Метод

getInvokeType() публичный Метод

public getInvokeType ( ) : String
Результат String
    public function getInvokeType()
    {
        return $this->invokeType;
    }

Usage Example

Пример #1
0
 /**
  * Add registration
  *
  * @param \Thruway\Registration $registration
  * @return bool
  * @throws \Exception
  */
 private function addRegistration(Registration $registration, RegisterMessage $msg)
 {
     try {
         // make sure the uri is exactly the same
         if ($registration->getProcedureName() != $this->getProcedureName()) {
             throw new \Exception('Attempt to add registration to procedure with different procedure name.');
         }
         // make sure options match
         if (strcasecmp($registration->getInvokeType(), $this->getInvokeType()) != 0) {
             throw new \Exception('Registration and procedure must agree on invocation type');
         }
         if ($registration->getDiscloseCaller() != $this->getDiscloseCaller()) {
             throw new \Exception('Registration and procedure must agree on disclose caller');
         }
         $this->registrations[] = $registration;
         $registration->getSession()->sendMessage(new RegisteredMessage($msg->getRequestId(), $registration->getId()));
         // now that we have added a new registration, process the queue if we are using it
         if ($this->getAllowMultipleRegistrations()) {
             $this->processQueue();
         }
         return true;
     } catch (\Exception $e) {
         $registration->getSession()->sendMessage(ErrorMessage::createErrorMessageFromMessage($msg));
         return false;
     }
 }