Elcodi\Component\Geo\Command\Abstracts\AbstractLocationCommand::getCountriesFromInput PHP 메소드

getCountriesFromInput() 보호된 메소드

Get a country list from an input object or throw an Exception if none is properly defined.
protected getCountriesFromInput ( Symfony\Component\Console\Input\InputInterface $input ) : array
$input Symfony\Component\Console\Input\InputInterface Input
리턴 array Country array from input
    protected function getCountriesFromInput(InputInterface $input)
    {
        $countries = $input->getOption('country');
        if (!is_array($countries) || empty($countries)) {
            throw new InvalidArgumentException('You need to specify minimum a Country. eg: --country=FR');
        }
        return $countries;
    }