mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 11:02:40 +00:00
Naming conventions to datasources with plugins. Fixes #819
This commit is contained in:
parent
a1911b4714
commit
2a4489cdf2
6 changed files with 147 additions and 2 deletions
|
@ -272,9 +272,12 @@ class ConnectionManager extends Object {
|
|||
if ($plugin) {
|
||||
$filename = Inflector::underscore($classname);
|
||||
} else {
|
||||
$filename = $config['datasource'] . '_source';
|
||||
$classname = Inflector::camelize(strtolower($filename));
|
||||
$filename = Inflector::underscore($config['datasource']);
|
||||
}
|
||||
if (substr($filename, -7) != '_source') {
|
||||
$filename .= '_source';
|
||||
}
|
||||
$classname = Inflector::camelize(strtolower($filename));
|
||||
}
|
||||
return compact('filename', 'classname', 'parent', 'plugin');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue