PHP code example of xorgxx / doctrine-encryptor-bundle
1. Go to this page and download the library: Download xorgxx/doctrine-encryptor-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xorgxx / doctrine-encryptor-bundle example snippets
use DoctrineEncryptor\DoctrineEncryptorBundle\Attribute\NeoxEncryptor;
....
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[neoxEncryptor(build: "out", facker : )]
private ?string $content = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
#[neoxEncryptor(build: "in")]
private ?string $description = null;
/** ======= note that by default #[neoxEncryptor]
* Attribute : build: "in". be default in / out
* Attribute : facker: PhoneFacker::class. be default This give possibility to customize the "facker" for ex: type phoneNumber it's not buildin bundle, but hee you can make service.
**/
....
`
namespace App\Services;
use libphonenumber\PhoneNumber;
class PhoneFacker implements neoxFackerInterface
{
public function create( ): PhoneNumber
{
return (new PhoneNumber())
->setCountryCode(33)
->setNationalNumber("14155552671")
;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.