lithium\data\source\database\adapter\PostgreSql::__construct()

public method

Constructor.

Parameters

  • array $config

    The available configuration options are the following. Further options are inherited from the parent classes. Typically, these parameters are set in Connections::add(), when adding the adapter to the list of active connections.

    • 'host' string|boolean: A string in the form of '<host>', '<host>:<port>' or ':<port>' indicating the host and/or port to connect to. When one or both are not provided uses general server defaults. To use Unix sockets set this to false.
    • 'schema' string: The name of the database schema to use. Defaults to 'public'.
    • 'timezone' string: The timezone to use. Defaults to 'null'

Returns

void

Source

	public function __construct(array $config = []) {
		$defaults = [
			'host' => static::DEFAULT_HOST . ':' . static::DEFAULT_PORT,
			'schema' => 'public',
			'timezone' => null
		];
		parent::__construct($config + $defaults);
	}