for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Puzzle\AMQP\Clients;
use Puzzle\AMQP\Client;
use Puzzle\AMQP\WritableMessage;
use Puzzle\AMQP\Messages\InMemoryJson;
use Psr\Log\NullLogger;
use Puzzle\AMQP\Collections;
class InMemory implements Client
{
use \Psr\Log\LoggerAwareTrait;
private
$sentMessages;
$sentMessages
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
class A { var $property; }
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.
public function __construct()
$this->sentMessages = array();
$this->logger = new NullLogger();
}
public function publish($exchangeName, WritableMessage $message)
$this->saveMessage($exchangeName, $message);
public function getQueue($queueName)
throw new \RuntimeException('This AMQP Client must be used only for sending purpose');
public function getExchange($exchangeName)
private function saveMessage($exchangeName, WritableMessage $message)
$this->sentMessages[] = array(
'exchange' => $exchangeName,
'message' => $message
);
public function getSentMessages()
return $this->sentMessages;
public function dropSentMessages()
return $this;
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.