helpers\BaseFormatConverter convertDateIcuToPhp()

convertDateIcuToPhp() public static method Converts a date format pattern from [ICU format][] to [php date() function format][]. The conversion is limited to date patterns that do not use escaped characters. Patterns like d 'of' MMMM yyyy which will result in a date like 1 of December 2014 may not be converted correctly because of the use of escaped characters. Pattern constructs that are not supported by the PHP format will be removed. public static string convertDateIcuToPhp ( $pattern,

helpers\BaseFormatConverter convertDateIcuToJui()

convertDateIcuToJui() public static method Converts a date format pattern from [ICU format][] to [jQuery UI date format][]. Pattern constructs that are not supported by the jQuery UI format will be removed. public static string convertDateIcuToJui ( $pattern, $type = 'date', $locale = null )$pattern string Date format pattern in ICU format. $type string 'date', 'time', or 'datetime'. $locale string The locale to use for converting ICU short patterns short, medium, long and full. If n

helpers\BaseFormatConverter $phpFallbackDatePatterns

$phpFallbackDatePatterns public static property The php fallback definition to use for the ICU short patterns short, medium, long and full. This is used as fallback when the intl extension is not installed. public static array $phpFallbackDatePatterns = ['short' => ['date' => 'n/j/y', 'time' => 'H:i', 'datetime' => 'n/j/y H:i'], 'medium' => ['date' => 'M j, Y', 'time' => 'g:i:s A', 'datetime' => 'M j, Y g:i:s A'], 'long' => ['date' => 'F j, Y', 'time' => 'g

helpers\BaseFormatConverter $juiFallbackDatePatterns

$juiFallbackDatePatterns public static property The jQuery UI fallback definition to use for the ICU short patterns short, medium, long and full. This is used as fallback when the intl extension is not installed. public static array $juiFallbackDatePatterns = ['short' => ['date' => 'd/m/y', 'time' => '', 'datetime' => 'd/m/y'], 'medium' => ['date' => 'M d, yy', 'time' => '', 'datetime' => 'M d, yy'], 'long' => ['date' => 'MM d, yy', 'time' => '', 'datetime'

helpers\BaseFileHelper removeDirectory()

removeDirectory() public static method Removes a directory (and all its content) recursively. public static void removeDirectory ( $dir, $options = [] )$dir string The directory to be deleted recursively. $options array Options for directory remove. Valid options are: traverseSymlinks: boolean, whether symlinks to the directories should be traversed too. Defaults to false, meaning the content of the symlinked directory would not be deleted. Only symlink would be removed in that default

helpers\BaseFileHelper normalizePath()

normalizePath() public static method Normalizes a file/directory path. The normalization does the following work: Convert all directory separators into DIRECTORY_SEPARATOR (e.g. "\a/b\c" becomes "/a/b/c") Remove trailing directory separators (e.g. "/a/b/c/" becomes "/a/b/c") Turn multiple consecutive slashes into a single one (e.g. "/a///b/c" becomes "/a/b/c") Remove ".." and "." based on their meanings (e.g. "/a/./b/../c" becomes "/a/c") public static string normalizePath ( $path, $ds =

helpers\BaseFileHelper localize()

localize() public static method Returns the localized version of a specified file. The searching is based on the specified language code. In particular, a file with the same name will be looked for under the subdirectory whose name is the same as the language code. For example, given the file "path/to/view.php" and language code "zh-CN", the localized file will be looked for as "path/to/zh-CN/view.php". If the file is not found, it will try a fallback with just a language code that is "zh"

helpers\BaseFileHelper loadMimeTypes()

loadMimeTypes() protected static method Loads MIME types from the specified file. protected static array loadMimeTypes ( $magicFile )$magicFile string The path (or alias) of the file that contains all available MIME type information. If this is not set, the file specified by $mimeMagicFile will be used. return array The mapping from file extensions to MIME types

helpers\BaseFileHelper getMimeTypeByExtension()

getMimeTypeByExtension() public static method Determines the MIME type based on the extension name of the specified file. This method will use a local map between extension names and MIME types. public static string getMimeTypeByExtension ( $file, $magicFile = null )$file string The file name. $magicFile string The path (or alias) of the file that contains all available MIME type information. If this is not set, the file specified by $mimeMagicFile will be used. return string The MIM

helpers\BaseFileHelper getMimeType()

getMimeType() public static method Determines the MIME type of the specified file. This method will first try to determine the MIME type based on finfo_open. If the fileinfo extension is not installed, it will fall back to getMimeTypeByExtension() when $checkExtension is true. public static string getMimeType ( $file, $magicFile = null, $checkExtension = true )$file string The file name. $magicFile string Name of the optional magic database file (or alias), usually something like /path