PHP Class Statistics

Author: Egor V. Derevyankin
Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
JavaScriptTrigger ( integer $p_params ) : string Prepares JavaScript trigger for statistics requests
ProcessStats ( boolean &$p_statsOnly ) : boolean Process the statistics for the request.
WriteStats ( integer $p_type, integer $p_specifier ) : boolean Writes the statistics for the request.

Method Details

JavaScriptTrigger() public static method

Prepares JavaScript trigger for statistics requests
public static JavaScriptTrigger ( integer $p_params ) : string
$p_params integer specs to distinguish the request, js variables and functions
return string

ProcessStats() public static method

Process the statistics for the request.
public static ProcessStats ( boolean &$p_statsOnly ) : boolean
$p_statsOnly boolean Is this request just for statistics.
return boolean

WriteStats() public static method

This works according to SessionRequest::Create, just done directly to avoid Zend usage to make it as fast as possible. Note that it contains some apparently nonsensical processing that should be probably avoided, but it was at the original workflow and this is just a copy. I suppose that it would really like to have some workflow simplification.
public static WriteStats ( integer $p_type, integer $p_specifier ) : boolean
$p_type integer type_id of article or, for future, other types
$p_specifier integer object_id of the read article
return boolean