PHP Class App\Libraries\WatchRecord\WatchRecord

Afficher le fichier Open project: phanan/koel

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
eventExists ( $event ) : boolean Check if a given event name exists in the event array.

Method Details

__construct() public méthode

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

__toString() public méthode

public __toString ( )

eventExists() protected méthode

Check if a given event name exists in the event array.
protected eventExists ( $event ) : boolean
$event string
Résultat boolean

getPath() public méthode

public getPath ( ) : string
Résultat string

isDirectory() public méthode

Determine if the object is a directory.
public isDirectory ( ) : boolean
Résultat boolean

isFile() public méthode

Determine if the object is a file.
public isFile ( ) : boolean
Résultat boolean

Property Details

$events protected_oe property

Array of the occurred events.
protected array $events
Résultat array

$input protected_oe property

For example, an inotifywatch record should have an input similar to "DELETE /var/www/media/song.mp3".
protected string $input
Résultat string

$path protected_oe property

Full path of the file/directory on which the event occurred.
protected string $path
Résultat string