Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

Constants

Josh edited this page Apr 21, 2018 · 2 revisions

To improve performance at scale, data like templates, lists, settings, etc., are hardcoded as public constants under this class. These properties can be accessed independently if desired, but for the most part are intended for internal use by the various blob-common functions.

This page lists constants which might prove useful in your own applications.

Use:
\blobfolio\common\constants

Geography

The following geographical constants exist.

COUNTRIES

An array containing the ISO code, name, region, and currency of most world countries.

array(
    'US'=>array(
        'name'=>'USA',
        'region'=>'North America',
        'currency'=>'USD'
    ),
    'CA'=>array(
        'name'=>'Canada',
        'region'=>'North America',
        'currency'=>'CAD'
    ),
    ...
);

PROVINCES

An array of Canadian provinces and territories.

array(
    'AB'=>'Alberta',
    'BC'=>'British Columbia',
    ...
);

REGIONS

An array of populated/claimed continents (apologies to Antarctica).

array(
    'Africa',
    'Asia',
    'Australia',
    'Europe',
    'North America',
    'South America'
);

STATES

An array of US states and territories (e.g. Guam, Puerto Rico, etc.).

array(
    'AL'=>'Alabama',
    'AK'=>'Alaska',
    ...
);

STATES_AU

An array of Australian states and territories.

array(
    'NSW'=>'New South Wales',
    'QLD'=>'Queensland',
    ...
);

Other

Beyond spacetime, the following constants might prove useful.

BLANK_IMAGE

A Data-URI corresponding to a 1x1 pixel transparent GIF, which could, e.g., be shoved into an src attribute for a lazy-loaded image.

MIME_DEFAULT

Most applications will return this value ("application/octet-stream") whenever a specific file type cannot be deduced.

CLI

Constants

Dom Helpers

Files and Paths

Formatting

General Data Helpers

Images

Multi-Byte Wrappers

Sanitizing and Validation

Typecasting

Clone this wiki locally