public function locate(QueueContextInterface $queueManager, QueueInterface $queue)
    {

        // load registered queues and requested queue name
        $queues = $queueManager->getQueues();

        // return the requested message queue for the passed priority key, if available
        if (array_key_exists($queueName = $queue->getName(), $queues)) {
            return $queues[$queueName];
        }
    }
public function locate(QueueContextInterface $queueManager, QueueInterface $queue)
    {

        // load registered queues and requested queue name
        $queues = $queueManager->getQueues();

        // return the requested message queue for the passed priority key, if available
        if (array_key_exists($queueName = $queue->getName(), $queues)) {
            return $queues[$queueName];
        }
    }
public function locate ( QueueContextInterface $ queueManager , QueueInterface $ queue ) { // load registered queues and requested queue name $ queues = $ queueManager -> getQueues ( ) ; // return the requested message queue for the passed priority key, if available if ( array_key_exists ( $ queueName = $ queue -> getName ( ) , $ queues ) ) { return $ queues [ $ queueName ] ; } }
Tries to locate the queue that handles the request and returns the instance
if one can be found.

@param \AppserverIo\Psr\Pms\QueueContextInterface $queueManager The queue manager instance
@param \AppserverIo\Psr\Pms\QueueInterface        $queue        The queue request

@return \AppserverIo\Psr\Pms\QueueInterface The requested queue instance
@see \AppserverIo\Psr\Pms\ResourceLocatorInterface::locate()
Tries to locate the queue that handles the request and returns the instance if one can be found .