lithium\data\source\http\adapter\CouchDb::enabled()
Overrides
lithium\data\Source::enabled()
With no parameter, always returns true, since CouchDB only depends on HTTP. With a
parameter, queries for a specific supported feature.
Parameters
-
string
$featureTest for support for a specific feature, i.e.
"transactions"or"arrays".
Returns
booleanReturns true if the particular feature support is enabled, otherwise
false.
Source
public static function enabled($feature = null) {
if (!$feature) {
return true;
}
$features = [
'arrays' => true,
'transactions' => false,
'booleans' => true,
'relationships' => false,
'schema' => false,
'sources' => false
];
return isset($features[$feature]) ? $features[$feature] : null;
}