-
-
Save kiall/1169229 to your computer and use it in GitHub Desktop.
Possible minion options definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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