PHP 클래스 HM\BackUpWordPress\Excludes

파일 보기 프로젝트 열기: humanmade/backupwordpress 1 사용 예제들

공개 메소드들

메소드 설명
__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.