guzzle - Where is the get() function in PHP GuzzleHttp?
one text
I'm trying to overwrite the get()
function of GuzzleHttp Client
but I can't find it in the source code.
I found the file vendor/guzzlehttp/guzzle/src/Client.php
but there is no get()
function inside it.
I'm trying to overwrite the get
function, so I can implement our own cache function(we want to store and retrieve data from a .json
file.
The first question is how can I see the code related to the get()
function? so I can overwrite it more easily. I wrote this code:
class SiteManagerService extends Client
{
public function get($uri)
{
die($uri);
}
}
I overwrite the get function, but I don't know how $uri
works and what should it returns and how to handle the options? etc...
The second part of my question is do you have any better solution for our custom cache system?
so far I've tried https://github.com/Kevinrob/guzzle-cache-middleware
and it's caching well, but not in the format I want, because we want.
I want it to be a mycustomname.json
with custom values inside it, and the package has its own file names with its own values... so I can't work with it...