AppDebugController
extends AppController
in package
Description of AppDebugController
Tags
Table of Contents
- USER_UPDATE_ACTIVITY_PERIOD = 3600
- $dataBase : DataBase
- Database access manager.
- $request : Request
- Gives us access to the HTTP request parameters.
- $response : Response
- HTTP response object.
- $uri : string
- Requested Uri
- $controller : Controller
- Controller loaded
- $menuManager : MenuManager
- Load user's menu
- $pageName : string
- Contains the page name.
- $user : User|null
- __construct() : mixed
- Initializes the app.
- close() : mixed
- Save log and disconnects from the database.
- connect() : bool
- debugBar() : DumbBar
- render() : mixed
- Returns the data into the standard output.
- run() : bool
- Runs the application core.
- die() : mixed
- getUriParam() : string
- Returns param number $num in uri.
- ipWarning() : mixed
- Add or increase the attempt counter of the current client IP address.
- isIPBanned() : bool
- Returns true if the client IP has been banned.
- loadController() : void
- Load and process the $pageName controller.
- renderHtml() : void
- Creates HTML with the selected template. The data will not be inserted in it until render() is executed
- cookieAuth() : User|null
- Authenticate the user using the cookie.
- getControllerFullName() : string
- Returns the controllers full name
- getPageName() : string
- Returns the name of the default controller for the current user or for all users.
- loadPlugins() : mixed
- Initialize plugins.
- newUserPassword() : void
- updateCookies() : void
- Updates user cookies.
- userAuth() : User|null
- User authentication, returns the user when successful, or false when not.
- userLogout() : void
- Log out the user.
Constants
USER_UPDATE_ACTIVITY_PERIOD
public
mixed
USER_UPDATE_ACTIVITY_PERIOD
= 3600
Properties
$dataBase
Database access manager.
protected
DataBase
$dataBase
$request
Gives us access to the HTTP request parameters.
protected
Request
$request
$response
HTTP response object.
protected
Response
$response
$uri
Requested Uri
protected
string
$uri
$controller
Controller loaded
private
Controller
$controller
$menuManager
Load user's menu
private
MenuManager
$menuManager
$pageName
Contains the page name.
private
string
$pageName
$user
private
User|null
$user
Methods
__construct()
Initializes the app.
public
__construct([string $uri = '/' ][, string $pageName = '' ]) : mixed
Parameters
- $uri : string = '/'
- $pageName : string = ''
Return values
mixed —close()
Save log and disconnects from the database.
public
close() : mixed
Return values
mixed —connect()
public
connect() : bool
Return values
bool —debugBar()
public
debugBar() : DumbBar
Return values
DumbBar —render()
Returns the data into the standard output.
public
render() : mixed
Return values
mixed —run()
Runs the application core.
public
run() : bool
Return values
bool —die()
protected
abstract die(int $status[, string $message = '' ]) : mixed
Parameters
- $status : int
- $message : string = ''
Return values
mixed —getUriParam()
Returns param number $num in uri.
protected
getUriParam(string $num) : string
Parameters
- $num : string
Return values
string —ipWarning()
Add or increase the attempt counter of the current client IP address.
protected
ipWarning() : mixed
Return values
mixed —isIPBanned()
Returns true if the client IP has been banned.
protected
isIPBanned() : bool
Return values
bool —loadController()
Load and process the $pageName controller.
protected
loadController(string $pageName) : void
Parameters
- $pageName : string
Return values
void —renderHtml()
Creates HTML with the selected template. The data will not be inserted in it until render() is executed
protected
renderHtml(string $template[, string $controllerName = '' ]) : void
Parameters
- $template : string
- $controllerName : string = ''
Return values
void —cookieAuth()
Authenticate the user using the cookie.
private
cookieAuth(User &$user) : User|null
Parameters
- $user : User
Return values
User|null —getControllerFullName()
Returns the controllers full name
private
getControllerFullName(string $pageName) : string
Parameters
- $pageName : string
Return values
string —getPageName()
Returns the name of the default controller for the current user or for all users.
private
getPageName() : string
Return values
string —loadPlugins()
Initialize plugins.
private
loadPlugins() : mixed
Return values
mixed —newUserPassword()
private
newUserPassword() : void
Return values
void —updateCookies()
Updates user cookies.
private
updateCookies(User &$user[, bool $force = false ]) : void
Parameters
- $user : User
- $force : bool = false
Return values
void —userAuth()
User authentication, returns the user when successful, or false when not.
private
userAuth() : User|null
Return values
User|null —userLogout()
Log out the user.
private
userLogout() : void