@param string $name

@return Group\RadioGroup
3748
public function addRadioGroup(string $name) : Group\RadioGroup
    {
        $radioGroup = new Group\RadioGroup($this, $name);
        $this->addComponent($name, $radioGroup);

        return $radioGroup;
    }
109319
protected function channelOrFail($name)
    {
        if (isset($this->channels[$name])) {
            return $this->channels[$name];
        }
        throw new ResourceNotFoundException("Channel $name is not known.");
    }
198974
protected function channel($name = null)
    {
        if (!isset(self::channels()[$name])) {
            throw new InvalidCallException("No channel {$name} exists.");
        }

        return call_user_func(self::channels()[$name]);
    }
1066665
public function getObject($name)
    {
        if (!array_key_exists($name, $this->cache)) {
            if (($pos = strpos(self::$virtual_capabilities[$name], '.')) !== false) {
                // Group of capabilities
                list($group, $property) = explode('.', self::$virtual_capabilities[$name]);
                
                if (!array_key_exists($group, $this->group_cache)) {
                    $class = "WURFL_VirtualCapability_{$group}Group";
                    // Cache the group
                    $this->group_cache[$group] = new $class($this->device, $this->request);
                    $this->group_cache[$group]->compute();
                }
                
                // Cache the capability
                $this->cache[$name] = $this->group_cache[$group]->get($property);
            } else {
                // Individual capability
                $class = 'WURFL_VirtualCapability_'.self::$virtual_capabilities[$name];
                $this->cache[$name] = new $class($this->device, $this->request);
            }
        }
        return $this->cache[$name];
    }
242459
public function getGroupForName($name)
    {
        if (!$this->accessControlManager->hasAccessEntityForName(self::ACCESS_ENTITY_TYPE, $name)) {
            return false;
        }
        
        // Get the access entity
        $accessEntity = $this->accessControlManager->getAccessEntityForName(self::ACCESS_ENTITY_TYPE, $name);

        if ($accessEntity === false) {
            return false;
        }
        
        return $accessEntity;
    }
599140
protected function getComponent(string $name)
    {
        if (!is_object($this->components[$name])) {
            $this->components[$name] = $this->createComponent($name);
        }

        return $this->components[$name];
    }
429056
public static function getInstance(string $name): \Swoole\Channel
    {
        if(!static::$isInited)
        {
            throw new \RuntimeException('getInstance failed, ChannelManager is not initialized');
        }
        if(!isset(static::$channels[$name]))
        {
            throw new \RuntimeException(sprintf('GetInstance failed, %s is not found', $name));
        }
        return static::$channels[$name];
    }
635421
public function addCheckboxGroup(string $name) : Group\CheckboxGroup
    {
        $checkboxGroup = new Group\CheckboxGroup($this, $name);
        $this->addComponent($name, $checkboxGroup);

        return $checkboxGroup;
    }
108252
protected function get($name)
    {
        try {
            return $this->channels[$name] ?? ($this->channels[$name] = $this->resolve($name));
        } catch (\Throwable $e) {
            $logger = $this->createEmergencyLogger();

            $logger->emergency('Unable to create configured logger. Using emergency logger.', [
                    'exception' => $e,
                ]);

            return $logger;
        }
    }
79183
public function setMiddlewareGroup($name)
    {
        if (!empty(self::$middleware[$name])) {
            foreach (self::$middleware[$name] as $name => $rule) {
                $this->middleware($name, $rule);
            }
        }

        return $this;
    }
705493
public function getFavouriteShow(string $name): Stream
    {
        $roughMatch = false;

        $shows = $this->getFavouriteShows();
        foreach ($shows as $show) {
            if ($show->getTitle() === $name) {
                return $show;
            }
            if (strtolower($show->getTitle()) === strtolower($name)) {
                $roughMatch = $show;
            }
        }

        if ($roughMatch) {
            return $roughMatch;
        }

        throw new NotFoundException("Unable to find a radio show by the name '{$name}'");
    }
334403
public function getReceiver(string $name)
    {
        $classPath = explode('\\', get_called_class());
        $class     = (string)$this->getApi()
                                  ->sprintf(':namespace\:class\:method', __NAMESPACE__, end($classPath), $name);

        if (class_exists($class)) {
            return new $class($this);
        }

        return null;
    }
322321
public function getField(string $name = '', string $group = 'default')
    {
        /** @var SectionInterface $section */
        $section = $this->groups[$group];

        $foundItems = array_filter($section->getItems(), function (FieldTypeInterface $item) use ($name) {
            return $name === $item->getBaseName();
        });

        return ! empty($foundItems) ? array_shift($foundItems) : [];
    }
824628
public function get($name)
    {
        $toggle = $this->collection->get($name);
        if(!$toggle){
            throw new \InvalidArgumentException("Cannot find Toggle with name $name");
        }

        return $toggle;
    }
45075
protected function findConstraintGroup($name) {
        foreach ($this->getConstraintGroups() as $group) {
            if ($group->getName() === $name) {
                return $group;
            }
        }

        return null;
    }
1129374
public function createGroup ($name)
    {
        $json = json_encode([
            'group' => [
                'name' => $name,
            ],
        ]);

        $request = new Request("POST", "https://api.weixin.qq.com/cgi-bin/groups/create", [], $json);
        $response = $this->client->send($request);
        $json = json_decode($response->getBody());
        
        if (isset($json->group->id, $json->group->name)) {
            return new Group($json->group->id, $json->group->name);
        } else {
            throw new Exception("bad response: expected properties `id`, `name`");
        }
    }
1258930
public function getChannelByName($name)
    {
        return $this->getChannels()->then(function (array $channels) use ($name) {
            foreach ($channels as $channel) {
                if ($channel->getName() === $name) {
                    return $channel;
                }
            }

            throw new ApiException('Channel ' . $name . ' not found.');
        });
    }