Methods summary
public
boolean
|
#
__construct( string $options = [] )
The class constructor
Sets necessary variables.
Parameters
- $options
string $options a list of options to configure the instance
Returns
boolean Return 'true' regardless
|
public
mixed
|
#
load( string $type, string $name, string $version, string $json = '' )
Load an asset using a generic function
Load an asset using a generic function
Parameters
- $type
string $type Type of asset
- $name
string $name Name of asset
- $version
string $version Version of asset to load
- $json
string $json = '' Path to json file
Returns
mixed Returns path to utility on success, FALSE on failure
Since
Taurus 1
|
public
|
#
icon( mixed $font, mixed $name, mixed $color = '000000', mixed $alter = FALSE )
|
public
mixed
|
#
utility( string $name, string $version = 'latest', string $json = '' )
Loads a utility
Parameters
- $name
string $name Name of utility
- $version
string $version = 'latest' Version of utility
- $json
string $json = '' File path to json
Returns
mixed Path to utility on success, FALSE on failure
Since
Taurus 1
|
public
boolean
|
#
library( string $name, string $version = 'latest', string $json = '' )
Loads / requires a library
Loads / requires a library
Parameters
- $name
string $name Name of library
- $version
string $version = 'latest' Version of library
- $json
string $json = '' File path to json
Returns
boolean TRUE on success, FALSE on failure
Since
Taurus 1
|
public
object
|
#
wrapper( string $wrapper, boolean $debug = FALSE )
Loads a wrapper object
Parameters
- $wrapper
string $wrapper name of wrapper to load
- $debug
boolean $debug turn debugging off / on
Returns
object a wrapper object
|
public
boolean
|
#
composer( array $packages )
Loads / requires composer packages
Loads / requires composer packages
Parameters
- $packages
array $packages An array of packages to load in composer
Returns
boolean True on success, false on failure
|
public
string
|
#
icns( )
Creates an icns file out of the workflow's 'icon.png' file
Creates an icns file out of the workflow's 'icon.png' file
Returns
string Path to generated icns file
|
public
boolean
|
#
installAsset( string $json, string $version = 'latest' )
Installs an asset based on JSON information
Installs an asset based on JSON information
Parameters
- $json
string $json File path to json
- $version
string $version = 'latest' Version of asset to install
Returns
boolean TRUE on success, FALSE on failure
|
public
string
|
#
bundle( )
Returns bundle id of workflow using bundler
Returns bundle id of workflow using bundler
Returns
string Bundle id
|
public
boolean
|
#
download( string $url, string $file, integer $timeout = '5' )
Wraps a cURL function to download files
Wraps a cURL function to download files
Parameters
- $url
string $url A URL to the file
- $file
string $file The destination file
- $timeout
integer $timeout = '3' A timeout variable (in seconds)
Returns
boolean True on success and error code / false on failure
Since
Taurus 1
|
public
|
#
log( string $message, mixed $level = 'INFO', string $destination = '' )
Log function for the user to employ
Log function for the user to employ
Parameters
- $message
string $message message to log
- $level
mixed $level='INFO' level of the log message
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
|
public
|
#
debug( string $message, string $destination = '' )
Wraps around 'log' to level 'DEBUG'
Wraps around 'log' to level 'DEBUG'
Parameters
- $message
string $message message to log
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
info( string $message, string $destination = '' )
Wraps around 'log' to level 'INFO'
Wraps around 'log' to level 'INFO'
Parameters
- $message
string $message message to log
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
warning( string $message, string $destination = '' )
Wraps around 'log' to level 'WARNING'
Wraps around 'log' to level 'WARNING'
Parameters
- $message
string $message message to log
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
error( string $message, string $destination = '' )
Wraps around 'log' to level 'ERROR'
Wraps around 'log' to level 'ERROR'
Parameters
- $message
string $message message to log
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
critical( string $message, string $destination = '' )
Wraps around 'log' to level 'CRITICAL'
Wraps around 'log' to level 'CRITICAL'
Parameters
- $message
string $message message to log
- $destination
string $destination='' destination ( file, console, both ) an empty argument will use
the default destination set at instantiation
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
console( string $message, mixed $level = 'INFO' )
Wraps around 'log' to send to 'console'
Wraps around 'log' to send to 'console'
Parameters
- $message
string $message message to log
- $level
mixed $level level of log
Since
Taurus 1
See
AlfredBundlerLogger:log
AlfredBundlerInternalClass:log
|
public
|
#
rrmdir( string $path )
Recursively removes a folder along with all its files and directories
Recursively removes a folder along with all its files and directories
Parameters
- $path
string $path Path to directory to remove
Since
Taurus 1
Link
|
public
mixed
|
#
gatekeeper( string $name, string $path, string $message = '', string $icon = '' )
Queries Gatekeeper to whitelist apps
Queries Gatekeeper to whitelist apps
Invokes the Gatekeeper script if the path has not already been called. The
call, if successful, is cached. If the cache file is present, then return the
path from there instead of calling the cache again.
Parameters
- $name
string $name The name of the utility
- $path
string $path The fullpath to the utility
- $message
string $message The "permissions" message from the JSON
- $icon
string $icon The workflow icon file (if exists)
Returns
mixed FALSE on failure, path to utility on success
Since
Taurus 1
|
public
boolean
|
#
register( string $asset, string $version )
Registers an asset
The Bundler keeps a registry of which workflows use which assets.
Parameters
- $asset
string $asset Name of the asset to be registered
- $version
string $version Version of asset to use
Returns
boolean Returns TRUE on success, FALSE on failure
Since
Taurus 1
|
public
boolean
|
#
notify( string $title, string $message, string $icon = null )
Uses CocoaDialog to display a notification
Uses CocoaDialog to display a notification
Parameters
- $title
string $title Title for notification
- $message
string $message Message of notification
- $icon
string $icon = null An array of options that Terminal Notifer takes
Returns
boolean TRUE on success, FALSE on failure
|