lithium\data\source\MongoDb::enabled()
Overrides
lithium\data\Source::enabled()
With no parameter, checks to see if the mongo
extension is installed. With a parameter,
queries for a specific supported feature.
Parameters
-
string
$feature
Test for support for a specific feature, i.e.
"transactions"
or"arrays"
.
Returns
booleanReturns true
if the particular feature (or if MongoDB) support is enabled,
otherwise false
.
Source
public static function enabled($feature = null) {
if (!$feature) {
return extension_loaded('mongo');
}
$features = array(
'arrays' => true,
'transactions' => false,
'booleans' => true,
'relationships' => true,
'schema' => false,
'sources' => true
);
return isset($features[$feature]) ? $features[$feature] : null;
}