Class TerminalNotifier
Main class used for interaction with Terminal Notifier.
Public class used to initialize the Terminal Notifier interaction client.
Client inintialization is built by:
$client = new TerminalNotifier('path to terminal-notifier.app or exec',
$debug=bool)
Initializes valid and required options.
Methods summary
public
|
#
log( string $level, string $funct, integer $lineno, string $message )
This function prints debug logs to the console.
This function prints debug logs to the console.
Parameters
- $level
string $level Logging level (adapted from Python's logging module)
- $funct
string $funct Calling function's name
- $lineno
integer $lineno Calling functions line number
- $message
string $message Desired message
|
public
|
#
__construct( string $notifier, boolean $debug = False )
TerminalNotifier class constructor.
TerminalNotifier class constructor.
Parameters
- $notifier
string $notifier Path to either terminal-notifier.app or exec
- $debug
boolean $debug True if logging is enabled
|
public
string
|
#
_run_subprocess( string $process )
Run a process on the host system.
Run a process on the host system.
Parameters
- $process
string $process Process to be run
Returns
string Output of process
|
public
|
#
_valid_options( array $passed )
Validate and clean up passed notification options.
Validate and clean up passed notification options.
Parameters
- $passed
array $passed Associative array of passed dialog arguemnts
|
public
|
#
_display( array $passed )
Display the passed notification after some crutial formatting.
Display the passed notification after some crutial formatting.
Parameters
- $passed
array $passed Associative array of passed dialog options
|
public
|
#
notify( array $_passed )
Spawn a notification with passed arguments
Spawn a notification with passed arguments
Parameters
- $_passed
array $_passed Associative array of notification arguments
|