Finds a throttler by the given user ID.

@param  mixed   $id
@param  string  $ipAddress
@return \Cartalyst\Sentry\Throttling\ThrottleInterface
967500
public function findByUserId($id, $ipAddress = null)
	{
		return $this->findByUser($this->userProvider->findById($id),$ipAddress);
	}
1051387
public function findBy($id, array $parameters = [], array $headers = [])
    {
        return $this->getFactory()->create(
            $this->getApi()->findBy($id, $parameters, $headers)
        );
    }
661198
public function actionDelete( $id, $pid ) {

		$model	= $this->modelService->getById( $id );
		$parent = $this->parentService->getById( $pid );

		if( isset( $model ) && isset( $parent ) ) {

			$address = $this->addressService->getById( $model->modelId );

			// Delete Address and Mappings
			$this->addressService->delete( $address, [ 'admin' => true ] );

			// Trigger Ajax Success
			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ) );
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
753661
public function findByUserLogin($login, $ipAddress = null)
	{
		return $this->findByUser($this->userProvider->findByLogin($login),$ipAddress);
	}
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;
    }
152299
public function getAddressInfo($ipAddress)
    {
        // This test is a trick to determine if we have a valid IPv4 address, the
        // only kind we can handle at the moment.
        $long = ip2long($ipAddress);
        if ($long == -1 || $long === false) {
            return null;
        }
        $result = $this->gateway->get(
            'ipv4address',
            ['ip_address' => $ipAddress, '_max_results' => 1]
        );
        return (isset($result[0])) ? $result[0] : null;
    }
984515
public static function find($headers,$id=true)
    {
      $header = parent::find($headers, "Location");

      if ($id) {
        $match = array();
        $pieces = explode("/", $header);
        return str_replace("\r", "", str_replace("\n", "", $pieces[sizeof($pieces) - 1]));
      }

    return $header;
    }
1018148
private function setIpAddress(?string $ipAddress): self
    {
        $this->updatePropertyValue(
            IpAddressFieldInterface::PROP_IP_ADDRESS,
            $ipAddress
        );

        return $this;
    }
557584
public function delete(string $id, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/delete', $id);

        return $this->post($url, [], $headers);
    }
98352
protected static function deleteAddressByIdAsyncWithHttpInfo($address_id) 
    {
        $returnType = '';  
        $request = self::deleteAddressByIdRequest($address_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
1113855
public function findDiv($id = null, array $relations = array())
    {
        return new Accessor\DivAccessor($id, $relations, $this->con);
    }
1206187
public function getById($id, $srid = null)
    {
        $rows = $this->getSelectQueryBuilder($srid)
            ->where($this->getUniqueId() . " = :id")
            ->setParameter('id', $id)
            ->execute()
            ->fetchAll();
        $this->prepareResults($rows, $srid);
        return reset($rows);
    }
595121
public function findAsPdf(string $id, array $headers = [])
    {
        $url = $this->url('invoices/%s/pdf', $id);

        return $this->get($url, [], $headers);
    }
582079
public function getById($domainName, $id)
    {
        $domainRecords = $this->adapter->get(sprintf('%s/domains/%s/records/%d', $this->endpoint, $domainName, $id));

        $domainRecords = json_decode($domainRecords);

        return new DomainRecordEntity($domainRecords->domain_record);
    }
1055002
public function findWhereOrFail(int $id, array $parameters)
    {
        $response = $this->model->with($this->with)->where($parameters)->findOrFail($id);
        $this->with = [];
        return $response;
    }
875936
public function suspendAction($id)
    {
        $cm = new CronManager();
        $crons = $cm->get();
        $this->addFlashFromCronManager($cm);
        $crons[$id]->setSuspended(true);
        $cm->write();
        $this->addFlashFromCronManager($cm);

        return $this->redirect($this->generateUrl('BCCCronManagerBundle_index'));
    }
839182
public function getById($id)
    {
        $path = new ResourcePathServiceOperation($this->getContext(),$this->getResourcePath(),"getById",array($id));
        return new User($this->getContext(),$path);
    }