https://github.com/yocto/yoclib-epp-php
PHP yocLib for EPP
https://github.com/yocto/yoclib-epp-php
composer epp php xml yoclib yocto
Last synced: 4 months ago
JSON representation
PHP yocLib for EPP
- Host: GitHub
- URL: https://github.com/yocto/yoclib-epp-php
- Owner: yocto
- License: gpl-3.0
- Created: 2021-04-27T20:11:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-10T15:48:24.000Z (12 months ago)
- Last Synced: 2025-07-02T21:52:56.367Z (5 months ago)
- Topics: composer, epp, php, xml, yoclib, yocto
- Language: PHP
- Homepage: https://github.com/yocto/yoclib-epp-php
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# yocLib - EPP (PHP)
This yocLibrary enables your project to send and receive with EPP (Extensible Provisioning Protocol) in PHP.
## Status
[](https://github.com/yocto/yoclib-epp-php/actions/workflows/php.yml)
[](https://codecov.io/gh/yocto/yoclib-epp-php)
## Installation
`composer require yocto/yoclib-epp`
## Usage
### Reading
```php
use YOCLIB\EPP\EPPDocumentHelper;
use YOCLIB\EPP\Connections\EPPTCPConnection;
use YOCLIB\EPP\Elements\EPPEppElement;
$conn = new EPPTCPConnection(new SIDNTest);
$doc = $conn->readDocument();
/**@var EPPEppElement $epp*/
$epp = $doc->documentElement;
$hello = $epp->getHello();
```
### Writing
```php
use YOCLIB\EPP\EPPDocumentHelper;
use YOCLIB\EPP\EPPNamespaces;
use YOCLIB\EPP\Connections\EPPTCPConnection;
use YOCLIB\EPP\Registries\SIDNTest;
$doc = EPPDocumentHelper::createEPPDocument();
$epp = $doc->createElementNS(EPPNamespaces::EPP_1_0,'epp');
$hello = $doc->createElementNS(EPPNamespaces::EPP_1_0,'hello');
$epp->appendChild($hello);
$doc->appendChild($epp);
$conn = new EPPTCPConnection(new SIDNTest);
$xml = $conn->writeDocument($doc);
```