PHP Класс App\Libraries\WatchRecord\WatchRecord

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$events array Array of the occurred events.
$input string For example, an inotifywatch record should have an input similar to "DELETE /var/www/media/song.mp3".
$path string Full path of the file/directory on which the event occurred.

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

Метод Описание
__construct ( $input ) WatchRecord constructor.
__toString ( )
getPath ( ) : string
isDirectory ( ) : boolean Determine if the object is a directory.
isFile ( ) : boolean Determine if the object is a file.

Защищенные методы

Метод Описание
eventExists ( $event ) : boolean Check if a given event name exists in the event array.

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

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

WatchRecord constructor.
public __construct ( $input )
$input string The output from a watcher command (which is an input for our script)

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

public __toString ( )

eventExists() защищенный Метод

Check if a given event name exists in the event array.
protected eventExists ( $event ) : boolean
$event string
Результат boolean

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

public getPath ( ) : string
Результат string

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

Determine if the object is a directory.
public isDirectory ( ) : boolean
Результат boolean

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

Determine if the object is a file.
public isFile ( ) : boolean
Результат boolean

Описание свойств

$events защищенное свойство

Array of the occurred events.
protected array $events
Результат array

$input защищенное свойство

For example, an inotifywatch record should have an input similar to "DELETE /var/www/media/song.mp3".
protected string $input
Результат string

$path защищенное свойство

Full path of the file/directory on which the event occurred.
protected string $path
Результат string