Skip to content

Instantly share code, notes, and snippets.

@kiall
Forked from zeelot/example.php
Created August 24, 2011 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiall/1169229 to your computer and use it in GitHub Desktop.
Save kiall/1169229 to your computer and use it in GitHub Desktop.
Possible minion options definition
<?php
// 1 Property
class Minion_Task_Example extends Minion_Task {
protected $_options = array(
'force' => array(
'default' => NULL,
// Defaults to --{{key}} (--force in this case)
'alternate_names' => array('-f'),
),
);
}
// Multiple Properties
class Minion_Task_Example extends Minion_Task {
protected $_options = array(
'force' => NULL,
);
protected $_option_names = array(
'force' => array('--force', '-f'), // Still defaults to array('--force')
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment