Get gateway by id given.

@param int|string $id An id of gateway need to get.
@return GatewayInterface object gateway define by arg name.
@throws \yii\base\InvalidConfigException
508808
public function getGateway($id): GatewayInterface
    {
        $gateway = $this->_gateways[$id] ?? null;

        if ($gateway === null) {
            throw new InvalidArgumentException("Gateway: `$id` not exist!");
        } elseif (!$gateway instanceof GatewayInterface) {

            if (is_string($gateway)) {
                $gateway = ['class' => $gateway];
            }

            if (is_array($gateway)) {
                $gateway = ArrayHelper::merge($this->gatewayConfig, $gateway);
            }

            $gateway = $this->_gateways[$id] = Yii::createObject($gateway);
        }

        return $gateway;
    }
536233
protected function getUser($id)
    {
        $class = Yii::$app->user->identityClass;
        if (!class_exists($class)) {
            return null;
        }
        $user = $class::find()->id($id)->one();
        if (empty($user) || !($user instanceof User)) {
            throw new BadRequestHttpException(Yii::t('user', 'User Not Found.'));
        }
        return $user;
    }
44155
public function get($id)
    {
        if (!isset($this->processors[$id])) {
            throw new \InvalidArgumentException(sprintf("processor with id '%s' does not exist", $id));
        }

        return $this->processors[$id];
    }
43655
public function get( $id ) {
		if ( isset( $this->types[ $id ] ) ) {
			return $this->types[ $id ];
		}

		return null;
	}
1043576
public function get($id) {
        $this->checkPermissions('get');
        
        return $this->client->retrieveData($this->resourceName . '/' . $id);
    }
1113806
public function getById($id)
    {
        return isset($this->_data[$id]) ? $this->_data[$id] : null;
    }
830876
public function getById($id)
    {
        $inputResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl(sprintf('inputs/%s', $id))
        );

        if (isset($inputResult['input'])) {
            $input = new Input($inputResult['input']);
        } else {
            throw new \Exception('Input Not Found');
        }

        return $input;
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
1274926
public function getDMByUserId($id)
    {
        return $this->apiCall('im.open', [
            'user' => $id,
        ])->then(function (Payload $response) {
            return $this->getDMById($response['channel']['id']);
        });
    }
952750
public function getById($id)
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl(sprintf('models/%s', $id))
        );

        return $this->getModelFromResult($modelResult);
    }
828353
public function get($id)
    {
        if (!array_key_exists($id,$this->services)) {
            throw new \InvalidArgumentException(sprintf(
                'Service with id "%s" is not registered.',
                $id
            ));
        }

        $value = $this->services[$id];
        if (method_exists($value, '__invoke')) {
            $value = $value($this);
        }

        if (method_exists($value,'setContainer')) {
            $value->setContainer($this);
        }

        return $value;
    }
1173924
public function getById(int $id)
	{
		return $this->setAuthorizer($this->getModel()->where('id', '=', $id)->first());
	}
503366
public function fetchById($id) {
		return $this->getConnection()->where($this->getDao()->getTableId(), $id)->get($this->getDao()->getTableName());
	}
232974
public function get($id)
    {
        \assert(\is_scalar($id), 'Invalid format of the entry identifier.');

        if (\array_key_exists($id, $this->values)) {
            return $this->values[$id];
        }

        if ($this->hasInProxy($id)) {
            return $this->container->get((string)$id);
        }

        throw new ContainerResolutionException(\sprintf('Entry with id %s not found', $id));
    }
1139330
public function getById($id)
    {
        if (!isset($this->pluginInstances[$id])) {
            $class = $this->getPluginClass($id);
            if (!class_exists($class)) {
                $this->pluginInstances[$id] = false;
            } else {
                $this->pluginInstances[$id] = new $class(['wei' => $this->wei]);
            }
        }

        return $this->pluginInstances[$id];
    }
52792
public function getNodeById($id)
    {
        if (empty($this->nodes[$id])) {
            throw new \InvalidArgumentException("Invalid node primary key $id");
        }
        return $this->nodes[$id];
    }
886024
public function get($id)
    {
        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->getPageLayout($id)
        );
    }