ImboCli\Command\AddPublicKey::askForCustomResources PHP Метод

askForCustomResources() приватный Метод

Ask the user which custom resources the public key should have access to
private askForCustomResources ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : array | string
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат array | string
    private function askForCustomResources(InputInterface $input, OutputInterface $output)
    {
        $question = new Question('Which custom resources should the public key have access to?' . PHP_EOL . '(comma-separated) ');
        $question->setValidator(function ($answer) {
            $resources = array_filter(array_map('trim', explode(',', $answer)));
            if (empty($resources)) {
                throw new RuntimeException('You must specify at least one resource');
            }
            return $resources;
        });
        return $this->getHelper('question')->ask($input, $output, $question);
    }