-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Ability to extend with our own adapters #125
Comments
I can open a pull request for this one, but thought best to talk about how it would best work for everyone. |
I'd say the two approaches are basically the same, and I don't have any particular opinion on one or the other.
$config = array('type' => 'RocksDb');
$class_name = "Ruckusing_Adapter_${config['type']}_Base";
if(class_exists($class_name)) {
$adapter = new $class_name();
}
$config = array('adapter_class' => 'Acme_RocksDb_Adapter');
$class_name = $config['adapter_class'];
if(class_exists($class_name)) {
$adapter = new $class_name();
} Maybe the only advantage to number 2 is that the adapter class can be called anything? |
I think the second way is best too as it can fit into people's current naming conventions easier. |
E.g. PDO or other systems could be quickly added this way.
The text was updated successfully, but these errors were encountered: