/** * Adds config values to the public properties when a new object is created. * * @param array $config Configuration options : default value * - `'host'` _string_: '127.0.0.1' * - `'login'` _string_: 'guest' * - `'password'` _string_: 'guest' * - `'port'` _integer_: 5672 * - `'vhost'` _string_: '/' * - `'exchange'` _string_: 'li3.default' * - `'exchangeType'` _const_: AMQP_EX_TYPE_DIRECT * - `'queue'` _string_: 'li3.default' * - `'routingKey'` _mixed_: null * - `'durable'` _boolean_: false * - `'minMessages'` _integer_: 0 * - `'maxMessages'` _integer_: 1 * - `'prefetchCount'` _integer_: 3 * - `'autoConfirm'` _boolean_: false * - `'autoConnect'` _integer_: 1 * - `'readTimeout'` _integer_: 0 * - `'writeTimeout'` _integer_: 0 */ public function __construct(array $config = array()) { $defaults = array('host' => '127.0.0.1', 'login' => 'guest', 'password' => 'guest', 'port' => 5672, 'vhost' => '/', 'exchange' => 'li3.default', 'exchangeType' => AMQP_EX_TYPE_DIRECT, 'queue' => 'li3.default', 'routingKey' => null, 'durable' => false, 'minMessages' => 0, 'maxMessages' => 1, 'prefetchCount' => 3, 'autoConfirm' => false, 'autoConnect' => 1, 'readTimeout' => 0, 'writeTimeout' => 0, 'connectTimeout' => 0); parent::__construct($config + $defaults); }
/** * Adds config values to the public properties when a new object is created. * * @param array $config Configuration options : default value * - `'host'` _string_: '127.0.0.1' * - `'port'` _interger_: 11300 * - `'timeout'` _interger_: 60 * - `'tube'` _string_: 'default' * - `'kickBound'` _interger_: 100 * - `'persistent'` _boolean_: true * - `'autoConfirm'` _boolean_: false * - `'autoConnect'` _boolean_: true */ public function __construct(array $config = array()) { $defaults = array('host' => '127.0.0.1', 'port' => 11300, 'timeout' => 60, 'tube' => 'default', 'kickBound' => 100, 'persistent' => true, 'autoConfirm' => false, 'autoConnect' => true); parent::__construct($config + $defaults); }