class Option

Constants

protected DEFAULT_DRIVER

protected DEFAULT_SCAN_INTERVAL

Methods

__construct(string $driver = self::DEFAULT_DRIVER, array $watchPaths = [], int $scanInterval = self::DEFAULT_SCAN_INTERVAL)

No description

static Option
fromConfig(array $config, string $basePath, array $extraPaths = [])

Create an Option from a watcher config array.

static string
normalizeEntry(string $entry)

Normalize a watch config entry.

static WatchPath
parseEntry(string $entry, string $basePath)

Parse a single watch config entry into a WatchPath.

static WatchPath
parseGlob(string $glob)

Parse a glob pattern into a WatchPath with base directory and pattern.

array
getWatchPaths()

Get all watch paths.

array
getDirectoryPaths()

Get watch paths that are directories.

array
getFilePaths()

Get watch paths that are individual files.

string
getDriver()

Get the watcher driver class name.

int
getScanInterval()

Get the scan interval in milliseconds.

float
getScanIntervalSeconds()

Get the scan interval in seconds.

Details

at line 19
__construct(string $driver = self::DEFAULT_DRIVER, array $watchPaths = [], int $scanInterval = self::DEFAULT_SCAN_INTERVAL)

No description

Parameters

string $driver
array $watchPaths
int $scanInterval

at line 35
static Option fromConfig(array $config, string $basePath, array $extraPaths = [])

Create an Option from a watcher config array.

Parameters

array $config
string $basePath

Absolute base path for directory detection (typically base_path())

array $extraPaths

Additional watch paths from CLI flags

Return Value

Option

at line 63
static protected string normalizeEntry(string $entry)

Normalize a watch config entry.

Parameters

string $entry

Return Value

string

at line 86
static protected WatchPath parseEntry(string $entry, string $basePath)

Parse a single watch config entry into a WatchPath.

Parameters

string $entry
string $basePath

Return Value

WatchPath

at line 102
static protected WatchPath parseGlob(string $glob)

Parse a glob pattern into a WatchPath with base directory and pattern.

Parameters

string $glob

Return Value

WatchPath

at line 122
array getWatchPaths()

Get all watch paths.

Return Value

array

at line 132
array getDirectoryPaths()

Get watch paths that are directories.

Return Value

array

at line 145
array getFilePaths()

Get watch paths that are individual files.

Return Value

array

at line 156
string getDriver()

Get the watcher driver class name.

Return Value

string

at line 164
int getScanInterval()

Get the scan interval in milliseconds.

Return Value

int

at line 172
float getScanIntervalSeconds()

Get the scan interval in seconds.

Return Value

float