ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ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; } } ?>