ZenphotoCMS 1.6.2

cacheManager

Standard options interface

Tags
author

Stephen

Table of Contents

Properties

$albums_cached  : mixed
$enabledsizes  : mixed
$images_cached  : mixed
$imagesizes_cached  : mixed
$imagesizes_failed  : mixed
$imagesizes_total  : mixed
$missingimages  : mixed
$sizes  : mixed
$starttime  : mixed

Methods

__construct()  : mixed
addCacheSize()  : mixed
Adds a custom image cache size for themes and – despite the method name – also for plugins
addDefaultSizedImageSize()  : mixed
Adds default sized image size for the cachemanger
addDefaultThumbSize()  : mixed
Adds the default theme thumb cache size
albumbutton()  : mixed
cleanupCacheSizes()  : mixed
Removes up all sizes by non existing themes and non active plugins on this install
deleteCacheSizes()  : mixed
Deletes theme cache sizes of the owner
generateImage()  : mixed
Sends a single cURL request to i.php to generate the image size requested if curl is available, otherwise requests the image size directly by printing it.
getOptionsSupported()  : mixed
supported options
getSizes()  : array<string|int, mixed>
Returns an array with the stored sizes to cache
getTitle()  : string
isValid()  : bool
Used to check and skip cachemanager sizes if - their owner (theme or extension) isn't existing or not enabled.
loadAlbum()  : mixed
Processes a single album to cache its images
loadAlbums()  : type
Processes an album and recursively its subalbums
loadImage()  : mixed
Caches sizes for a single image
loadImages()  : int
Processes the images of an album
overviewbutton()  : mixed
printButtons()  : mixed
Prints the buttons after you cached image sizes
printCurlNote()  : mixed
Just prints a note if the PHP extension cURL is not available
printJS()  : mixed
printSizesListEntry()  : mixed
Prints the form elements to select a cache size to process
published()  : mixed
filter for the setShow() methods
recordMissing()  : mixed
Updates an global array variable with missing images
updateCacheName()  : mixed
Updates the path to the cache folder

Properties

$enabledsizes

public static mixed $enabledsizes = array()

$imagesizes_cached

public static mixed $imagesizes_cached = 0

$imagesizes_failed

public static mixed $imagesizes_failed = 0

$imagesizes_total

public static mixed $imagesizes_total = 0

$missingimages

public static mixed $missingimages = \null

Methods

addCacheSize()

Adds a custom image cache size for themes and – despite the method name – also for plugins

public static addCacheSize(string $owner, int $size, int $width, int $height, int $cw, int $ch, int $cx, int $cy, bool $thumb[, bool $watermark = NULL ][, string $effects = NULL ][, bool $maxspace = false ]) : mixed
Parameters
$owner : string

Name of the theme (or plugin) this belongs to

$size : int
$width : int
$height : int
$cw : int

crop width

$ch : int

crop height

$cx : int

crop x

$cy : int

crop y

$thumb : bool
$watermark : bool = NULL
$effects : string = NULL
$maxspace : bool = false

addDefaultSizedImageSize()

Adds default sized image size for the cachemanger

public static addDefaultSizedImageSize() : mixed

addDefaultThumbSize()

Adds the default theme thumb cache size

public static addDefaultThumbSize() : mixed

albumbutton()

public static albumbutton(mixed $html, mixed $object, mixed $prefix) : mixed
Parameters
$html : mixed
$object : mixed
$prefix : mixed

cleanupCacheSizes()

Removes up all sizes by non existing themes and non active plugins on this install

public static cleanupCacheSizes() : mixed

deleteCacheSizes()

Deletes theme cache sizes of the owner

public static deleteCacheSizes(mixed $owner) : mixed
Parameters
$owner : mixed

generateImage()

Sends a single cURL request to i.php to generate the image size requested if curl is available, otherwise requests the image size directly by printing it.

public static generateImage(string $imageuri[, bool $output = true ]) : mixed
Parameters
$imageuri : string

The image processor uri to this image

$output : bool = true

If a list entry with the size generation status should be output. Default true. Set to false to return true|false for success. Note disabling output only works with the cURL mode!

getOptionsSupported()

supported options

public getOptionsSupported() : mixed

getSizes()

Returns an array with the stored sizes to cache

public static getSizes([string $mode = 'all' ]) : array<string|int, mixed>

Note: The default thumb and sized image sizes are not included even if set

Parameters
$mode : string = 'all'

"all" for all sizes stored, "inactive' or "active"

Return values
array<string|int, mixed>

getTitle()

public static getTitle(string $table, string $row) : string
Parameters
$table : string
$row : string
Return values
string

isValid()

Used to check and skip cachemanager sizes if - their owner (theme or extension) isn't existing or not enabled.

public static isValid(string $owner) : bool

Also used to sort our default thumb/default sized image

  • Checks if this is from an existing theme ("admin" sizes are always valid)
  • Checks if this is from an enabeled extension
  • Checks if this is from an installed extension at least
Parameters
$owner : string
Return values
bool

loadAlbum()

Processes a single album to cache its images

public static loadAlbum(mixed $albumobj) : mixed
Parameters
$albumobj : mixed
Tags
global

obj $_zp_gallery

loadAlbums()

Processes an album and recursively its subalbums

public static loadAlbums(type $albumobj) : type
Parameters
$albumobj : type
Return values
type

loadImage()

Caches sizes for a single image

public static loadImage(obj $imageobj[, bool $output = true ]) : mixed
Parameters
$imageobj : obj

Image object

$output : bool = true

If a list entry with the size generation status should be output. Default true. Set to false to return true|false for success. Note disabling output only works with the cURL mode!

Tags
since
1.6.1

loadImages()

Processes the images of an album

public static loadImages(type $albumobj) : int
Parameters
$albumobj : type
Tags
global

obj $_zp_gallery

Return values
int

overviewbutton()

public static overviewbutton(mixed $buttons) : mixed
Parameters
$buttons : mixed

printButtons()

Prints the buttons after you cached image sizes

public static printButtons(string $returnpage[, string $alb = '' ][, bool $hidden = false ]) : mixed
Parameters
$returnpage : string

Pageurl to return to

$alb : string = ''

Name of the album if caching from an album page

$hidden : bool = false

True if the buttons should be hidden via the css class "hidden" initially.

printCurlNote()

Just prints a note if the PHP extension cURL is not available

public static printCurlNote() : mixed

printSizesListEntry()

Prints the form elements to select a cache size to process

public static printSizesListEntry(string $value, string $checked, string $text[, string $class = null ]) : mixed
Parameters
$value : string
$checked : string
$text : string
$class : string = null

published()

filter for the setShow() methods

public static published(object $obj) : mixed
Parameters
$obj : object
Tags
deprecated
2.0

recordMissing()

Updates an global array variable with missing images

public static recordMissing(string $table, string $row, string $image) : mixed
Parameters
$table : string
$row : string
$image : string

updateCacheName()

Updates the path to the cache folder

public static updateCacheName(mixed $text, string $target, string $update) : mixed
Parameters
$text : mixed
$target : string
$update : string

        
On this page

Search results