Class AlfredBundler
The PHP interface for the Alfred Bundler
This class is the only one that you should interact with. The rest of the magic that the bundler performs happens under the hood. Also, the backend of the bundler (here the 'AlfredBundlerInternalClass') may change; however, this bundlet will continue to work with the bundler API for the remainder of this major version (Taurus). Limited documentation is below, for more detailed documentation, see http://shawnrice.github.io/alfred-bundler.
Example usage:
require_once( 'alfred.bundler.php' ); $b = new AlfredBundler; // Downloads and requires David Ferguson's PHP Workflows library $b->library( 'Workflows' ); // Download icons $icon1 = $b->icon( 'elusive', 'dashboard', 'ab332c', TRUE ); $icon2 = $b->icon( 'fontawesome', 'adjust', 'aabbcc', '998877'); $icon3 = $b->icon( 'fontawesome, 'bug' ); $icon4 = $b->icon( 'system', 'Accounts' ); // Send a message to the console (shows up in Alfred's debugger) $b->log( 'Loaded icons', 'INFO', 'console' ); // Log a message to a logfile found in the workflow's data directory $b->log( 'Initial bootstrap complete, check the log file', 'DEBUG', 'log' ); // Send the same message to the console and the log file $b->log( 'Bootstrap completed.', 'INFO', 'both' ); // Get Pashua to use later $pashua = $b->utility( 'Pashua' ); // Get an asset not included in the "defaults" $myAsset = $b->load( 'utility', 'myAsset', 'latest', '/path/to/json' ); // Load 'cocoadialog' with the bundler's wrappers $cocoadialog = $b->wrapper( 'cocoadialog' ); // Load/install composer packages $bundler->composer( array( "monolog/monolog" => "1.10.*@dev" ));
Package: AlfredBundler
Copyright: The Alfred Bundler Team 2014
License: MIT
Since: Class available since Taurus 1
See:
Located at alfred.bundler.php
Copyright: The Alfred Bundler Team 2014
License: MIT
Since: Class available since Taurus 1
See:
AlfredBundlerInternalClass
Located at alfred.bundler.php
public
boolean
|
|
public
mixed
|
|
public
mixed
&
|
protected
object
|
$bundler |
|
#
An internal object that interfaces with the PHP Bundler API |