UpdaterRedirectMiddleware
in package
implements
MiddlewareInterface
Class UpdaterRedirectMiddleware
Interfaces, Classes and Traits
- MiddlewareInterface
Table of Contents
- $connection : Connection
- $path : Path
- $url : Url
- __construct() : mixed
- UpdaterRedirectMiddleware constructor.
- process() : ResponseInterface
- getDbVersion() : string
- Loads the shop version information from the database.
- getReleaseInfoVersion() : string
- Loads the shop version information from the release_info.php file.
- isAdmin() : bool
- Checks if the currently logged in user is an admin.
- isVersionNotMatching() : bool
- Compares the db and release info version and returns true if they are NOT matching.
Properties
$connection
private
Connection
$connection
$path
private
Path
$path
$url
private
Url
$url
Methods
__construct()
UpdaterRedirectMiddleware constructor.
public
__construct(Connection $connection, Url $url, Path $path) : mixed
Parameters
Return values
mixed —process()
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Tags
Return values
ResponseInterface —getDbVersion()
Loads the shop version information from the database.
private
getDbVersion() : string
Return values
string —getReleaseInfoVersion()
Loads the shop version information from the release_info.php file.
private
getReleaseInfoVersion() : string
Return values
string —isAdmin()
Checks if the currently logged in user is an admin.
private
isAdmin() : bool
The method determines this by checking session values.
Return values
bool —isVersionNotMatching()
Compares the db and release info version and returns true if they are NOT matching.
private
isVersionNotMatching() : bool