Skip to content
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

separate connection string parsing from connection #494

Merged
merged 10 commits into from Jun 12, 2017

Conversation

koenpunt
Copy link
Collaborator

@koenpunt koenpunt commented Feb 9, 2015

add support for connection details as array

Solution for #315

NB this is a pull request to the 1.1-dev branch

throw new DatabaseException("Empty connection string");
{
$connection_info = new ConnectionInfo($connection_info_or_name);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add in a block that checks if the $connection_info_or_name is an instance of the ConnectionInfo class? That way you can pass around the value object directly and it doesn't have to be re-built each time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm still not happy with the if/else logic in this function anyways.

@koenpunt koenpunt force-pushed the array-connection-info branch 2 times, most recently from 0ffaef0 to db0009b Compare February 9, 2015 22:15
@koenpunt
Copy link
Collaborator Author

@Rican7 I've updated a lot. In need of some doc-block updates here and there but I think this should be alright.

{
return new ConnectionInfo($connection);
}
}, $connections);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oo, nice. Good call on building them here too.

@koenpunt
Copy link
Collaborator Author

@jpfuentes2 any word on this?

@koenpunt koenpunt force-pushed the array-connection-info branch 2 times, most recently from 33a23bb to d5cd8ee Compare March 24, 2015 15:54
@koenpunt koenpunt force-pushed the 1.1-dev branch 2 times, most recently from 494d55e to 352e1b6 Compare June 3, 2017 14:18
@koenpunt koenpunt mentioned this pull request Jun 12, 2017
27 tasks
@koenpunt koenpunt merged commit d5f1895 into jpfuentes2:1.1-dev Jun 12, 2017
@koenpunt koenpunt deleted the array-connection-info branch June 12, 2017 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants