Imbo\Auth\AccessControl\Adapter\Mongo::updatePrivateKey PHP Метод

updatePrivateKey() публичный Метод

public updatePrivateKey ( $publicKey, $privateKey )
    public function updatePrivateKey($publicKey, $privateKey)
    {
        try {
            $result = $this->getAclCollection()->updateOne(['publicKey' => $publicKey], ['$set' => ['privateKey' => $privateKey]]);
            unset($this->publicKeys[$publicKey]);
            return (bool) $result->getMatchedCount();
        } catch (MongoException $e) {
            throw new DatabaseException('Could not update key in database', 500, $e);
        }
    }