Proxy __call for access to search client methods#122
Proxy __call for access to search client methods#122timkelty wants to merge 2 commits intostudioespresso:masterfrom
Conversation
|
Just noticed that laravel\scout uses a |
|
Oooh I like the |
|
…It also might make sense to have a |
Codecov Report
@@ Coverage Diff @@
## master #122 +/- ##
=======================================
Coverage 100% 100%
- Complexity 127 128 +1
=======================================
Files 17 17
Lines 429 431 +2
=======================================
+ Hits 429 431 +2
Continue to review full report at Codecov.
|
|
Ok, @riasvdv I changed it to use the |
|
Hmmm…so upon further reflection, this might need some more thought… While I can get the client now, it is not yet configured, which kind of defeats the purpose of getting it through the scout engine… I'll open an issue for discussion on the best approach. |
I needed access to the client for one-off algolia operations, but
rias\scout\engines\AlgoliaEngine::algoliawas protected, so I couldn't.This adds a getter, and should be non-breaking.
For a breaking change, it might make sense to move getClient to the base class, make the prop private, maybe rename to $client?
Conceptually at least, is the idea here that there might be a non-algolia engine (eg elasticsearch)?