epsoftware/doctrine-odm-encrypt 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

epsoftware/doctrine-odm-encrypt

Composer 安装命令:

composer require epsoftware/doctrine-odm-encrypt

包简介

Package encrypts and decrypts Doctrine fields through life cycle events.

README 文档

README

Package encrypts and decrypts Doctrine fields through life cycle events. This version of the Doctrine Encrypt package distinguishes itself with the following features:

  • Superior Annotation parsing & caching using Doctrine's built in libraries for superior performance
  • Totally transparent field encryption: the value will only be encrypted in the database, never in the value
  • Unit testing

Integrations

The package supports the following integrations:

  • Laravel

Upgrading

If you're upgrading from a previous version you can find some help with that in the upgrading guide.

Installation

composer require 51systems/doctrine-encrypt

Configuration

Laravel

Add the subscriber in the boot method of a service provider.

<?php

$encrypter = $this->app->make(\Illuminate\Contracts\Encryption\Encrypter::class);

$subscriber = new DoctrineEncryptSubscriber(
    new \Doctrine\Common\Annotations\AnnotationReader,
    new \DoctrineEncrypt\Encryptors\LaravelEncryptor($encrypter)
);

$eventManager = $em->getEventManager();
$eventManager->addEventSubscriber($subscriber);

Usage

<?php

namespace Your\Namespace;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;

use DoctrineEncrypt\Configuration\Encrypted;

/**
 * @ODM\Document
 */
class Document
{
    /**
     * @ODM\Id
    */
    private $id;

    /**
     * @ODM\Field(type="string")
     * @Encrypted
     * @var string
     */
    private $secretData;
}

Versions

I'm using Semantic Versioning like described here.

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 218
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固