Get matching authorizations.

@param CardPayments\Authorization $auth
@param CardPayments\Filter $filter
@return CardPayments\Authorization[] iterator
@throws PaysafeException
344464
public function getAuths(CardPayments\Authorization $auth = null, CardPayments\Filter $filter = null)
    {
        $queryStr = array();
        if($auth && $auth->merchantRefNum) {
            $queryStr['merchantRefNum'] = $auth->merchantRefNum;
        }
        if($filter) {
            if(isset($filter->limit)) {
                $queryStr['limit'] = $filter->limit;
            }
            if(isset($filter->offset)) {
                $queryStr['offset'] = $filter->offset;
            }
            if(isset($filter->startDate)) {
                $queryStr['startDate'] = $filter->startDate;
            }
            if(isset($filter->endDate)) {
                $queryStr['endDate'] = $filter->endDate;
            }
        }
        $request = new Request(array(
             'method' => Request::GET,
             'uri' => $this->prepareURI("/auths"),
             'queryStr' => $queryStr
        ));

        $response = $this->client->processRequest($request);

        return new CardPayments\Pagerator($this->client, $response, '\Paysafe\CardPayments\Authorization');
    }
640192
protected function getRoleFromAuth(AuraAuth $auth)
    {
        if (! $auth->isValid()) {
            return $this->guestRole;
        }

        $data = $auth->getUserData();

        return isset($data[$this->roleKey])
            ? $data[$this->roleKey]
            : $this->memberRole;
    }
399379
public function match($permissions, array $authzGroups)
    {
        $privileges = [];

        foreach ($permissions as $permissionAuthzGroup => $permissionPrivileges) {
            $matchingAuthzGroup = $this->getMatchingAuthzGroup($permissionAuthzGroup, $authzGroups);
            
            if (!$matchingAuthzGroup) {
                continue;
            }
            
            $privileges[] = $permissionPrivileges;
        }

        return $this->flatten($privileges);
    }
862161
public static vpnglobal_authenticationcertpolicy_binding[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnglobal_authenticationcertpolicy_binding obj = new vpnglobal_authenticationcertpolicy_binding();
		options option = new options();
		option.set_filter(filter);
		vpnglobal_authenticationcertpolicy_binding[] response = (vpnglobal_authenticationcertpolicy_binding[]) obj.getfiltered(service, option);
		return response;
	}
1208164
public function findByID($aid, $associationsFilter = null)
    {
        $xmlQuery = $this->associationsApiService->getAssociation($aid, $associationsFilter);

        $association = new Association();

        $mapper = new \RGU\Dvoconnector\Mapper\Association($xmlQuery);
        $mapper->mapToAbstractEntity($association);

        return $this->completeEntity($association);
    }
587734
public static function getCoupons($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/coupons' . $filter->toQuery(), 'Coupon');
    }
970149
public static function filter(array $data, $filter): array
    {
        if (!$filter) {
            return $data;
        }

        if (is_callable($filter)) {
            return array_filter($data, $filter);
        }

        if ($filter & self::FILTER_NULL) {
            return array_filter(
                $data,
                function ($value) {
                    return $value !== null;
                }
            );
        } elseif ($filter & self::FILTER_EMPTY) {
            return array_filter(
                $data,
                function ($value) {
                    return isset($value[0]);
                }
            );
        } elseif ($filter & self::FILTER_PHP) {
            return array_filter($data);
        }

        return $data;
    }
757414
private function _authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId)
    {
        $response = $this->callStepAndCheckForException('authorizePaymentAmount', 
                array(
                    $authorizationAmount,
                    $authorizationReferenceId
                ));
        
        $this->printResponseToWebpage("printAuthorizeOnBillingAgreementResponse", array(
            $response
        ));
        
        return getAmazonAuthorizationIdFromAuthorizeOnBillingAgreementResponse($response);
    }
362966
public function findAssociationsByRootAssociations($associationsFilter = null)
    {
        $arrayWithChilds = $this->associationsApiService->findAssociationsByRootAssociations($associationsFilter);

        $associations = new Associations();

        foreach ($arrayWithChilds as $xmlQuery) {
            $mapper = new \RGU\Dvoconnector\Mapper\Associations($xmlQuery);
            $mapper->mapToAbstractEntity($associations);
        }

        return $this->completeEntity($associations);
    }
801800
public function findUser($filter = '*', $limit = 100, array $searchFields = ['mail', 'cn', 'uid', 'sAMAccountname'], $dn = null)
    {
        //brak możliwości zalogowania
        if (!$this->authenticate($this->_config->user, $this->_config->password)) {
            throw new LdapException('Unable to find users due to "' . $this->_config->user . '" is not authorized');
        }
        try {
            //budowanie filtra
            $searchString = '(|';
            foreach ($searchFields as $field) {
                $searchString .= '(' . $field . '=' . $filter . ')';
            }
            $searchString .= ')';
            //odpowiedź z LDAP'a
            $rawResource = ldap_search($this->_getActiveServer(), $dn ? : 'dc=' . implode(',dc=', explode('.', $this->_config->domain)), $searchString);
        } catch (\Exception $e) {
            //puste
            return new LdapUserCollection;
        }
        //konwersja do obiektów
        return new LdapUserCollection(ldap_get_entries($this->_getActiveServer(), $rawResource), $limit);
    }
717849
public function getFilterConfig($filter)
    {
        if (!$this->hasFilter($filter)) {
            throw new Exception("No such filter '$filter' exists.");
        }

        return isset($this->config[$filter])
            ? $this->config[$filter]
            : [];
    }
35668
public function find(array $filter = [], array $orderBy = [], $limit = 0,
        $offset = 0, array $associate = []
    ) {
        try {

            $query = $this->query()
                ->select()
                ->associate($associate)
                ->setFilter($filter);

            foreach ($orderBy as $orderByRule) {
                $query->orderBy($orderByRule[0], $orderByRule[1]);
            }

            return $query->limit($limit)->offset($offset)->run($this->connection);
        } catch (Exception\QueryException $e) {
            throw new Exception\RepositoryException($e->getMessage());
        }
    }
550119
public static function filterByUuid($filter)
    {
        $operator = Arr::get($filter, 'operator');
        $method = Arr::get($filter, 'method');
        $arguments = Arr::get($filter, 'arguments');
        $value_one = Arr::get($filter, 'value_one');
        $value_two = Arr::get($filter, 'value_two');
        $settings = Arr::get($filter, 'settings');
        $positive = Arr::get($filter, 'positive');

        switch ($operator) {
            case 'IN':
                $method = 'whereIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NOT_IN':
                $method = 'whereNotIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NULL':
                $method = 'whereNull';
                break;
            case 'NOT_NULL':
                $method = 'whereNotNull';
                break;
        }

        return [
            'operator'  => $operator,
            'method'    => $method,
            'arguments' => $arguments,
            'value_one' => $value_one,
            'value_two' => $value_two,
            'settings'  => $settings,
            'positive'  => $positive,
        ];
    }
441329
public function findByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName)
    {
        $query = $this->createQuery();
        return $query->matching(
            $query->logicalAnd(
                $query->equals('accountIdentifier', $accountIdentifier),
                $query->equals('authenticationProviderName', $authenticationProviderName)
            )
        )->execute()->getFirst();
    }
333220
public function findByFilter(Filter $filter, $limit = null, $offset = 0, $order = null)
    {
        return $this->findByCriteria($filter->getCriteria(), $limit, $offset, $order);
    }
1073029
public function auto_filter($filter = true)
	{
		if (func_num_args() == 0)
		{
			return $this->auto_filter;
		}

		$this->auto_filter = $filter;

		return $this;
	}
791050
public function findAll($locale, $filter = null)
    {
        if ($filter) {
            $accountEntities = $this->accountRepository->findByFilter($filter);
        } else {
            $accountEntities = $this->accountRepository->findAll();
        }

        if (!empty($accountEntities)) {
            $accounts = [];
            foreach ($accountEntities as $account) {
                $accounts[] = $this->getApiObject($account, $locale);
            }

            return $accounts;
        }

        return;
    }