Sets commands which should be shown independently from active shop.

@param Command $service
513937
private function setNonShopAwareCommands(Command $service)
    {
        if (!$service instanceof AbstractShopAwareCommand && $service instanceof Command) {
            $this->commands[] = $service;
        }
    }
1259719
public function removeCommandCallback($command, $method)
    {
        $command = strtolower($command);

        if (isset($this->__command_callbacks[$command]) )
        {
            if($method instanceof \Closure) {
                $index = spl_object_hash($method);
            } else {
                $index = $method;
            }

            unset($this->__command_callbacks[$command][$index]);
        }

        return $this;
    }
310221
private function stop($service, $restart = false) {
        $this->output('Stopping ...', false);
        $rtn = $this->sendCommand('stop', ['service' => $service, 'restart' => $restart]);
        if ($rtn) {
            $this->output($this->getStatus($rtn['status']));
        }
    }
1184977
public function setCommand($query)
    {
        if ($query) {
            $query = preg_replace("/[^\w]/", ' ', strtoupper($query));
            $query = strtok($query, ' ');
            $this->command = preg_replace('/[^A-Z]/', '', $query);
        }
    }
731890
public function set(string $id, $service)
    {
        if ($this->frozen) {
            throw new FrozenContainerException(
                "The container is frozen and is not possible to define the new service \"{$id}\"."
            );
        }

        $this->definitions[$id] = $service;

        // clean alias and internal cache
        unset($this->services[$id]);
        unset($this->aliases[$id]);

        return $this;
    }
761487
protected function createWorker($service)
    {
        return $this->getServiceBroker()
            ->service($service)
            ->context($this->command->getContext());
    }
462679
protected function doSendCommand(Command $command): void
    {
        $envelope = new TransportEnvelope($command, 'json');
        $this->client->putRecord([
            'DeliveryStreamName' => $this->router->forCommand($command),
            'Record'             => [
                // line break here is VERY important - produces json line delimited records
                // when firehose delivers to s3, es, etc.
                'Data' => $envelope->toString() . PHP_EOL,
            ],
        ]);
    }
859476
public function add($service, $alias = '', $args = [])
    {
        // Register the service as a prototype
        if (!empty($args)) {
            if (empty($alias)) {
                $this->container->add($service)->withArgument($args);
            } else {
                $this->container->add($alias, $service)->withArgument($args);
            }
        } else {
            if (empty($alias)) {
                $this->container->add($service);
            } else {
                $this->container->add($alias, $service);
            }
        }
    }
353876
public function setAlias($alias, $service)
    {
        if ($alias == $service) {
            throw new ContainerException('Alias and service names can not be equals');
        }

        $this->aliases[$alias] = $service;
    }
703340
public function setCommand(Command $command) : self
    {
        $this->command = $command;

        if ($this instanceof ConsoleOutput && $this->getErrorOutput() instanceof ErrorOutput) {
            $this->getErrorOutput()->setCommand($command);
        }

        return $this;
    }
1179410
public function setService()
    {
        $serviceData = $this->getConfig('service.' . $this->service);
        foreach ($serviceData as $key => $value) {
            Arr::set($this->serviceData, $key, $value);
        }
        Arr::forget($this->configData,'service');
        return $this;
    }
427556
public function set($name, $service)
    {
        if (isset($this->registry[$name])) {
            unset($this->registry[$name]);
        }
        if (isset($this->instances[$name])) {
            unset($this->instances[$name]);
        }
        if (null === $service) {
            return $this;
        }
        if (! is_string($service)) {
            $this->instances[$name] = $service;

            return $this;
        }
        $this->registry[$name] = $service;

        return $this;
    }
968717
public function setServices($services)
    {
        $allowedValues = $this->getServicesAllowableValues();
        if (array_diff($services, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'services', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['services'] = $services;

        return $this;
    }
1043607
public function addService(Service $service) {
    if (!in_array($service, $this->services, TRUE)) {
      $this->services[] = $service;
      
      if ($service instanceof \Psc\System\LoggerObject && $service->getLogger() instanceof \Psc\System\DispatchingLogger) {
        $this->getLogger()->listenTo($service->getLogger());
      }
    }
    return $this;
  }
307905
public function setServiceList($serviceList = [])
    {
        if (!$serviceList) return;

        foreach ($serviceList as $key => $closure) {
            $this->set($key, $closure);
        }
    }
1306903
public function unpersistService($serviceName)
    {
        if (isset($this->persistentServices[$serviceName])) {
            unset($this->persistentServices[$serviceName]);
        }
        if (isset($this->permanentServices[$serviceName])) {
            unset($this->permanentServices[$serviceName]);
        }
        if ($this->client && isset($this->client->persistentServices[$serviceName])) {
            unset($this->client->persistentServices[$serviceName]);
        }
    }
1099139
function stopService($services)
    {
        $services = is_array($services) ? $services : func_get_args();

        foreach ($services as $service) {
            if ($this->installed($service)) {
                info("Stopping {$service}...");

                $this->cli->quietly('sudo brew services stop '.$service);
            }
        }
    }