XLRstats v3 - League Edition
  • Package
  • Class
  • Tree

Packages

  • app
    • Controller
      • Component
    • Model
    • Plugin
      • Dashboard
        • Controller
        • Model
    • View
      • Helper

Classes

  • AchievementsController
  • AliasesController
  • AppController
  • AwardsController
  • FeedsController
  • InstallController
  • IpAliasesController
  • LeaguesController
  • MapStatsController
  • MonthlyStatsController
  • OpponentsController
  • PagesController
  • PenaltiesController
  • PlayerActivitiesController
  • PlayerMapsController
  • PlayerStatsController
  • PlayerWeaponsController
  • ServerInfoController
  • ServerPlayersController
  • UserSoldiersController
  • WeaponStatsController
  • WeeklyStatsController

Class AppController

Application Controller

Add your application-wide methods in the class below, your controllers will inherit them.

Controller
Extended by AppController

Direct known subclasses

AchievementsController, AliasesController, PagesController, PenaltiesController, PlayerActivitiesController, PlayerHitZonesController, PlayerMapsController, PlayerStatsController, PlayerWeaponsController, PluginreqController, ServerInfoController, ServerPlayersController, AwardsController, UserSoldiersController, WeaponStatsController, WeeklyStatsController, DashboardAppController, FeedsController, IpAliasesController, LeaguesController, MapStatsController, MonthlyStatsController, OpponentsController

Indirect known subclasses

DashboardController, GroupsController, HomeController, MaintenanceController, OptionsController, PlayerSoldiersController, ServerGroupsController, ServerOptionsController, ServersController

Package: app\Controller
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: Commons BY-NC-SA 3.0 License (http://creativecommons.org/licenses/by-nc-sa/3.0/) Here is the Doxygen Mainpage Content: \mainpage \section intro_sec Introduction Here is the developer documentation of the Models, Controllers and Views of the XLRstats webfront v3. This docs also cover the dashboard plugin that is part of the core app. \section installation_sec Installation Installation instructions can be found at www.xlrstats.com
Link: http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
Located at AppController.php

Methods summary

public
# beforeFilter( )

Called before the controller action.

Called before the controller action.

public
# beforeRender( )

Called after the controller action is run, but before the view is rendered.

Called after the controller action is run, but before the view is rendered.

public
# checkCaching( )

Checks caching for defined plugins and controllers

Checks caching for defined plugins and controllers

public string
# getSubdomain( )

Check if we are in a subdomain

Check if we are in a subdomain

Returns

string
url
null
public
# getDatabaseId( )

Determines which B3 database we need to access. See AppModel::__construct() for database selection logic.

Determines which B3 database we need to access. See AppModel::__construct() for database selection logic.

First check if we have a server parameter in our url, if so save it to config and session If we have multiple controllers after our initial call, we need our session data to use the proper DB Last, if no server is known, and no session data is available, fall back to our first available server

public
# loadConfigOptions( )

Loads Configuration options

Loads Configuration options

public
# loadServerConfigOptions( )

Loads Server specific Configuration options

Loads Server specific Configuration options

public
# loadB3Servers( )

Loads information for all B3 servers

Loads information for all B3 servers

public
# loadGameConfig( )

Loads game config file

Loads game config file

public
# checkAuthorization( )

Controls the Authorization using cakePHP's built-in ActionsAuthorize and ControllerAuthorize handlers.

Controls the Authorization using cakePHP's built-in ActionsAuthorize and ControllerAuthorize handlers.

ActionsAuthorize Uses the AclComponent to check for permissions on an action level. ControllerAuthorize Calls isAuthorized() on the active controller, and uses the return of that to authorize a user.

We use three basic built-in user groups in our database;

  • Super Admin : Has root access system wide.
  • Admin : Has administrative access to users and server options management within the server group he is assigned. An admin can be assigned to one or more server groups and belongs to serverGroupAdmins array configured in global configuration.
  • User : Has access only to public pages.
public
# getUserData( )

Sets $user variable that holds an array of user information to use in controllers and views.

Sets $user variable that holds an array of user information to use in controllers and views.

public
# getServerGroupId( )

Writes current server_group_id to a session var

Writes current server_group_id to a session var

public
# isAuthorized( )

Used to check if a serverGroupAdmin is authorized to access a certain server group

Used to check if a serverGroupAdmin is authorized to access a certain server group

public
# checkLicense( )

Checks license

Checks license

public mixed
# getServerName( null $serverID = null )

Returns server name

Returns server name

Parameters

$serverID
null
$serverID

Returns

mixed

Magic methods summary

Properties summary

public array $uses
#

Models

Models

public array $helpers
#

Helpers

Helpers

public array $components
#

Components

Components

public array $user
#

An array of user data

An array of user data

XLRstats v3 - League Edition API documentation generated by ApiGen 2.8.0