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

Start using constructor injection #24

Open
judgej opened this issue Mar 15, 2014 · 0 comments
Open

Start using constructor injection #24

judgej opened this issue Mar 15, 2014 · 0 comments

Comments

@judgej
Copy link
Member

judgej commented Mar 15, 2014

Most of the methods supported by the Server (or Direct or Shared) require access to a Transaction model with its relevant storage. That should be moved to the constructor so that we can guarantee that it is available, instead of keep checking whether it has been set whenever we need it.

Any apps that make use of the setter would need modifying, so this is a warning :-)

Similarly, TransactionPdo should also take a database object in its constructor, since it will not work without one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant