helpers\BaseFileHelper getExtensionsByMimeType()

getExtensionsByMimeType() public static method Determines the extensions by given MIME type. This method will use a local map between extension names and MIME types. public static array getExtensionsByMimeType ( $mimeType, $magicFile = null )$mimeType string File MIME type. $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 extensions corresponding

helpers\BaseFileHelper findFiles()

findFiles() public static method Returns the files found under the specified directory and subdirectories. public static array findFiles ( $dir, $options = [] )$dir string The directory under which the files will be looked for. $options array Options for file searching. Valid options are: filter: callback, a PHP callback that is called for each directory or file. The signature of the callback should be: function ($path), where $path refers the full path to be filtered. The callback ca

helpers\BaseFileHelper filterPath()

filterPath() public static method Checks if the given file path satisfies the filtering options. public static boolean filterPath ( $path, $options )$path string The path of the file or directory to be checked $options array The filtering options. See findFiles() for explanations of the supported options. return boolean Whether the file or directory satisfies the filtering options.

helpers\BaseFileHelper createDirectory()

createDirectory() public static method Creates a new directory. This method is similar to the PHP mkdir() function except that it uses chmod() to set the permission of the created directory in order to avoid the impact of the umask setting. public static boolean createDirectory ( $path, $mode = 509, $recursive = true )$path string Path of the directory to be created. $mode integer The permission to be set for the created directory. $recursive boolean Whether to create parent director

helpers\BaseFileHelper copyDirectory()

copyDirectory() public static method Copies a whole directory as another one. The files and sub-directories will also be copied over. public static void copyDirectory ( $src, $dst, $options = [] )$src string The source directory $dst string The destination directory $options array Options for directory copy. Valid options are: dirMode: integer, the permission to be set for newly copied directories. Defaults to 0775. fileMode: integer, the permission to be set for newly copied files.

helpers\BaseFileHelper $mimeMagicFile

$mimeMagicFile public static property The path (or alias) of a PHP file containing MIME type information. public static string $mimeMagicFile = '@yii/helpers/mimeTypes.php'

helpers\BaseConsole xtermFgColor()

xtermFgColor() public static method Returns the ansi format code for xterm foreground color. You can pass the return value of this to one of the formatting methods: ansiFormat(), ansiFormatCode(), beginAnsiFormat() See also http://en.wikipedia.org/wiki/Talk:ANSI_escape_code#xterm-256colors. public static string xtermFgColor ( $colorCode )$colorCode integer Xterm color code

helpers\BaseConsole xtermBgColor()

xtermBgColor() public static method Returns the ansi format code for xterm background color. You can pass the return value of this to one of the formatting methods: ansiFormat(), ansiFormatCode(), beginAnsiFormat() See also http://en.wikipedia.org/wiki/Talk:ANSI_escape_code#xterm-256colors. public static string xtermBgColor ( $colorCode )$colorCode integer Xterm color code

helpers\BaseConsole wrapText()

wrapText() public static method (available since version 2.0.4) Word wrap text with indentation to fit the screen size If screen size could not be detected, or the indentation is greater than the screen size, the text will not be wrapped. The first line will not be indented, so Console::wrapText("Lorem ipsum dolor sit amet.", 4) will result in the following output, given the screen width is 16 characters: Lorem ipsum dolor sit amet. public static string wrapText ( $text, $indent

helpers\BaseConsole updateProgress()

updateProgress() public static method Updates a progress bar that has been started by startProgress(). See also: startProgress() endProgress() public static void updateProgress ( $done, $total, $prefix = null )$done integer The number of items that are completed. $total integer The total value of items that are to be done. $prefix string An optional string to display before the progress bar. Defaults to null meaning the prefix specified by startProgress() will be used. If prefix is s