承接 aussievoip/ipnd 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aussievoip/ipnd

Composer 安装命令:

composer require aussievoip/ipnd

包简介

Open source implementation of the Australian IPND tool

README 文档

README

You are expected to know what you are doing.

Licenced under the AGPLv3.

Example code:

<?php
include 'config.php';
include 'vendor/autoload.php';

use AussieVoIP\IPND\IPND;
use AussieVoIP\IPND\Transaction;
use AussieVoIP\IPND\Record;
use AussieVoIP\IPND\Records\Entity;
use AussieVoIP\IPND\Records\Address;

// An Entity is assigned to the number. It can be PERSON, BUSINESS, GOVERMENT, etc..
$e = new Entity("PERSON");
$e->setName("Herp L. Derpinson", "Mr");
$e->setContactNum("0402000000");

$f = new Entity("BUSINESS");
$f->setName("Extremely Long Name Pty Ltd, Trading as Stupidly Long Name Incorporated");
$f->setContactNum("0402000000");

// This is a physical Address. You should purchase the Australia Post Postcode Map CSV
// file, and put it in the data directory. See the POSTCODE.md file there. There is an
// older sample.csv there which will help you to get started.
$a = new Address();
$a->setStreetNumber("1");
$a->setStreetName("FAKE", "ST");
$a->setLocality("4680", "GLADSTONE DC");

// This is the File Sequence Number
$i = new IPND(2);

// This is where you'd extract your numbers, and create your entities/addresses
$nums = [ "0749700000" => $e, "0749700001" => $f, "0749700002" => $e ];

foreach ($nums as $x => $ent) {
    $t = new Transaction;
    $t->addEntry(Record::getElement("PublicNumber", $x));
    $t->addEntry(Record::getElement("UsageCode")->setEntity($ent));
    $t->addEntry(Record::getElement("ServiceStatusCode", "C"));
    $t->addEntry(Record::getElement("PendingFlag", "N"));
    $t->addEntry(Record::getElement("CancelPendingFlag", "N"));
    $t->addEntry(Record::getElement('CustomerName')->setEntity($ent));
    $t->addEntry(Record::getElement('FindingName')->setEntity($ent));
    $t->addEntry(Record::getElement('ServiceAddress')->setAddress($a));
    $t->addEntry(Record::getElement('DirectoryAddress')->setAddress($a));
    $t->addEntry(Record::getElement('ListCode', 'UL'));
    $t->addEntry(Record::getElement('CustomerContact')->setEntity($ent));
    $t->addEntry(Record::getElement('TransactionDate', IPND::renderDate()));
    $t->addEntry(Record::getElement('ServiceStatusDate', IPND::renderDate()));
    $i->addTransaction($t);
}

// Now that you have created the IPND with all its transactions, this outputs
// everything in the correct format.
$i->render();

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2018-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固