Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dormilich/arin
Objects for use with the ARIN Registry-RWS.
https://github.com/dormilich/arin
composer
Last synced: about 3 hours ago
JSON representation
Objects for use with the ARIN Registry-RWS.
- Host: GitHub
- URL: https://github.com/dormilich/arin
- Owner: Dormilich
- License: lgpl-3.0
- Created: 2017-11-20T13:51:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T14:32:10.000Z (about 6 years ago)
- Last Synced: 2024-04-14T18:27:07.388Z (7 months ago)
- Topics: composer
- Language: PHP
- Homepage:
- Size: 128 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ARIN objects
![Minimum PHP Version](https://img.shields.io/badge/php-≥%205.6-8892BF.svg)
![Build Status](https://img.shields.io/travis/Dormilich/arin/master.svg)
![License](https://img.shields.io/github/license/dormilich/arin.svg)Objects for use with the ARIN Registry-RWS.
## Primary ARIN objects
These objects are meant to request or submit data using the API service.
### Customer
This object holds one-time customer data for use in a [Simple Reassignment](https://www.arin.net/resources/restfulmethods.html#netreassign).
### Org
This object holds organisational customer data for use in a [Detailed Reassignment](https://www.arin.net/resources/restfulmethods.html#netreassign).
It can be used for reallocations or reassignments where the Simple Reassignment does not cut it (e.g. abuse handling,
management of customer data), although it comes with some issues in your ARIN online account.### Poc
The customer data to be used in `Org` objects or `Net` objects from a detailed reassignment.
The `Phone` payload may be used to add phone data to a `Poc` object.
### Delegation
Used for setting DNS data.
### Roa
The authentication data for [ARIN's RPKI implementation](https://www.arin.net/resources/rpki/).
### Ticket, Message
Read and answer ARIN tickets without logging into the ARIN online account.
## Response-only objects
### Error
The returned object when there was a problem with the request.
Note, for some errors (often for invalid URLs) the webservice may return a web page instead.
### TicketedRequest
The returned object when deleting a network.
### Collection
A container object for payloads. Used when searching for tickets/phone contacts.
## Basic payload methods
Building the object from XML
```php
// $xml may be a string, a SimpleXML object, a DOMDocument instance, or a DOM root element
$object = Payload::fromXML($xml);
```Getting XML from the object
```php
$xml = $object->xmlSerialize(); // returns an XML string
```Getting data into or out of the object
```php
$poc = new Poc;// test if a certain property exists
$poc->has('city'); // true
isset($poc['city']);// set a property's value
$poc->set('city', 'Chantilly'); // set the city value
$poc['city'] = 'Chantilly';// get a property object
$poc->attr('city'); // an Element instance for the 'city' value
$poc['city'];// get the property's value
$poc->get('city'); // 'Chantilly'
$poc['city']->getValue();// access nested objects
$poc['country']['code2'] = 'US';
```When you clone an object, all properties that are generated by ARIN (object handles, creation
dates, etc.) are removed from the copy.## Links
- [ARIN Payload Documentation](https://www.arin.net/resources/restfulpayloads.html)