Core methods and constants


Description


The core methods of the Mako framework are located in the Mako class.

Methods


locale([mixed $locale = null [, boolean $numeric = false]])


The locale method will set the locale information for your application. The default locale of your application can be set in the mako configuration.

LC_NUMERIC will not be set unless you set $numeric to TRUE.

// Will try to set the locale to 'en_GB.UTF-8'

Mako::locale('en_GB.UTF-8');

// Each array element is tried to be set as new locale until success

Mako::locale(array('en_GB.UTF-8', 'en_GB.utf8', 'C'));

Constants


Name Description
MAKO_CHARSET Default charset used internally in the framework.
MAKO_LIBRARIES_PATH Defines the path to the libraries directory (without trailing slash).
MAKO_APPLICATION_PATH Defines the path to the parent directory of the app directory (without trailing slash).
MAKO_APPLICATION_NAME Define the name of your application. The name must match the name of the app directory.
MAKO_START Starting point of the framework execution in ms.
MAKO_MAGIC_QUOTES Holds the return value of get_magic_quotes_gpc.
MAKO_IS_WINDOWS Is set to TRUE if Mako runs on a Windows system and FALSE if not.
MAKO_APPLICATION Path to the application directory.
MAKO_APPLICATION_ID MD5 hash of the application path.
MAKO_PACKAGES Path to the packages directory.
MAKO_XHTML If this constant is defined then the HTML helper will return XHTML compatible tags.