Constants
in package
A bunch of different constants
Table of Contents
Constants
- CATEGORIES_ALL : mixed = 3
- CATEGORIES_ARCHIVE : mixed = 2
- CATEGORIES_CURRENT : mixed = 1
- The different category options in the admin
- EXTRAPAGES_404 : mixed = 1
- Extra pages *
- EXTRAPAGES_ADMIN_LOGIN : mixed = 2
- LOCK_AGE : mixed = 120
- Maximum age of locks (seconds)
- PASSWORD_BCRYPT12 : mixed = 3
- PASSWORD_PLAIN : mixed = 4
- PASSWORD_SHA : mixed = 1
- PASSWORD_SHA_SALT : mixed = 2
- Password algorithms
- PASSWORD_SHA_SALT_5000 : mixed = 5
- PERM_INHERIT : mixed = 1
- Permission types
- PERM_SPECIFIC : mixed = 2
Properties
- $category_admin_options : mixed
- $category_admin_where : mixed
- $conflict_page_urls : mixed
- If the first segment of a URL cannot be used because it conflicts with a controller name A similar problem exists for top-level directories
- $job_status : mixed
- Cron and workers - job status
- $mimetypes : mixed
- This is a list of common extensions and mimetypes
- $month_names : mixed
- List of month names
- $recent_dates : mixed
- For the admin 'last modified' refine field
- $relative_dates : mixed
- Relative dates
- $rev_statuses : mixed
- Labels for the page revision statuses
- $search_modifiers : mixed
- Relative dates
Methods
- reverseLookup() : string|null
- Looks for a class constant which has a specific value.
Constants
CATEGORIES_ALL
public
mixed
CATEGORIES_ALL
= 3
CATEGORIES_ARCHIVE
public
mixed
CATEGORIES_ARCHIVE
= 2
CATEGORIES_CURRENT
The different category options in the admin
public
mixed
CATEGORIES_CURRENT
= 1
EXTRAPAGES_404
Extra pages *
public
mixed
EXTRAPAGES_404
= 1
EXTRAPAGES_ADMIN_LOGIN
public
mixed
EXTRAPAGES_ADMIN_LOGIN
= 2
LOCK_AGE
Maximum age of locks (seconds)
public
mixed
LOCK_AGE
= 120
PASSWORD_BCRYPT12
public
mixed
PASSWORD_BCRYPT12
= 3
PASSWORD_PLAIN
public
mixed
PASSWORD_PLAIN
= 4
PASSWORD_SHA
public
mixed
PASSWORD_SHA
= 1
PASSWORD_SHA_SALT
Password algorithms
public
mixed
PASSWORD_SHA_SALT
= 2
PASSWORD_SHA_SALT_5000
public
mixed
PASSWORD_SHA_SALT_5000
= 5
PERM_INHERIT
Permission types
public
mixed
PERM_INHERIT
= 1
PERM_SPECIFIC
public
mixed
PERM_SPECIFIC
= 2
Properties
$category_admin_options
public
static mixed
$category_admin_options
= array(self::CATEGORIES_CURRENT => 'Live', self::CATEGORIES_ARCHIVE => 'Archived', self::CATEGORIES_ALL => 'All')
$category_admin_where
public
static mixed
$category_admin_where
= array(self::CATEGORIES_CURRENT => 'categories.show_admin = 1', self::CATEGORIES_ARCHIVE => 'categories.show_admin = 0', self::CATEGORIES_ALL => '1')
$conflict_page_urls
If the first segment of a URL cannot be used because it conflicts with a controller name A similar problem exists for top-level directories
public
static mixed
$conflict_page_urls
= array('ad', 'admin', 'article', 'action_log', 'advanced_search', 'cart', 'config', 'content_block', 'captcha', 'category', 'content_subscribe', 'cron_job', 'dbtools', 'document_search', 'event', 'extra_page', 'ext_video', 'email_share', 'file', 'files', 'form', 'forum', 'galleryfile', 'gallery', 'home_page', 'job_advert', 'job_application', 'list', 'link', 'man', 'managed', 'media', 'modules', 'mailchimp', 'newsletter', 'operator', 'order', 'page', 'page_feedback', 'payment', 'paypal', 'project', 'product', 'pg', 'redirect', 'recurring_payment', 'search', 'skin', 'sprout', 'subsite', 'subscriber', 'secfile', 'sponsor', 'scss', 'testing', 'tools', 'tree', 'tinymce', 'user', 'worker_job')
$job_status
Cron and workers - job status
public
static mixed
$job_status
= array(0 => 'Incomplete', 1 => 'Complete', -1 => 'Failed')
$mimetypes
This is a list of common extensions and mimetypes
public
static mixed
$mimetypes
= array('aac' => 'audio/aac', 'avi' => 'video/vnd.avi', 'bmp' => 'image/bmp', 'csv' => 'text/csv', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'flv' => 'video/x-flv', 'gif' => 'image/gif', 'jpeg' => 'image/jpeg', 'jpe' => 'image/jpeg', 'jpg' => 'image/jpeg', 'mov' => 'video/quicktime', 'mp3' => 'audio/mpeg', 'mp4' => 'application/mp4', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odt' => 'application/vnd.oasis.opendocument.text', 'oga' => 'audio/ogg', 'ogv' => 'video/ogg', 'pdf' => 'application/pdf', 'png' => 'image/png', 'pps' => 'application/vnd.ms-powerpoint', 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppt' => 'application/powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'rtf' => 'text/rtf', 'tiff' => 'image/tiff', 'tif' => 'image/tiff', 'txt' => 'text/plain', 'webp' => 'image/webp', 'webm' => 'video/webm', 'wmv' => 'application/vnd.ms-asf', 'xls' => 'application/excel', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'zip' => 'application/zip')
$month_names
List of month names
public
static mixed
$month_names
= array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December')
$recent_dates
For the admin 'last modified' refine field
public
static mixed
$recent_dates
= array('1 DAY' => 'Last 24 hours', '1 WEEK' => 'Last 7 days', '1 MONTH' => 'Last 30 days', '3 MONTH' => 'Last 3 months', '1 YEAR' => 'Last 12 months', 'YESTERDAY' => 'Yesterday', 'THIS_WEEK' => 'This week', 'THIS_MONTH' => 'This month', 'THIS_YEAR' => 'This year', 'WEEK_TO_DATE' => 'Week to date', 'MONTH_TO_DATE' => 'Month to date', 'YEAR_TO_DATE' => 'Year to date')
$relative_dates
Relative dates
public
static mixed
$relative_dates
= array('n1' => 'Newer than 1 month', 'n3' => 'Newer than 3 months', 'n12' => 'Newer than 12 months', 'o12' => 'Older than 12 months')
$rev_statuses
Labels for the page revision statuses
public
static mixed
$rev_statuses
= ['old' => 'Old', 'wip' => 'Work in progress', 'need_approval' => 'Needs approval', 'live' => 'Live', 'rejected' => 'Rejected', 'auto_launch' => 'Ready for autolaunch']
$search_modifiers
Relative dates
public
static mixed
$search_modifiers
= array('or' => 'Match any', 'and' => 'Match all')
Methods
reverseLookup()
Looks for a class constant which has a specific value.
public
static reverseLookup(string $class, string $prefix, string $value) : string|null
Parameters
- $class : string
-
The class to look for constants in.
- $prefix : string
-
The prefix to require a constant to have.
- $value : string
-
The value to require a constant to have.
Return values
string|null —The name of the constant, or null if no matching constant was found.