Home
DevCentral
Search
Configure Global Search
Log In
Transactions
D3857
Change Details
Change Details
Old
New
Diff
Static methods to lookup, load or resolve ID for a user are moved into the UserRepository class. An instance of the UserRepository class is added to the context. Authentication methods and workspace code are the two places of the code using those methods, they are adapted to be able to call them from the context or pass database.
Static methods to lookup, load or resolve ID for a user are moved into the UserRepository class. An instance of the UserRepository class is added to the context. Authentication methods and workspace code are the two places of the code using those methods, they are adapted to be able to call them from the context or pass database. [ Next steps ] From dependency injection point of view, this change is "part 1": it replaces global variables by the context use, but $context is still a service locator. From separation of concerns point of view, plan is to move every method with a call to the database to UserRepository.
Static methods to lookup, load or resolve ID for a user are moved into the UserRepository class. An instance of the UserRepository class is added to the context. Authentication methods and workspace code are the two places of the code using those methods, they are adapted to be able to call them from the context or pass database.
[ Next steps ] From dependency injection point of view, this change is "part 1": it replaces global variables by the context use, but $context is still a service locator. From separation of concerns point of view, plan is to move every method with a call to the database to UserRepository.
Continue