lithium\data\source\database\adapter\MySql::__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: 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 specify the path to the socket (i.e. '/path/to/socket').
    • 'strict' boolean|null: When true will enable strict mode by setting sql-mode to STRICT_ALL_TABLES. When false will disable strict mode explictly by settings sql-mode to an empty value `. A value of null` leaves the setting untouched (this is the default) and the default setting of the database is used.

Returns

void

Source

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