lithium\data\source\database\adapter\MySql::enabled()

public static method

Check for required PHP extension, or supported database feature.

Parameters

  • string $feature

    Test for support for a specific feature, i.e. "transactions" or "arrays".

Returns

boolean

Returns true if the particular feature (or if MySQL) support is enabled, otherwise false.

Source

	public static function enabled($feature = null) {
		if (!$feature) {
			return extension_loaded('pdo_mysql');
		}
		$features = [
			'arrays' => false,
			'transactions' => false,
			'booleans' => true,
			'schema' => true,
			'relationships' => true,
			'sources' => true
		];
		return isset($features[$feature]) ? $features[$feature] : null;
	}