Documentation

JsonStatsController extends Controller implements JsonAdapter

Counter

This class counts unique users, page visits, set client infos, referer

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Cloudrexx Development Team info@cloudrexx.com

subpackage

coremodule_stats

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

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

_checkCallMethod()

Check call method

public _checkCallMethod() : mixed

Check if the client support javascript and get display informations from the client

_countBrowser()

Count browser

public _countBrowser() : mixed

Count the browser type/version

Tags
global

ADONewConnection

see
_getBrowser()

_countCountry()

Count country

public _countCountry() : mixed

Count the country

Tags
access

private

global

ADONewConnection

_countHostname()

Count host

public _countHostname() : mixed

Count the host name

Tags
access

private

global

ADONewConnection

_countOperatingSystem()

Count operating system

public _countOperatingSystem() : mixed

Count the operating system of the client

Tags
global

ADONewConnection

see
_getOperatingSytem()

_countRequest()

Count request

public _countRequest() : mixed
Tags
global

ADONewConnection

see
_makeStatistics()

_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
global

ADONewConnection

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
see
_getProxyInformations()
see
_getReferer()
see
_checkForSpider()
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
access

private

global

array $arrReferers

_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

_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
global

ADONewConnection

_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
access

private

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
object

getMessagesAsString()

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


        
On this page

Search results