XLRstats v3 - League Edition
  • Package
  • Class
  • Tree

Packages

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

Classes

  • AppHelper
  • XlrfunctionsHelper

Class XlrfunctionsHelper

Helper
Extended by XlrfunctionsHelper
Package: app\View\Helper
License: Commons BY-NC-SA 3.0 License (http://creativecommons.org/licenses/by-nc-sa/3.0/)
Located at Helper/XlrFunctionsHelper.php

Methods summary

public string
# ratioSparklineBulletChart( integer $value, array $options = array() )

Draws a ratio bullet graph

Draws a ratio bullet graph

Options

  • 'scripts' (boolean) Weather or not the sparkline scripts will be echoed

Parameters

$value
integer
$value The value to be passed into the chart data
$options
array
$options Available options

Returns

string
public string
# levelSparklinePieChart( integer $value, array $options = array() )

Draws a user level pie chart

Draws a user level pie chart

Options

  • 'scripts' (boolean) Weather or not the sparkline scripts will be echoed

Parameters

$value
integer
$value The value to be passed into the chart data
$options
array
$options Available options

Returns

string
public string
# stripColors( mixed $text )

Strips color codes from text.

Strips color codes from text.

Parameters

$text
mixed
$text

Returns

string
public boolean
# isHome( )

Function to check if an url is our homepage.

Function to check if an url is our homepage.

Returns

boolean
public array
# getCarouselImages( )

Returns an array of images for the selected game from 'webroot/img/carousel' folder.

Returns an array of images for the selected game from 'webroot/img/carousel' folder.

If a folder does not exist with the selected game name, then it will get the images from 'default' folder.

Returns

array
Returns an array of first image and remaining images
public string
# getWeaponName( mixed $weapon = null )

Returns easy weapon name from the game config file. If an easy name is not defined for the weapon, then it returns the console name.

Returns easy weapon name from the game config file. If an easy name is not defined for the weapon, then it returns the console name.

Parameters

$weapon
mixed
$weapon console name of the weapon

Returns

string
public boolean
# getWeaponImage( mixed $weapon, array $options = array() )

Returns weapon image based on data in game config file

Returns weapon image based on data in game config file

Options

  • 'style' CSS styles

Parameters

$weapon
mixed
$weapon
$options
array
$options

Returns

boolean
| image link
public boolean
# getWeaponLink( mixed $weapon )

Parameters

$weapon
mixed
$weapon

Returns

boolean
public boolean
# getWeaponDescription( mixed $weapon )

Parameters

$weapon
mixed
$weapon

Returns

boolean
public string
# getMapName( mixed $map )

Returns easy map name from the game config file. If an easy name is not defined for the map, then it returns the console name.

Returns easy map name from the game config file. If an easy name is not defined for the map, then it returns the console name.

Parameters

$map
mixed
$map console name of the map

Returns

string
public boolean
# getMapImage( mixed $map, array $options = array() )

Returns map image based on data in game config file

Returns map image based on data in game config file

Options

  • 'style' CSS styles

Parameters

$map
mixed
$map
$options
array
$options

Returns

boolean
| image link
public boolean
# getMapLink( mixed $map )

Parameters

$map
mixed
$map

Returns

boolean
public boolean
# getMapDescription( mixed $map )

Parameters

$map
mixed
$map

Returns

boolean
public string
# getTeamName( mixed $team )

Returns easy team name from the game config file. If an easy name is not defined for the map, then it returns the console name.

Returns easy team name from the game config file. If an easy name is not defined for the map, then it returns the console name.

Parameters

$team
mixed
$team

Returns

string
public array
# getBodyPartName( mixed $bodyPart )

Returns fixed name and easy name for body part from game config file.

Returns fixed name and easy name for body part from game config file.

Parameters

$bodyPart
mixed
$bodyPart

Returns

array
public string
# colorizeHitZone( mixed $percentage )

Returns a color to be displayed on hit zone markers based on the percentage value

Returns a color to be displayed on hit zone markers based on the percentage value

Parameters

$percentage
mixed
$percentage

Returns

string
public array|boolean
# getPopulatedLeagueVars( )

This function returns useful data to display the league boxes for only populated leagues on homepage

This function returns useful data to display the league boxes for only populated leagues on homepage

Returns

array|boolean
public string
# getTopActionData( array $topActions = array(), mixed $bestAction, string $option = 'weapon' )

Returns a JSON formatted list of best weapons or maps to be used in pie charts in player's weapon and map tabs.

Returns a JSON formatted list of best weapons or maps to be used in pie charts in player's weapon and map tabs.

Parameters

$topActions
array
$topActions an array of best weapons or maps
$bestAction
mixed
$bestAction favorite weapon or map
$option
string
$option can be weapon or map

Returns

string
public mixed
# showLicenseIcon( )

Returns

mixed
public string
# listPlayers( mixed $data )

Parameters

$data
mixed
$data

Returns

string
public string
# fixName( mixed $playerName, string $fixedName = '', string $defaultName = 'Unknown Soldier' )

Function that replaces names with a fixed name or the empty name default and sanitizes it

Function that replaces names with a fixed name or the empty name default and sanitizes it

Parameters

$playerName
mixed
$playerName
$fixedName
string
$fixedName
$defaultName
string
$defaultName

Returns

string
public string
# sanitizeMe( mixed $str )

Sanitation function for displaying database content in html http://www.php.net/manual/en/function.htmlentities.php

Sanitation function for displaying database content in html http://www.php.net/manual/en/function.htmlentities.php

Parameters

$str
mixed
$str

Returns

string

Magic methods summary

Properties summary

public array $helpers
#
XLRstats v3 - League Edition API documentation generated by ApiGen 2.8.0