JsonStatsController
extends Controller
in package
implements
JsonAdapter
Counter
This class counts unique users, page visits, set client infos, referer
Tags
Table of Contents
Interfaces
- JsonAdapter
- JSON Adapter for JSON requests
Properties
- $arrBannedWords : mixed
- $arrClient : mixed
- $arrConfig : mixed
- $arrProxy : mixed
- $arrSpider : mixed
- $colorDepth : mixed
- $currentDate : mixed
- $currentTime : mixed
- $externalSearchTerm : mixed
- $isNewVisitor : mixed
- $javascriptEnabled : mixed
- $md5Id : mixed
- $mobilePhone : mixed
- $pageId : mixed
- $referer : mixed
- $refererBlocked : mixed
- $requestedUrl : mixed
- $screenResolution : mixed
- $searchTerm : mixed
- $spiderAgent : mixed
- $totPageViewsMonth : mixed
- $totUsersMonth : mixed
- $cx : Cx
- Main class instance
- $systemComponentController : SystemComponentController
- SystemComponentController for this Component
Methods
- __call() : mixed
- Route methods like getName(), getType(), getDirectory(), etc.
- __construct() : mixed
- Creates new controller
- _checkCallMethod() : mixed
- Check call method
- _checkForSpider() : mixed
- Check for spider
- _checkMobilePhone() : mixed
- _countBrowser() : mixed
- Count browser
- _countColourDepth() : mixed
- _countCountry() : mixed
- Count country
- _countHostname() : mixed
- Count host
- _countJavascript() : mixed
- _countOperatingSystem() : mixed
- Count operating system
- _countReferer() : mixed
- _countRequest() : mixed
- Count request
- _countScreenResolution() : mixed
- _countSearchquery() : mixed
- _countVisitor() : bool
- Count visitor
- _getBrowser() : string
- Get browser name
- _getClientInfos() : bool
- Get client informations
- _getExternalSearchQuery() : mixed
- get external search query
- _getOperatingSystem() : string
- Get operating system name
- _getProxyInformations() : mixed
- Get proxy informations
- _getReferer() : mixed
- Get referer
- _getRequestedUrl() : mixed
- Get requested page
- _initConfiguration() : mixed
- Initialize configuration
- _makeStatistics() : bool
- Make statistics
- generateStats() : mixed
- Set the requested url,client infos,onlineusers and count users and spiders
- getAccessableMethods() : array<string|int, mixed>
- Returns an array of method names accessable from a JSON request
- getDefaultPermissions() : object
- Returns default permission as object
- getMessagesAsString() : string
- Returns all messages as string
- getName() : string
- Returns the internal name used as identifier for this adapter
- getSystemComponentController() : SystemComponentController
- Returns the main controller
Properties
$arrBannedWords
public
mixed
$arrBannedWords
= array()
$arrClient
public
mixed
$arrClient
= array()
$arrConfig
public
mixed
$arrConfig
= array()
$arrProxy
public
mixed
$arrProxy
= array()
$arrSpider
public
mixed
$arrSpider
= array()
$colorDepth
public
mixed
$colorDepth
= 0
$currentDate
public
mixed
$currentDate
= 0
$currentTime
public
mixed
$currentTime
= 0
$externalSearchTerm
public
mixed
$externalSearchTerm
= ""
$isNewVisitor
public
mixed
$isNewVisitor
= false
$javascriptEnabled
public
mixed
$javascriptEnabled
= 0
$md5Id
public
mixed
$md5Id
= 0
$mobilePhone
public
mixed
$mobilePhone
= ""
$pageId
public
mixed
$pageId
= 0
$referer
public
mixed
$referer
= ""
$refererBlocked
public
mixed
$refererBlocked
= false
$requestedUrl
public
mixed
$requestedUrl
= ""
$screenResolution
public
mixed
$screenResolution
= ""
$searchTerm
public
mixed
$searchTerm
= ""
$spiderAgent
public
mixed
$spiderAgent
= false
$totPageViewsMonth
public
mixed
$totPageViewsMonth
= 0
$totUsersMonth
public
mixed
$totUsersMonth
= 0
$cx
Main class instance
protected
Cx
$cx
= null
$systemComponentController
SystemComponentController for this Component
private
SystemComponentController
$systemComponentController
= null
Methods
__call()
Route methods like getName(), getType(), getDirectory(), etc.
public
__call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
- $methodName : string
-
Name of method to call
- $arguments : array<string|int, mixed>
-
List of arguments for the method to call
Return values
mixed —Return value of the method to call
__construct()
Creates new controller
public
__construct(SystemComponentController $systemComponentController, Cx $cx) : mixed
Parameters
- $systemComponentController : SystemComponentController
-
Main controller for this system component
- $cx : Cx
-
Main class instance
_checkCallMethod()
Check call method
public
_checkCallMethod() : mixed
Check if the client support javascript and get display informations from the client
_checkForSpider()
Check for spider
public
_checkForSpider() : mixed
Check if the user agent is a spider
_checkMobilePhone()
public
_checkMobilePhone() : mixed
_countBrowser()
Count browser
public
_countBrowser() : mixed
Count the browser type/version
Tags
_countColourDepth()
public
_countColourDepth() : mixed
_countCountry()
Count country
public
_countCountry() : mixed
Count the country
Tags
_countHostname()
Count host
public
_countHostname() : mixed
Count the host name
Tags
_countJavascript()
public
_countJavascript() : mixed
_countOperatingSystem()
Count operating system
public
_countOperatingSystem() : mixed
Count the operating system of the client
Tags
_countReferer()
public
_countReferer() : mixed
_countRequest()
Count request
public
_countRequest() : mixed
Tags
_countScreenResolution()
public
_countScreenResolution() : mixed
_countSearchquery()
public
_countSearchquery(mixed $searchTerm, mixed $external) : mixed
Parameters
- $searchTerm : mixed
- $external : mixed
_countVisitor()
Count visitor
public
_countVisitor() : bool
Count the visitor if he was not here within the reload block time, otherwise update this timestamp to now
Tags
Return values
bool —result
_getBrowser()
Get browser name
public
_getBrowser() : string
Read out the browser name from the user agent and returns it
Return values
string —browser name
_getClientInfos()
Get client informations
public
_getClientInfos() : bool
Get the clientinfos like useragent, langugage, ip, proxy, host and referer
Tags
Return values
bool —result
_getExternalSearchQuery()
get external search query
public
_getExternalSearchQuery(string $referer) : mixed
extracts the search term of a query that was typed in at a search machine
Parameters
- $referer : string
Tags
_getOperatingSystem()
Get operating system name
public
_getOperatingSystem() : string
Read out the operating sytem name from the user agent and returns it
Return values
string —operating system name
_getProxyInformations()
Get proxy informations
public
_getProxyInformations() : mixed
Determines if a proxy is used or not. If so, then proxy information are colleted
_getReferer()
Get referer
public
_getReferer() : mixed
Get the referer of the request
_getRequestedUrl()
Get requested page
public
_getRequestedUrl() : mixed
Get the requested page from the $_GET vars. If a session has started, this var will be blocked and not in the uri
_initConfiguration()
Initialize configuration
public
_initConfiguration() : mixed
Initialize the configuration for the counter and statistics
Tags
_makeStatistics()
Make statistics
public
_makeStatistics(string $dbTable) : bool
Makes the requests and the visitors statistics, depending on what was specified in the $dbTable variable
Parameters
- $dbTable : string
-
The table name which should be used (either DBPREFIX.'stats_visitors_summary' or DBPREFIX.'stats_requests_summary')
Tags
Return values
bool —false if the table $dbTable isn't valid, otherwise true
generateStats()
Set the requested url,client infos,onlineusers and count users and spiders
public
generateStats() : mixed
getAccessableMethods()
Returns an array of method names accessable from a JSON request
public
getAccessableMethods() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of method names
getDefaultPermissions()
Returns default permission as object
public
getDefaultPermissions() : object
Return values
objectgetMessagesAsString()
Returns all messages as string
public
getMessagesAsString() : string
Return values
string —HTML encoded error messages
getName()
Returns the internal name used as identifier for this adapter
public
getName() : string
Return values
string —Name of this adapter
getSystemComponentController()
Returns the main controller
public
getSystemComponentController() : SystemComponentController
Return values
SystemComponentController —Main controller for this system component