yaroslavche / un-cefact
dev-master
2019-09-08 16:44 UTC
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2024-09-09 04:23:53 UTC
README
联合国贸易便利化和电子业务中心(UN/CEFACT)是联合国欧洲经济委员会(UNECE)的附属政府间机构,它作为联合国经济和社会理事会贸易便利化建议和电子业务标准的焦点机构。它拥有全球会员资格,其成员来自政府间组织、各国当局以及商界。
安装
$ composer require yaroslavche\un-cefact:dev-master
用法
<?php use Yaroslavche\UnCefact\CommonCode\CommonCodeInterface; use Yaroslavche\UnCefact\CommonCode\NoUnit; use Yaroslavche\UnCefact\CommonCode\SpaceAndTime\Radian; use Yaroslavche\UnCefact\CommonCodeFactory; use Yaroslavche\UnCefact\UnCefact; NoUnit::COMMON_CODE; // 'C62' NoUnit::CONVERSION_FACTOR; // '1' NoUnit::DESCRIPTION; // 'Synonym: unit' NoUnit::GROUP_ID; // null NoUnit::GROUP_NUMBER; // null NoUnit::LEVEL; // '1' NoUnit::NAME; // 'one' NoUnit::QUANTITY; // null NoUnit::SECTOR; // null NoUnit::STATUS; // null NoUnit::SYMBOL; // '1' $radian = new Radian(); $radian->getCommonCode(); // 'C81' $radian->getConversionFactor(); // 'rad'; $radian->getDescription(); // null $radian->getGroupId(); // 2 $radian->getGroupNumber(); // 1 $radian->getLevel(); // '1' $radian->getName(); // 'radian' $radian->getQuantity(); // 'angle (plane)' $radian->getSector(); // 'Space and Time' $radian->getStatus(); // null $radian->getSymbol(); // 'rad' /** @var string $angleDegreeClass FQCN */ $angleDegreeClass = UnCefact::DD; // AngleDegree::class /** @var CommonCodeInterface $angleDegree */ $angleDegree = CommonCodeFactory::get($angleDegreeClass); // AngleDegree::class object $angleDegree = new $angleDegreeClass(); // eq