Download the PHP package ecourty/presidio-client without Composer
On this page you can find all versions of the php package ecourty/presidio-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package presidio-client
Presidio Client for PHP
A typed PHP client for Microsoft Presidio — detect and anonymize PII (Personally Identifiable Information) in text.
Requirements
- PHP 8.3+
- A running Microsoft Presidio instance (Analyzer + Anonymizer services)
Installation
Quick Start
The Presidio facade is the simplest way to use the library — it combines both clients and provides convenience methods:
Custom Operators
You can configure different anonymization strategies per entity type:
Available operators: replace, redact, hash, mask, encrypt, decrypt, custom, keep.
Check the OperatorType enum for details.
Encrypt & Decrypt (Round-Trip)
Filter by Entity Type
Allow List
Exclude specific values from being detected as PII:
Ad-Hoc Recognizers
Add custom recognizers on the fly without modifying the Presidio server:
Decision Process (Explainability)
Get detailed explanations of why each entity was detected (requires low-level client access):
Health Checks
List Capabilities
Supported Entity Types
The EntityType enum provides all supported PII types:
PERSON, PHONE_NUMBER, EMAIL_ADDRESS, CREDIT_CARD, CRYPTO, DATE_TIME, DOMAIN_NAME, IBAN_CODE, IP_ADDRESS, LOCATION, MEDICAL_LICENSE, NRP, SG_NRIC_FIN, UK_NHS, URL, US_BANK_NUMBER, US_DRIVER_LICENSE, US_ITIN, US_PASSPORT, US_SSN, AU_ABN, AU_ACN, AU_TFN, AU_MEDICARE, IN_PAN, IN_AADHAAR, IN_VEHICLE_REGISTRATION, IN_VOTER, IN_PASSPORT
Error Handling
API errors throw ApiException with the HTTP status code and response body:
All exceptions extend PresidioException (which extends RuntimeException).
Custom HTTP Client
The facade accepts pre-configured client instances. Each client accepts a Symfony HttpClientInterface:
Examples
See the examples/ directory for runnable scripts:
Development
License
MIT