lithium\data\source\Http::__construct()

public method

Constructor.

Parameters

  • array $config

Returns

void

Source

	public function __construct(array $config = []) {
		$defaults = [
			'adapter'    => null,
			'persistent' => false,
			'scheme'     => 'http',
			'host'       => 'localhost',
			'version'    => '1.1',
			'auth'       => null,
			'login'      => '',
			'password'   => '',
			'port'       => 80,
			'timeout'    => 30,
			'encoding'   => 'UTF-8',
			'methods'    => []
		];
		$config = $config + $defaults;
		$config['username'] = $config['login'];
		parent::__construct($config);
	}