Get the listener options for the command.

@return \Illuminate\Queue\ListenerOptions
299
protected function gatherOptions()
    {
        return new ListenerOptions(
            $this->option('env'), $this->option('delay'),
            $this->option('memory'), $this->option('timeout'),
            $this->option('sleep'), $this->option('tries'),
            $this->option('force')
        );
    }
1097194
protected static function loadListeners() {
		
		// default var
		$configDir = Config::getOption("configDir");
		
		// make sure the listener data exists
		if (file_exists($configDir."/listeners.json")) {
			
			// get listener list data
			$listenerList = json_decode(file_get_contents($configDir."/listeners.json"), true);
			
			// get the listener info
			foreach ($listenerList["listeners"] as $listenerName) {
				
				if ($listenerName[0] != "_") {
					$listener  = new $listenerName();
					$listeners = $listener->getListeners();
					foreach ($listeners as $event => $eventProps) {
						$eventPriority = (isset($eventProps["priority"])) ? $eventProps["priority"] : 0;
						self::$instance->addListener($event, array($listener, $eventProps["callable"]), $eventPriority);
					}
				}
				
			}
			
		}
		
	}
407509
public static function make()
    {
        $services = Provider::getServices();
        $config = $services->get('Config');
        $strategies = [];
        if (isset($config['error']['strategies'])) {
            $strategies = (array) $config['error']['strategies'];
        }
        $listener = new ErrorListener;
        foreach ($strategies as $name) {
            $strategy = $services->get($name);
            $listener->attachErrorStrategy($strategy);
        }

        return $listener;
    }
183205
public function getListeners($resultType = self::FULL_RESULT)
    {
        $listeners = [];

        foreach ($this->getEventDispatcher()->getListeners(CronEvent::NAME) as $listener) {
            $listenerClass = get_class($listener[0]);

            if (!$listener[0] instanceof CronEventListenerInterface) {
                $this->getLogger()->addError(sprintf('%s without %s', $listenerClass, CronEventListenerInterface::class));

                continue;
            }

            if (self::FLAT_RESULT === $resultType) {
                $listeners[] = $listenerClass;

                continue;
            }

            $type = $listener[0]::getRepeatedType();
            if (false === isset($listeners[$type])) {
                $listeners[$type] = [];
            }

            $listeners[$type][] = $listenerClass;
        }

        return $listeners;
    }
830112
public function getSubscribedEvents()
    {
        $events = [
            $this->command . '.resolve' => 'resolveDnsQuery',
            $this->command . '.resolver' => 'getResolverEvent',
        ];

        if ($this->enableCommand) {
            $events['command.' . $this->command] = 'handleDnsCommand';
        }

        return $events;
    }
699298
public function getOptionParser() {
		$parser = parent::getOptionParser();

		$parser->addSubcommands([
			CAKE_NOTIFY_CRON_TASK_CLEAR_NOTIFICATIONS => [
					'help' => __d('cake_notify', 'Clearing expired notifications'),
					'parser' => $this->Clear->getOptionParser()
			]]);

		return $parser;
	}
469532
protected function getOptions()
    {
        return array(
            array('log-path', null, InputOption::VALUE_OPTIONAL, 'The path to directory storing the log files.', $this->reader->getLogPath()),
            array('file-name', null, InputOption::VALUE_OPTIONAL, 'The pattern of the log filenames.', $this->reader->getLogFilename()),
            array('with-read', 'r', InputOption::VALUE_NONE, 'Include log entries that marked as read in request.'),
        );
    }
981086
public function getOptions()
    {
        $options = [];
        foreach ($this->toOptionArray() as $values) {
            $options[$values['value']] = __($values['label']);
        }
        return $options;
    }
787729
protected function getOptions()
    {
        return array(
            array('direction', 'd', InputOption::VALUE_OPTIONAL, 'The direction of ordering.', 'asc'),
            array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),
            array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),
            array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'),
            array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),
        );
    }
504392
public function getAvailableCommands(): array
    {
        if ($this->availableCommands === null) {
            $this->availableCommands = [];

            foreach (static::getCommandControllerMethodArguments($this->objectManager) as $className => $methods) {
                foreach (array_keys($methods) as $methodName) {
                    $this->availableCommands[] = new Command($className, substr($methodName, 0, -7));
                }
            }
        }

        return $this->availableCommands;
    }
947402
protected function getOptions()
    {
        $options = [];

        // Here we will gather all of the command line options that have been specified with
        // the double hyphens in front of their name. We will make these available to the
        // Blade task file so they can be used in echo statements and other structures.
        foreach ($_SERVER['argv'] as $argument) {
            if (! starts_with($argument, '--') || in_array($argument, $this->ignoreOptions)) {
                continue;
            }

            $option = explode('=', substr($argument, 2));

            if (count($option) == 1) {
                $option[1] = true;
            }

            $options[$option[0]] = $option[1];
        }

        return $options;
    }
947269
protected function callConfiguratorsOnce()
    {
        if ($this->configuratorsCalled) {
            return;
        }

        foreach (static::$configurators as $listener) {
            call_user_func($listener, $this, $this->container);
        }

        $this->configuratorsCalled = true;
    }
625244
private function getListener($listener)
	{
		$listenerClassName = Ioc::resolveClassName($listener);
		if (!isset($this->_listenerInstances[$listenerClassName])) {
			if (!($listener instanceof EventListenerInterface)) {
				$listener = Ioc::createObject($listener);
			}
			$this->_listenerInstances[$listenerClassName] = $listener;
		}
		
		return $this->_listenerInstances[$listenerClassName];
	}
1286621
public function listen()
    {
        if (!$this->queue) {
            $this->queue = msg_get_queue($this->pid);
            $this->emit('listen');
        }
        return $this;
    }
290553
public function getOptions()
    {
        if($resource = $this->getResource())
        {
            $options = stream_context_get_options($resource);

            if(!empty($options))
            {
                $name = key($options);
                $result = $options[$name];
            }
            else $result = array();

            return $result;
        }

        return $this->_options;
    }
1203838
public function getCommandOptions()
    {
        $consoleOptions = array();
        foreach ($this->requests as $name => $request) {
            if ($request->isAvailableAsCommandOption()) {
                $consoleOptions[$name] = $request->convertToCommandOption();
            }
        }

        return $consoleOptions;
    }
1066099
protected function getTriggerFields()
    {
        $orderStatusesList = $this->getOrderStatusesList();
        $fields = array(
            'triggerOrderStatus' => array(
                'name' => 'triggerOrderStatus[]',
                'type' => 'select',
                'label' => $this->t('field_triggerOrderStatus'),
                'description' => $this->t('desc_triggerOrderStatus'),
                'options' => $orderStatusesList,
                'attributes' => array(
                    'multiple' => true,
                    'size' => min(count($orderStatusesList), 8),
                ),
            ),
            'triggerInvoiceEvent' => $this->getOptionsOrHiddenField('triggerInvoiceEvent', 'radio', false),
            'triggerCreditNoteEvent' => $this->getOptionsOrHiddenField('triggerCreditNoteEvent', 'radio', false),
        );
        return $fields;
    }