Set up the vendor details.

@param $vendorId
@param $hash
@return $this
192608
public function usingVendorId($vendorId, $hash)
    {
        $this->vendorId = $vendorId;
        $this->hashKey = $hash;

        return $this;
    }
247415
public function setFormatter(string $formatterId, FormatterInterface $formatter): self
    {
        $this->_formatters[$formatterId] = $formatter;

        return $this;
    }
845956
public function setStatus($status)
    {
        if (!in_array($status, static::$allowedStatuses))
        {
            throw new RuntimeException("Unknown transaction status given: {$status}");
        }

        $this->status = $status;

        return $this;
    }
532743
public function setHash(string $hash): self
    {
        $this->hash = (string) hex2bin($hash);
        return $this;
    }
204043
public static function deleteTransaction($hash) {

        $transaction = Transaction::find()->withTransactionPartAndHash($hash)->one();

        if ($transaction === null) {
          throw new Exception("Transaction with hash " . $hash . " not found.");
        }

        $dbTransaction = \Yii::$app->db->beginTransaction();
        try {
            foreach ($transaction->transactionParts as $tp) {
                TransactionPersistance::setAccountBalance($tp->account_id, $tp->accountside_id, $tp->value, true);
            }
            $id = $transaction->transaction_id;
            TransactionPart::deleteAll(['transaction_id' => $transaction->transaction_id]);
            Transaction::deleteAll(['transaction_id' => $transaction->transaction_id]);
            
            $dbTransaction->commit();
            return $id;
        } catch (Exception $e) {
            $dbTransaction->rollBack();
            throw $e;
        }
    }
387244
public function set($key, $value)
    {
        $hash = $this->key_to_hash($key);
        $this->array[$hash] = $value;
        return $this;
    }
553428
public function activateUserAction($hash)
    {
        $user = $this->userManager->getByResetPasswordHash($hash);
        if (!$user) {
            $this->session->getFlashBag()->add(
                'warning',
                $this->translator->trans('link_outdated', [], 'platform')
            );

            return new RedirectResponse($this->generateUrl('claro_security_login'));
        }

        $this->userManager->activateUser($user);
        $this->userManager->logUser($user);

        return new RedirectResponse($this->generateUrl('claro_desktop_open'));
    }
1282397
public function findOneByRegisteraddresshashIgnoreHidden($hash)
    {
        $query = $this->createQuery();
        $query->getQuerySettings()->setIgnoreEnableFields(TRUE);
        //$query->getQuerySettings()->setRespectStoragePage(FALSE);

        $query->matching(
            $query->equals('registeraddresshash', $hash )
        );

        return $query->execute()->getFirst();
    }
797956
public function fromHash($hash)
    {
        if (!is_array($hash)) {
            return new Value();
        }

        $tags = [];
        $tagIds = [];
        foreach ($hash as $hashItem) {
            if (isset($hashItem['id'])) {
                $tagIds[] = $hashItem['id'];
            }
        }

        if (!empty($tagIds)) {
            $loadedTags = $this->tagsService->loadTagList($tagIds);
        } else {
            $loadedTags = [];
        }

        foreach ($hash as $hashItem) {
            if (!is_array($hashItem)) {
                continue;
            }

            if (!isset($hashItem['id'])) {
                $tags[] = new Tag(
                    [
                        'parentTagId' => $hashItem['parent_id'],
                        'keywords' => $hashItem['keywords'],
                        'mainLanguageCode' => $hashItem['main_language_code'],
                        'remoteId' => isset($hashItem['remote_id']) ?
                            $hashItem['remote_id'] :
                            null,
                        'alwaysAvailable' => isset($hashItem['always_available']) ?
                            $hashItem['always_available'] :
                            true,
                    ]
                );
            } elseif (isset($loadedTags[$hashItem['id']])) {
                $tags[] = $loadedTags[$hashItem['id']];
            }
            // We ignore tags which do not exist (missing in $loadedTags)
        }

        return new Value($tags);
    }
22590
public function fromHash($hash)
    {
        if ($hash === null) {
            return $this->getEmptyValue();
        }

        return $this->hashConverter->convertToValue($hash);
    }
614492
public function add($vendor)
    {
        if (is_array($vendor)) {
            $this->collection[] = new Vendor($vendor);
        } elseif (is_object($vendor) && $vendor instanceof Vendor) {
            $this->collection[] = $vendor;
        }

        return $this;
    }
721058
public function loadUserByToken($hash)
    {
        try {
            return $this->innerGateway->loadUserByToken($hash);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (\PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
32129
protected function makeRequest(string $hash): ResponseInterface
    {
        $uri = $this->getUriFactory()->createUri('https://api.pwnedpasswords.com/range/'.substr($hash, 0, 5));
        $request = $this->getRequestFactory()->createRequest('GET', $uri);

        return $this->getClient()->sendRequest($request);
    }
39734
static public function fromHash(array $hash) {
    $map = new SimpleOrderedMap();
    $map->keys = array_keys($hash);
    $map->values = array_values($hash);
    return $map;
  }
1368579
public function processInvitationByHash(User $user, $hash)
    {
        $invitation = $this->dm->getRepository('WobbleCodeUserBundle:Invitation')->findOneBy(
            [
                'hash'   => $hash,
                'status' => 'pending'
            ]
        );

        if (!$invitation) {
            return false;
        }

        $organization = $invitation->getOrganization();
        $this->addMemberByInvitation($organization, $user, $invitation);

        return $organization;
    }
802633
public function setId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->id !== $v) {
            $this->id = $v;
            $this->modifiedColumns[DealerBrandVersionTableMap::ID] = true;
        }

        if ($this->aDealerBrand !== null && $this->aDealerBrand->getId() !== $v) {
            $this->aDealerBrand = null;
        }


        return $this;
    }
837618
public function setMerchantID($merchantID)
    {
        if (preg_match('/^(7|9)\d{4}$/', $merchantID) !== 1) {
            if ($this->isTestSystem()) {
                throw new InvalidArgumentException("The merchant ID '$merchantID' you have given is wrong, it must be 5-digit number and starts with 7 or 9!");
            } else {
                throw new Exception();
            }
        }

        $this->merchantID = $merchantID;
    }