PHP Класс HM\BackUpWordPress\Excludes

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $excludes = [] )
get_default_excludes ( ) : array Get the array of default excludes.
get_excludes ( ) : array Get the excludes.
get_excludes_for_regex ( ) : array Get the excludes prepared for use with regex.
get_user_excludes ( ) : array Get the user defined excludes.
is_file_excluded ( SplFileInfo $file ) : boolean | null Check if a file is excluded, i.e. excluded directly or is in an excluded folder.
normalize ( array $excludes ) : array Normalise the exclude rules so they are ready to work with.
set_excludes ( string | array $excludes ) Set the exclude rules.

Описание методов

__construct() публичный Метод

public __construct ( $excludes = [] )

get_default_excludes() публичный Метод

Get the array of default excludes.
public get_default_excludes ( ) : array
Результат array The array of excludes.

get_excludes() публичный Метод

Returns any user set excludes as well as the default list.
public get_excludes ( ) : array
Результат array The array of exclude rules.

get_excludes_for_regex() публичный Метод

The primary difference being that any wildcard (*) rules are converted to the regex fragment [\s\S]*?.
public get_excludes_for_regex ( ) : array
Результат array The array of exclude rules.

get_user_excludes() публичный Метод

Get the user defined excludes.
public get_user_excludes ( ) : array
Результат array The array of excludes.

is_file_excluded() публичный Метод

Check if a file is excluded, i.e. excluded directly or is in an excluded folder.
public is_file_excluded ( SplFileInfo $file ) : boolean | null
$file SplFileInfo File to check if it's excluded.
Результат boolean | null True if file is excluded, false otherwise. Null - if it's not a file.

normalize() публичный Метод

Normalise the exclude rules so they are ready to work with.
public normalize ( array $excludes ) : array
$excludes array The array of exclude rules to normalise.
Результат array The array of normalised rules.

set_excludes() публичный Метод

Excludes rules should be a complete or partial directory or file path. Wildcards can be specified with the * character.
public set_excludes ( string | array $excludes )
$excludes string | array The list of exclude rules, accepts either a comma separated list or an array.