Gets or sets io.

@param Interactor|null $io

@return Interactor|self
516156
public function io(Interactor $io = null)
    {
        if ($io || !$this->io) {
            $this->io = $io ?? new Interactor;
        }

        if (\func_num_args() === 0) {
            return $this->io;
        }

        return $this;
    }
922846
public function withOutput(OutputInterface $output): self
    {
        $listener = clone $this;
        $listener->output = $output;

        return $listener;
    }
559008
public function client($client = null)
    {
        if (!func_num_args()) {
            return $this->_client;
        }
        $this->_client = $client;
        return $this;
    }
755824
protected function configureIO(InputInterface $input, OutputInterface $output)
    {
        if (true === $input->hasParameterOption(['--ansi'], true)) {
            $output->setDecorated(true);
        } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) {
            $output->setDecorated(false);
        }

        if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) {
            $input->setInteractive(false);
        } elseif (\function_exists('posix_isatty')) {
            $inputStream = null;

            if ($input instanceof StreamableInputInterface) {
                $inputStream = $input->getStream();
            }

            if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) {
                $input->setInteractive(false);
            }
        }

        switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
            case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
            case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
            case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
            case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
            default: $shellVerbosity = 0; break;
        }

        if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
            $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
            $shellVerbosity = -1;
        } else {
            if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
                $shellVerbosity = 3;
            } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
                $shellVerbosity = 2;
            } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
                $shellVerbosity = 1;
            }
        }

        if (-1 === $shellVerbosity) {
            $input->setInteractive(false);
        }

        putenv('SHELL_VERBOSITY='.$shellVerbosity);
        $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
        $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
    }
123531
protected function setIo(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        return $this;
    }
833973
public function setType(string $type = self::TYPE_HIDDEN): InputInterface
    {
        $this->type = $type;

        return $this;
    }
726924
public function type($type = null)
    {
        if ($type !== null) {
            $this->type = $type;
            return $this;
        }
        return $this->type;
    }
684022
public function setIcon(string $icon = null): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->icon = $icon;
        }

        return $this;
    }
1130953
public function getClient($id = null)
    {
        if ($id === null) {
            $id = array_keys($this->getClients())[0];
        }

        return parent::getClient($id);
    }
426037
public function setIo(GoracashIO $ioObject)
    {
        $this->config->setIoClass(get_class($ioObject));
        $this->io = $ioObject;
    }
773079
public function setClient(ClientInterface $client = null): self
    {
        if (null === $client) {
            $this->client = new Client();

            return $this;
        }

        $this->client = $client;

        return $this;
    }
387170
public function execute(Arguments $args, ConsoleIo $io)
    {
        foreach ($this->config as $file) {
            list($plugin, $file) = pluginSplit($file);
            $this->copyFile(
                $io,
                Plugin::path($plugin, 'config' . DS . $file . '.php'),
                Folder::slashTerm(CONFIG) . $file . '.php'
            );
        }

        return null;
    }
1125919
public function getValue($type = null)
    {
        $siblings   = $this->getValues($type);
        $resolver   = $this->resolverFactory->getResolver($type);
        $riakObject = $resolver->resolve($siblings);

        return $riakObject;
    }
1035159
private function interactForTaskConfigurations(OutputStyle $io)
    {
        $io->writeln(' Add tasks:');

        $addTask = true;
        while ($addTask) {
            $taskQuestion = new Question('Search for a task');
            $taskQuestion->setAutocompleterValues($this->getAvailableTasks());
            $taskQuestion->setValidator(function ($answer) {
                if (class_exists($answer) === false && class_exists('Accompli\\Task\\'.$answer) === true) {
                    $answer = 'Accompli\\Task\\'.$answer;
                }
                if (class_exists($answer) === false || in_array(TaskInterface::class, class_implements($answer)) === false) {
                    throw new InvalidArgumentException(sprintf('The task "%s" does not exist.', $answer));
                }

                return $answer;
            });

            $task = $io->askQuestion($taskQuestion);

            $taskConfiguration = array_merge(
                array(
                    'class' => $task,
                ),
                $this->getTaskConfigurationParameters($task)
            );

            $this->configuration['events']['subscribers'][] = $taskConfiguration;

            $addTask = $io->confirm('Add another task?');
        }
    }
178093
public static function get($identifier, $default = null)
    {
        $value = self::getInternal($identifier);

        if (is_null($value)) {
            return $default;
        }

        return $value;
    }
1073689
public function type($type = null)
    {
        if (is_null($type)) {
            return $this->type;
        }

        $this->type = $type;

        return $this;
    }
429462
public function getInternalRequestClient()
	{
		// if we didnt find one lets make one
		if (!$client = $this->findInternalClient())
		{
			if ($this->createInternalRequestClient())
			{
				$client = $this->findInternalClient();
			}
		}

		// return client
		return ($client) ? $client : null;
	}