Sets the given release channel in config but does not save id. $config->forceSave() still needs to be called
@internal tests only
@param string $channel
495367
public function setActiveReleaseChannelId($channel)
    {
        $general = Config::getInstance()->General;
        $general['release_channel'] = $channel;
        Config::getInstance()->General = $general;
    }
1285683
protected boolean setChannel(final Channel newChannel) {
        if(newChannel == null) {
            return false;
        }
        synchronized (lock) {
            if(state != State.OPEN || channel != null) {
                return false;
            }
            this.channel = newChannel;
            this.channel.addCloseHandler(new CloseHandler<Channel>() {
                @Override
                public void handleClose(final Channel closed, final IOException exception) {
                    synchronized (lock) {
                        if(FutureManagementChannel.this.channel == closed) {
                            FutureManagementChannel.this.channel = null;
                        }
                        lock.notifyAll();
                    }
                }
            });
            lock.notifyAll();
            return true;
        }
    }
907085
public function publish($channel, $message) {
        try {
            return $this->getRedis()->publish($channel, $message);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
1020707
public function moveMember($channel)
    {
        $deferred = new Deferred();

        if ($channel instanceof Channel) {
            $channel = $channel->id;
        }

        $this->http->patch(
            "guilds/{$this->guild_id}/members/{$this->id}",
            [
                'channel_id' => $channel,
            ]
        )->then(function () use ($deferred) {
            $deferred->resolve();
        }, \React\Partial\bind_right($this->reject, $deferred));

        // At the moment we are unable to check if the member
        // was moved successfully.

        return $deferred->promise();
    }
611654
public static function set($config = null, bool $force = false)
    {
        if ( ! $force && ! empty(self::$config)) {
            return;
        }

        if (is_array($config)) {
            self::$config = $config;
        } else {
            self::$config = require $config ?? self::DEFAULT_CONFIG_PATH;
        }
    }
1063000
public function channel(string $channel): Observable
    {
        // Only join a channel once
        if (isset($this->channels[$channel])) {
            return $this->channels[$channel];
        }

        // Ensure we only get messages for the given channel
        $channelMessages = $this->messages->filter(function (Event $event) use ($channel) {
            return $event->getChannel() !== '' && $event->getChannel() === $channel;
        });

        $subscribe = $this->connected
            ->do(function () use ($channel) {
                // Subscribe to pusher channel after connected
                $this->send(Event::subscribeOn($channel));
            })
            ->flatMapTo(Observable::empty());

        // Observable representing channel events
        $this->channels[$channel] = $channelMessages
            ->merge($subscribe)
            ->filter([Event::class, 'subscriptionSucceeded'])
            ->retryWhen(function (Observable $errors) {
                return $errors->flatMap(function (Throwable $throwable) {
                    return $this->handleLowLevelError($throwable);
                });
            })
            ->finally(function () use ($channel) {
                // Send unsubscribe event
                $this->send(Event::unsubscribeOn($channel));

                // Remove our channel from the channel list so we don't resubscribe in case we reconnect
                unset($this->channels[$channel]);
            })
            ->singleInstance();

        return $this->channels[$channel];
    }
680076
public function createLogger($channel)
    {
        if (!$this->app->isInstalled()) {
            return new NullLogger();
        }
        $logger = $this->config->createLogger($channel);
        $event = new Event($logger);
        $this->dispatcher->dispatch('on_logger_create', $event);

        return $logger;
    }
360279
private function execute(Channel $channel): \Generator
    {
        try {
            if ($this->function instanceof \Closure) {
                $function = $this->function->bindTo($channel, Channel::class);
            }

            if (empty($function)) {
                $function = $this->function;
            }

            $result = new ExitSuccess(yield $function(...$this->args));
        } catch (\Throwable $exception) {
            $result = new ExitFailure($exception);
        }

        // Attempt to return the result.
        try {
            try {
                return yield from $channel->send($result);
            } catch (SerializationException $exception) {
                // Serializing the result failed. Send the reason why.
                return yield from $channel->send(new ExitFailure($exception));
            }
        } catch (ChannelException $exception) {
            // The result was not sendable! The parent context must have died or killed the context.
            return 0;
        }
    }
1295938
def set_channel_created(self, channel_link, channel_id):
        
        self.channel_link = channel_link
        self.channel_id = channel_id
        self.__record_progress(Status.PUBLISH_CHANNEL if config.PUBLISH else Status.DONE)
236652
public function detachCallback($channel)
    {
        $callbackName = $this->getPrefixKeys().$channel;

        if (isset($this->callbacks[$callbackName])) {
            unset($this->callbacks[$callbackName]);
            $this->pubsub->unsubscribe($channel);
        }
    }
1350980
public function addChannel($name, Driver $channel)
    {
        $this->root->addChannel($name, $channel);
        return $this;
    }
1115137
public function resetChannel($channel)
    {
        $op = $this->sendResetChannelOperation($channel);

        // waiting for reset operation finishes
        $op = $this->awaitOperation($op);

        // true if succeeded
        return $op->getState() == OperationState::Succeeded;
    }
1052180
public function setChannel(\CampaignChain\CoreBundle\Entity\Channel $channel)
    {
        $this->channel = $channel;

        return $this;
    }
209966
public function deleteSubscriber(string $channel): ?Subscriber
    {
        $key = self::SUBSCRIBER_KEY.".{$channel}";
        $hasSubscriber = $this->cache->has($key);

        $subscriber = $this->cache->get($key);

        if ($hasSubscriber) {
            $this->cache->forget($key);
        }

        return $subscriber;
    }
1030393
public function setChildren(array $channels = null)
    {
        if($channels != null){
            foreach($channels as $channel){
                $channelHydrated = self::$manager->hydrate($channel);
                $this->addChildren($channelHydrated);
            }
        }
    }
1004552
public function listen( $channels )
    {
        $channels = is_array( $channels ) ? $channels : array( $channels );
        foreach( $channels as $channel ) {
            // clean up channel - it doesn't require quoting (not sure why)
            // make safe with whitelist of chars
            $channel = preg_replace( "/[^a-zA-Z\._:]/", '', $channel );
            $this->query( new Raw( "LISTEN {$channel}" ) );
        }
    }
155028
public function channel($channel) {
		if (!isset($channel['link'])) {
			$channel['link'] = '/';
		}
		if (!isset($channel['title'])) {
			$channel['title'] = '';
		}
		if (!isset($channel['description'])) {
			$channel['description'] = '';
		}

		$channel = $this->_prepareOutput($channel);
		return $channel;
	}