\myMVC_LoginFilter

Filter class to implement a login system.

It checks if a user is authenticated and, if not, redirect to a login action (derived from myMVC_BaseLoginAction)

Summary

Methods
Properties
Constants
__construct()
filter()
No public properties found
No constants found
No protected methods found
$request
$session
$param
$filterType
$calledClass
N/A
No private methods found
No private properties found
N/A

Properties

$request

$request : 

Type

$session

$session : 

Type

$param

$param : 

Type

$filterType

$filterType : 

Type

$calledClass

$calledClass : 

Type

Methods

__construct()

__construct(\myMVC_HttpRequest  $request, \myMVC_HttpSession  $session, \class  $calledClass, string  $filterType, array  $param = array()) 

Constructor.

Parameters

\myMVC_HttpRequest $request

The Request

\myMVC_HttpSession $session

The session

\class $calledClass

The called class (subclass of myMVC_BaseAction or myMVC_BaseView)

string $filterType

Filter type (PREACTION or PREVIEW)

array $param

The optional parameters of the filter

filter()

filter() : \myMVC_HttpResponse

Check if the user already logged in.

If not, redirect to the login action (given as parameter)

Returns

\myMVC_HttpResponse

Response code for an Action or NULL, if the program should continue