/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/migrations/src/Util
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/migrations/src/Util/SchemaTrait.php (2189B)
getOption('connection');
/** @var \Cake\Database\Connection $connection */
$connection = ConnectionManager::get($connectionName);
if (!method_exists($connection, 'getSchemaCollection')) {
$msg = sprintf(
'The "%s" connection is not compatible with orm caching, ' .
'as it does not implement a "getSchemaCollection()" method.',
$connectionName
);
$output->writeln('
' . $msg . '');
return null;
}
$config = $connection->config();
if (empty($config['cacheMetadata'])) {
$output->writeln('Metadata cache was disabled in config. Enable to cache or clear.');
return null;
}
$connection->cacheMetadata(true);
/**
* @var \Cake\Database\Schema\CachedCollection
*/
return $connection->getSchemaCollection();
}
}