public function getMessagingPoolManager(bool $force = false) : CNabuMessagingPoolManager
    {
        if ($this->nb_customer instanceof CNabuCustomer) {
            if ($this->nb_messaging_pool_manager === null || $force) {
                if ($this->nb_messaging_pool_manager instanceof CNabuMessagingPoolManager) {
                    $this->nb_messaging_pool_manager->finish();
                }
                $this->nb_messaging_pool_manager = new CNabuMessagingPoolManager($this->nb_customer);
                $this->nb_messaging_pool_manager->init();
            } elseif (
                !(($nb_aux_customer = $this->nb_messaging_pool_manager->getCustomer()) instanceof CNabuCustomer) ||
                $this->nb_customer->getId() !== $nb_aux_customer->getId()
            ) {
                throw new ENabuMessagingException(ENabuMessagingException::ERROR_INVALID_MESSAGING_POOL_MANAGER);
            }
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_CUSTOMER_NOT_FOUND);
        }

        return $this->nb_messaging_pool_manager;
    }
public function getMessagingPoolManager(bool $force = false) : CNabuMessagingPoolManager
    {
        if ($this->nb_customer instanceof CNabuCustomer) {
            if ($this->nb_messaging_pool_manager === null || $force) {
                if ($this->nb_messaging_pool_manager instanceof CNabuMessagingPoolManager) {
                    $this->nb_messaging_pool_manager->finish();
                }
                $this->nb_messaging_pool_manager = new CNabuMessagingPoolManager($this->nb_customer);
                $this->nb_messaging_pool_manager->init();
            } elseif (
                !(($nb_aux_customer = $this->nb_messaging_pool_manager->getCustomer()) instanceof CNabuCustomer) ||
                $this->nb_customer->getId() !== $nb_aux_customer->getId()
            ) {
                throw new ENabuMessagingException(ENabuMessagingException::ERROR_INVALID_MESSAGING_POOL_MANAGER);
            }
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_CUSTOMER_NOT_FOUND);
        }

        return $this->nb_messaging_pool_manager;
    }
public function getMessagingPoolManager ( bool $ force = false ) : CNabuMessagingPoolManager { if ( $ this -> nb_customer instanceof CNabuCustomer ) { if ( $ this -> nb_messaging_pool_manager === null || $ force ) { if ( $ this -> nb_messaging_pool_manager instanceof CNabuMessagingPoolManager ) { $ this -> nb_messaging_pool_manager -> finish ( ) ; } $ this -> nb_messaging_pool_manager = new CNabuMessagingPoolManager ( $ this -> nb_customer ) ; $ this -> nb_messaging_pool_manager -> init ( ) ; } elseif ( ! ( ( $ nb_aux_customer = $ this -> nb_messaging_pool_manager -> getCustomer ( ) ) instanceof CNabuCustomer ) || $ this -> nb_customer -> getId ( ) !== $ nb_aux_customer -> getId ( ) ) { throw new ENabuMessagingException ( ENabuMessagingException :: ERROR_INVALID_MESSAGING_POOL_MANAGER ) ; } } else { throw new ENabuCoreException ( ENabuCoreException :: ERROR_CUSTOMER_NOT_FOUND ) ; } return $ this -> nb_messaging_pool_manager ; }
Gets current Messaging Pool Manager instance. If not defined, then creates one for the current Customer.
@param bool $force Forces to set a new Messaging Pool Manager Instance.
@return CNabuMessagingPoolManager Returns the Messaging Pool Manager.
@throws ENabuCoreException Raises an exception if Customer instance is not available or not matches with
@throws ENabuMessagingException Raises an exception if none Pool Manager available.
the existing Messaging Pool Manager.
Gets current Messaging Pool Manager instance . If not defined then creates one for the current Customer .