use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; $input = new InputInterface(); $input->bind(new InputOption('verbose', 'v',InputOption::VALUE_NONE)); $input->getOption('verbose');
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; $input = new InputInterface(); $input->bind(new InputOption('limit', 'l', InputOption::VALUE_REQUIRED, 'The maximum number of results to display.')); $input->getOption('limit');In this example, we are creating an InputInterface object and then binding it to the 'limit' option. We are also specifying that the 'limit' option requires a value to be passed. We then use the getOption() method to retrieve the value of the 'limit' option. The package library used in these examples is the Symfony Console package.