Get a channel instance.

@param  string|null  $name
@return mixed
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]);
    }
7922
public function channelGetByName($name)
  {
    foreach($this->channelList() as $channel)
    {
      if($channel["channel_name"] == $name) return $channel;
    }

    throw new Exception("invalid channelID", 0x300);
  }
1193560
public function get(string $name = null): \TheCMSThread\Classes\Plugin
    {
        if (empty($name) === false && empty($this->plugins[$name]) === false) {
            return $this->plugins[$name];
        } else {
            throw new \InvalidArgumentException("Plugin not found");
        }
    }
1172942
public function channel($channel = null)
    {
        // If the given driver has not been created before, we will create the instances
        // here and cache it so we can return it next time very quickly. If there is
        // already a driver created by this name, we'll just return that instance.
        if (!$this->hasChannel($channel)) {
            $this->addChannel($channel, $this->createChannel($channel));
        }

        return $this->getChannel($channel);
    }
106288
public static function get($name)
    {
        $name = ltrim($name, '\\');
        if (!$data = self::getInternal($name)) {
            return null;
        }

        return $data;
    }
400282
public static function instance($name = null)
	{
		$fieldset = \Fieldset::instance($name);
		return $fieldset === false ? false : $fieldset->form();
	}
892924
public function getParser($name)
    {
        if (!isset($this->instances[$name])) {
            if (!isset($this->mapping[$name])) {
                return null;
            }
            $class = $this->mapping[$name];
            $this->instances[$name] = new $class();
        }

        return $this->instances[$name];
    }
287952
public static function instance($name = null)
	{
		if ($name !== null)
		{
			if ( ! array_key_exists($name, static::$_instances))
			{
				return false;
			}

			return static::$_instances[$name];
		}

		if (static::$_instance === null)
		{
			static::$_instance = static::forge();
		}

		return static::$_instance;
	}
930137
public static function getInstance($name)
	{
		$model = sprintf('\\%sAdmin', Str::studly($name));
		$model = new $model;

		return $model;
	}
22119
public static function get($name)
    {
        $class = get_called_class();
    
        if (!isset(self::$instance[$class])) {
            self::$instance[$class] = new static();
        }
        
        return self::$instance[$class]->getExtensions()->get($name);
    }
1187407
public static function get($name = null)
    {
        $name = $name ?: self::_DEFAULT;
        if (!isset(self::$caches[$name])) {
            throw new CacheException("Cache '$name' not found");
        }
        return self::$caches[$name];
    }
108256
public function get($name)
    {
        $value = $this->cache->get($name);

        return is_array($value)
            ? new Location($value)
            : null;
    }
1115029
public static function getInstance(string $name)
    {
        if (!isset(self::$instances[$name]) || empty(self::$instances[$name])) {
            new static($name);
        }
        return (self::$instances[$name]);
    }
688702
static public function widget($name=null)
	{
	    if ($name = static::findClass($name, 'widget')) {
	        $id = 'widget' . ($name ? '.' . $name : '');
	        if (!static::has($id)) {
	            static::setShared($id, function () use ($name) {
	                if ($name instanceof \Wslim\View\Widget) {
	                    return $name::instance();
	                } else {
	                    return new $name;
	                }
	            });
	        }
	        return static::get($id);
	    }
	    return null;
	}
387065
public function getTermVocabulary($name)
    {
        return isset($this->instances[$name]) ? $this->instances[$name] : null;
    }
1300756
public static function get($name = 'default')
    {
        if (!isset(self::$connections[$name])) {
            return null;
        }

        $connector = self::$connections[$name];

        return $connector->connection();
    }
1296004
public function channelGetByName($name)
  {
    foreach($this->channelList() as $channel)
    {
      if($channel["channel_name"] == $name) return $channel;
    }

    throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300);
  }