PHP Class PKPUsageEventPlugin, pkp-lib

Inheritance: extends GenericPlugin
Datei anzeigen Open project: pkp/pkp-lib Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor
getDescription ( )
getDisplayName ( )
getEnabled ( )
getInstallSitePluginSettingsFile ( )
getName ( )
getUniqueSiteId ( ) : mixed Get the unique site id.
getUsageEvent ( $hookName, $args ) Get usage event and pass it to the registered plugins, if any.
isSitePlugin ( )
register ( $category, $path )

Protected Methods

Method Description
buildUsageEvent ( $hookName, $args ) : array Build an usage event.
getEventHooks ( ) : array Get all hooks that must be used to generate usage events.
getHtmlPageAssocTypes ( ) : array Get all assoc types that have their usage event produced by html page access.
getUsageEventData ( $hookName, $hookArgs, $request, $router, $templateMgr, $context ) : array Get usage event details based on the passed hook.
isPubIdObjectType ( $pubObject ) : boolean Whether or not the passed object is of a type that can have different public identifiers, like DOI, URN, etc.

Method Details

__construct() public method

Constructor
public __construct ( )

buildUsageEvent() protected method

Build an usage event.
protected buildUsageEvent ( $hookName, $args ) : array
$hookName string
$args array
return array

getDescription() public method

public getDescription ( )

getDisplayName() public method

public getDisplayName ( )

getEnabled() public method

public getEnabled ( )

getEventHooks() protected method

Get all hooks that must be used to generate usage events.
protected getEventHooks ( ) : array
return array

getHtmlPageAssocTypes() abstract protected method

Get all assoc types that have their usage event produced by html page access.
abstract protected getHtmlPageAssocTypes ( ) : array
return array

getInstallSitePluginSettingsFile() public method

getName() public method

public getName ( )

getUniqueSiteId() public method

Get the unique site id.
public getUniqueSiteId ( ) : mixed
return mixed string or null

getUsageEvent() public method

Get usage event and pass it to the registered plugins, if any.
public getUsageEvent ( $hookName, $args )

getUsageEventData() protected method

Subclasses should extend to implement application specifics.
See also: PKPUsageEventPlugin::buildUsageEvent()
protected getUsageEventData ( $hookName, $hookArgs, $request, $router, $templateMgr, $context ) : array
$hookName string
$hookArgs array
$request PKPRequest
$router PageRouter
$templateMgr PKPTemplateManager
$context Context
return array With the following data: DataObject the published object, boolean download success, integer used published object assoc type, string used published object id foreign keys lookup (all parent associated objects id, preceeded with a single letter to identify the object), string canonical url page, string canonical url operation, array with canonical url parameters.

isPubIdObjectType() abstract protected method

Whether or not the passed object is of a type that can have different public identifiers, like DOI, URN, etc.
abstract protected isPubIdObjectType ( $pubObject ) : boolean
$pubObject DataObject
return boolean

isSitePlugin() public method

public isSitePlugin ( )

register() public method

public register ( $category, $path )