Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
registerOption( new ezcConsoleOption( 'h', 'help' ) );
// Register complex parameter -f/--file
$file = new ezcConsoleOption(
'f',
'file',
ezcConsoleInput::TYPE_STRING,
null,
false,
'Process a file.',
'Processes a single file.'
);
$optionHandler->registerOption( $file );
// Manipulate parameter -f/--file after registration
$file->multiple = true;
// Register another complex parameter that depends on -f and excludes -h
$dir = new ezcConsoleOption(
'd',
'dir',
ezcConsoleInput::TYPE_STRING,
null,
true,
'Process a directory.',
'Processes a complete directory.',
array( new ezcConsoleOptionRule( $optionHandler->getOption( 'f' ) ) ),
array( new ezcConsoleOptionRule( $optionHandler->getOption( 'h' ) ) )
);
$optionHandler->registerOption( $dir );
// Register an alias for this parameter
$optionHandler->registerAlias( 'e', 'extended-dir', $dir );
// Process registered parameters and handle errors
try
{
$optionHandler->process( array( 'example_input.php', '-h' ) );
}
catch ( ezcConsoleOptionException $e )
{
echo $e->getMessage();
exit( 1 );
}
// Process a single parameter
$file = $optionHandler->getOption( 'f' );
if ( $file->value === false )
{
echo "Parameter -{$file->short}/--{$file->long} was not submitted.\n";
}
elseif ( $file->value === true )
{
echo "Parameter -{$file->short}/--{$file->long} was submitted without value.\n";
}
else
{
echo "Parameter -{$file->short}/--{$file->long} was submitted with value <".var_export($file->value, true).">.\n";
}
// Process all parameters at once:
foreach ( $optionHandler->getOptionValues() as $paramShort => $val )
{
switch ( true )
{
case $val === false:
echo "Parameter $paramShort was not submitted.\n";
break;
case $val === true:
echo "Parameter $paramShort was submitted without a value.\n";
break;
case is_array( $val ):
echo "Parameter $paramShort was submitted multiple times with value: <".implode(', ', $val).">.\n";
break;
default:
echo "Parameter $paramShort was submitted with value: <$val>.\n";
break;
}
}
?>