Skip to content

Instantly share code, notes, and snippets.

@zeelot
Created August 24, 2011 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zeelot/1169194 to your computer and use it in GitHub Desktop.
Save zeelot/1169194 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)
'names' => array('--force', '-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