adminGalleryStats
in package
Class for Gallery backend statistics
Tags
Table of Contents
Properties
- $bargraphmaxsize : mixed
- $from_number : mixed
- $items : mixed
- $pagepath : mixed
- $sortorder : mixed
- $to_number : mixed
- $type : mixed
Methods
- __construct() : mixed
- Setup the object for the statistics to get
- getDBQueryBase() : string
- Gets the base db query for some requests
- getDBQueryLimit() : string
- Gets the db query LIMIt part generated from the from and to values
- getDiskSpaceStats() : array<string|int, mixed>
- Returns an array with disk space stats of Zenphoto folders with the gettext title ready for sprintf/printf as the key and the filesystem value of folders as the value
- getEntryData() : array<string|int, mixed>
- Gets an array with the thumb, editurl, viewurl and title as available
- getFilesize() : mixed
- http://php.net/manual/de/function.filesize.php
- getHeadline() : string
- Gets the statistic table headline plus sortorder appendix
- getImageTypeStats() : array<string|int, mixed>
- Gets the mimetype image statistic
- getItemBarSize() : int
- Gets the bar size for an item value
- getItemName() : string
- Gets the item name (folder, filename etc)
- getItems() : array<string|int, mixed>
- Gets the items as requested
- getItemValue() : string|int
- Gets the value of an item
- getMaxvalue() : int
- Gets the max value of total items statistics
- getNoStatisticsMessage() : string
- Gets the message if there are no statistics available
- getPageHeadline() : string
- Gets the page title
- getProcessedFromToNumbers() : array<string|int, mixed>
- Processes the get/from numbers as an array from the $_GET values submitted.
- getSingleStatSelectionFormActionURL() : string
- Gets the action URL for from/to single stats form
- getSortorders() : array<string|int, mixed>
- Gets an array with the all possible sortorders as key and the gettext names as values
- getSupportedTypes() : array<string|int, mixed>
- Gets an nestsed array of supported items types as key asn and array with the gettext type title and an array of supported sortorders
- getSupportedTypesByType() : array<string|int, mixed>
- Gets the types data and sortorders by type
- getViewMoreData() : array<string|int, mixed>
- Returns an array with the view more url and title if applicable
- printDiskSpaceStats() : mixed
- Prints the diskspace stats of Zenphoto folders
- printImageTypeStats() : mixed
- Prints the mimetype image statistic
- printItemEntry() : mixed
- Prints an statistics entry for a single item
- printSingleStatSelectionForm() : mixed
- Prints the form to select the from to range for single statistic display
- printStatistics() : mixed
- Prints the statistics table for the items chosen
- printStatisticsMenu() : mixed
- Prints the jump mark menu for all supported item types and their sortorders
- printTable() : mixed
- Prints the box with the imagetype perentage stats
- registerSubTabs() : mixed
- Registers the subtabs
- getAlbumsWithMostImages() : array<string|int, mixed>
- Gets the albums with the most images without including subalbum images
- getLatestItems() : array<string|int, mixed>
- Gets the latest items (ID order, e.g. filesystem discovery order for images and albums)
- getLatestUpdatedItems() : array<string|int, mixed>
- Gets the latest updated albums
- getMostCommentedItems() : array<string|int, mixed>
- Gets the most commented items
- getMostDownloadedFiles() : type
- Gets the most downloaded files as stored by the download list plugin
- getMostRatedItems() : array<string|int, mixed>
- Gets the most rated items
- getMostUsedItems() : array<string|int, mixed>
- Gets the most used items
- getPopularImages() : array<string|int, mixed>
- Gets the most popular images (most hitcounts)
- getPopularItems() : array<string|int, mixed>
- Gets the most popular items, those with the most hitcounts
- getTopRatedItems() : array<string|int, mixed>
- Gets the top rated items
Properties
$bargraphmaxsize
public
mixed
$bargraphmaxsize
= 90
$from_number
protected
mixed
$from_number
= 0
$items
protected
mixed
$items
= \null
$pagepath
protected
static mixed
$pagepath
= \FULLWEBPATH . '/' . \ZENFOLDER . '/' . \UTILITIES_FOLDER . '/gallery_statistics.php?page=gallerystatistics'
$sortorder
protected
mixed
$sortorder
= ''
$to_number
protected
mixed
$to_number
= 10
$type
protected
mixed
$type
= ''
Methods
__construct()
Setup the object for the statistics to get
public
__construct([string $sortorder = 'mostimages' ][, string $type = 'albums' ][, string $from_number = 0 ][, string $to_number = 10 ]) : mixed
Parameters
- $sortorder : string = 'mostimages'
-
Sortorder to use: "mostused", "popular" ,"popularimages", "mostrated", "toprated", "mostcommented", "mostimages", "latest", "latestupdated":
- $type : string = 'albums'
-
Name of the item/object type to use. Note that not all sortorders are available for all types
- $from_number : string = 0
-
Start numberof records to get from the database, default 0
- $to_number : string = 10
-
End number to get, default 10
Tags
getDBQueryBase()
Gets the base db query for some requests
public
getDBQueryBase() : string
Tags
Return values
stringgetDBQueryLimit()
Gets the db query LIMIt part generated from the from and to values
public
getDBQueryLimit() : string
Tags
Return values
stringgetDiskSpaceStats()
Returns an array with disk space stats of Zenphoto folders with the gettext title ready for sprintf/printf as the key and the filesystem value of folders as the value
public
static getDiskSpaceStats() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getEntryData()
Gets an array with the thumb, editurl, viewurl and title as available
public
getEntryData(array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
- $item : array<string|int, mixed>
-
Item array
Tags
Return values
array<string|int, mixed>getFilesize()
http://php.net/manual/de/function.filesize.php
public
static getFilesize(mixed $path) : mixed
Parameters
- $path : mixed
Tags
getHeadline()
Gets the statistic table headline plus sortorder appendix
public
getHeadline() : string
Tags
Return values
stringgetImageTypeStats()
Gets the mimetype image statistic
public
static getImageTypeStats() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getItemBarSize()
Gets the bar size for an item value
public
getItemBarSize(array<string|int, mixed> $item) : int
Parameters
- $item : array<string|int, mixed>
Tags
Return values
intgetItemName()
Gets the item name (folder, filename etc)
public
getItemName(array<string|int, mixed> $item) : string
Parameters
- $item : array<string|int, mixed>
-
Array of the item
Tags
Return values
stringgetItems()
Gets the items as requested
public
getItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getItemValue()
Gets the value of an item
public
getItemValue(array<string|int, mixed> $item) : string|int
Parameters
- $item : array<string|int, mixed>
Tags
Return values
string|intgetMaxvalue()
Gets the max value of total items statistics
public
getMaxvalue() : int
Tags
Return values
intgetNoStatisticsMessage()
Gets the message if there are no statistics available
public
getNoStatisticsMessage() : string
Tags
Return values
stringgetPageHeadline()
Gets the page title
public
static getPageHeadline([string $type = null ]) : string
Parameters
- $type : string = null
-
The item type
Return values
stringgetProcessedFromToNumbers()
Processes the get/from numbers as an array from the $_GET values submitted.
public
static getProcessedFromToNumbers() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSingleStatSelectionFormActionURL()
Gets the action URL for from/to single stats form
public
static getSingleStatSelectionFormActionURL() : string
Tags
Return values
stringgetSortorders()
Gets an array with the all possible sortorders as key and the gettext names as values
public
static getSortorders() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSupportedTypes()
Gets an nestsed array of supported items types as key asn and array with the gettext type title and an array of supported sortorders
public
static getSupportedTypes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSupportedTypesByType()
Gets the types data and sortorders by type
public
static getSupportedTypesByType([string $type = null ]) : array<string|int, mixed>
Parameters
- $type : string = null
-
Type to get thte supported sortorders
Tags
Return values
array<string|int, mixed>getViewMoreData()
Returns an array with the view more url and title if applicable
public
getViewMoreData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>printDiskSpaceStats()
Prints the diskspace stats of Zenphoto folders
public
static printDiskSpaceStats() : mixed
Tags
printImageTypeStats()
Prints the mimetype image statistic
public
static printImageTypeStats() : mixed
Tags
printItemEntry()
Prints an statistics entry for a single item
public
printItemEntry(array<string|int, mixed> $item, int $count) : mixed
Parameters
- $item : array<string|int, mixed>
- $count : int
Tags
printSingleStatSelectionForm()
Prints the form to select the from to range for single statistic display
public
static printSingleStatSelectionForm(array<string|int, mixed> $fromtonumbers, string $sortorder, string $type) : mixed
Parameters
- $fromtonumbers : array<string|int, mixed>
-
The array from as returned by adminGalleryStats::getProcessedFromToNumbers();
- $sortorder : string
-
The sortorder to get
- $type : string
-
The item type to get
Tags
printStatistics()
Prints the statistics table for the items chosen
public
printStatistics() : mixed
Tags
printStatisticsMenu()
Prints the jump mark menu for all supported item types and their sortorders
public
static printStatisticsMenu([string $type = null ]) : mixed
Parameters
- $type : string = null
-
Type to get the supported sortorders
Tags
printTable()
Prints the box with the imagetype perentage stats
public
static printTable(mixed $stats, mixed $title) : mixed
Parameters
- $stats : mixed
- $title : mixed
Tags
registerSubTabs()
Registers the subtabs
public
static registerSubTabs() : mixed
Tags
getAlbumsWithMostImages()
Gets the albums with the most images without including subalbum images
private
getAlbumsWithMostImages() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getLatestItems()
Gets the latest items (ID order, e.g. filesystem discovery order for images and albums)
private
getLatestItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getLatestUpdatedItems()
Gets the latest updated albums
private
getLatestUpdatedItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getMostCommentedItems()
Gets the most commented items
private
getMostCommentedItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getMostDownloadedFiles()
Gets the most downloaded files as stored by the download list plugin
private
getMostDownloadedFiles() : type
Tags
Return values
typegetMostRatedItems()
Gets the most rated items
private
getMostRatedItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getMostUsedItems()
Gets the most used items
private
getMostUsedItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getPopularImages()
Gets the most popular images (most hitcounts)
private
getPopularImages() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getPopularItems()
Gets the most popular items, those with the most hitcounts
private
getPopularItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTopRatedItems()
Gets the top rated items
private
getTopRatedItems() : array<string|int, mixed>