-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cookie Helper #205
Comments
I can work on this as it needs prefixing from Config/App. |
If I remember correctly, helpers were created mostly for View purposes. Perhaps this is useful on the UI side wherein there's no need to create variables (needed by views) from the controller thus, removing the tedious part. Meanwhile, are we missing Response::getCookie() method? CI3 has the implicit Input::cookie(), however I prefer the explicit Response::getCookie() to compensate for Response::setCookie(). |
In addition, I wonder if "headers already sent exception" for unit tests has been solved? I'm not thoroughly familiar with any concrete solutions to test cookies with this. |
Cancel Response::getCookie(). Perhaps I can find a workaround via IncomingRequest::getCookie(). |
I doubt it. Someone had started refactoring some stuff for us but I don't think we got that far into our additional testing features.
Correct, cookies are read from the Request and written to the Response, as per HTTP specs. This shouldn't need anything fancy, though, grab the request or response object from |
Nice. Was looking for these two. I'll start focusing on Services class for future implementations. I'll also submit a PR for this helper in a couple of hours. |
Completed in #241 |
I can see these being handy at times, though in controllers you can now use
$request->getCookie()
and$response->setCookie()
so this might not be needed, honestly. However, for now we'll keep it in place.Basically a straight port, setup to use our new features and styles.
Development Checklist:
The text was updated successfully, but these errors were encountered: