getSession() instead. It's more * efficient and doesn't break FauxRequests or sessions that were changed * by $this->getSessionById() or $this->getEmptySession(). * @param WebRequest $request Any existing associated session will be reset * to the session corresponding to the data in the request itself. * @return Session * @throws \\OverflowException if there are multiple sessions tied for top * priority in the request. Exception has a property "sessionInfos" * holding the SessionInfo objects for the sessions involved. */ public function getSessionForRequest( WebRequest $request ); /** * Fetch a session by ID * @param string $id * @param bool $noEmpty Don't return an empty session * @param WebRequest|null $request Corresponding request. Any existing * session associated with this WebRequest object will be overwritten. * @return Session|null */ public function getSessionById( $id, $noEmpty = false, WebRequest $request = null ); /** * Fetch a new, empty session * * The first provider configured that is able to provide an empty session * will be used. * * @param WebRequest|null $request Corresponding request. Any existing * session associated with this WebRequest object will be overwritten. * @return Session */ public function getEmptySession( WebRequest $request = null ); /** * Return the HTTP headers that need varying on. * * The return value is such that someone could theoretically do this: * @code * foreach ( $provider->getVaryHeaders() as $header => $options ) { * $outputPage->addVaryHeader( $header, $options ); * } * @endcode * * @return array */ public function getVaryHeaders(); /** * Return the list of cookies that need varying on. * @return string[] */ public function getVaryCookies(); }