Created
August 24, 2011 20:52
-
-
Save zeelot/1169194 to your computer and use it in GitHub Desktop.
Possible minion options definition
This file contains hidden or 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) | |
'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