Skip to content

Commit

Permalink
Add doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibaud Fabre committed Mar 27, 2016
1 parent 626232f commit a4a23ec
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/Amqp/AmqpConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

class AmqpConfiguration
{

/**
* @param array $parameters
* @return AmqpConfiguration
*/
public static function parse(array $parameters)
{
$configuration = new self();
Expand All @@ -27,25 +30,55 @@ public static function parse(array $parameters)
return $configuration;
}

/**
* @param array $parameters
* @param string $key
* @param mixed|null $default
* @return mixed Value set in array or default value
*/
private static function extractValueOrDefault(array $parameters, $key, $default = null)
{
return isset($parameters[$key]) ? $parameters[$key] : $default;
}

/**
* @var string
*/
private $host = 'localhost';

/**
* @var string
*/
private $vhost = '/';

/**
* @var int
*/
private $port = 5672;

/**
* @var string
*/
private $user = 'guest';

/**
* @var string
*/
private $password = 'guest';

/**
* @var string
*/
private $deadLetterExchange = 'alchemy-dead-exchange';

/**
* @var string
*/
private $exchange = 'alchemy-exchange';

/**
* @var string
*/
private $queue = 'alchemy-queue';

/**
Expand Down

0 comments on commit a4a23ec

Please sign in to comment.