Skip to content

Instantly share code, notes, and snippets.

@Ridzhi
Last active June 7, 2016 21:07
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 Ridzhi/27c96cffd5c3237f30b4cd6e350416eb to your computer and use it in GitHub Desktop.
Save Ridzhi/27c96cffd5c3237f30b4cd6e350416eb to your computer and use it in GitHub Desktop.
<?php
class NetworkController extends Controller
{
public $verbose;
public function options()
{
return [
'verbose'
];
}
public function getActionOptionsHelp($action)
{
$help = [
'verbose' => [
'type' => 'string',
'default' => '',
'comment' => 'some description'
]
];
switch ($action->id) {
case 'connect':
$help['verbose']['default'] = 'yes';
break;
case 'close':
$help['verbose']['default'] = 'no';
break;
default:
$help['verbose']['default'] = 'no';
}
return $help;
}
public function actionConnect()
{
}
public function actionClose()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment