定制 kigkonsult/fakerlocreltypes 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kigkonsult/fakerlocreltypes

Composer 安装命令:

composer require kigkonsult/fakerlocreltypes

包简介

PHP Faker Location-, Relation-, Media-, Incident Object report types and schemaURIs

README 文档

README

PHP Faker Location-, Relation-, Media-, Incident Object report types and schemaURIs

  • Location types as found in rfc4589 'Location Types Registry'

    • "the types of places a human or end system might be found"
  • Link Relation Types as found in Link Relation Types - in reference with rfc8288 Web Linking

    • "...the relationships between resources on the Web ("links") and the type of those relationships"
  • MediaTypes (MIME-Types) as found in mediaTypes

    • application, audio, font, example, image, message, model, multipart, text, video or any type
  • Report enumeration values defined by Incident Object Description Exchange Format (rfc7970),

  • a collection of schema URIs generators

Usage

To use this with Faker, invoke the Kigkonsult\FakerLocRelTypes classes as Faker generators.

Rfc4589

Rfc4589LocationTypes has only one generator. For details, please review rfc4589. The (static) Rfc4589LocationTypes::$locationTypes is available for 'ad Hoc' use.

<?php

use Faker\Factory;
use Kigkonsult\FakerLocRelTypes\Provider\en_US\Rfc4589LocationTypes;

$faker = Factory::create();
$faker->addProvider( new Rfc4589LocationTypes( $faker ));

// Generator
// a random rfc4589 Place Location Type
$locationType = $faker->rfc4589LcationType();
Rfc8288

Rfc8288RelationTypes has only one generator. For details, please review Link Relation Types. The (static) Rfc8288RelationTypes::$relationTypes is available for 'ad Hoc' use.

<?php

use Faker\Factory;
use Kigkonsult\FakerLocRelTypes\Provider\en_US\Rfc8288RelationTypes;

$faker = Factory::create();
$faker->addProvider( new Rfc8288RelationTypes( $faker ));

// Generator
// a random rfc8288 Web Relation Type
$relationType = $faker->rc8288RelationType();
MediaTypes (MIME-types)

The mediaTypes generators are
application, audio, font, example, image, message, model, multipart, text, video or any.

All generator method names are suffixed by MediaType. The generator method anyMediatyoe returns a random mediaType. For details, please review mediaTypes. The (static) MediaTypes::$<mediaType> sources are available for 'ad Hoc' use.

<?php

use Faker\Factory;
use Kigkonsult\FakerLocRelTypes\Provider\MediaTypes;

$faker = Factory::create();
$faker->addProvider( new MediaTypes( $faker ));

// Generator
// a random application mediaType
$applicationType = $faker->applicationMediaType();
Rfc7970

Rfc7970enums has 38 generator methods, all prefixed by rfc7970 : For details, please review iana.org/iodef2.

AddressCategoryEmailTypeRecordPatternType
BulkObservableTypeExpectationActionRegistryHandleRegistry
BusinessImpactSeverityExtensionTypeDtypeRestriction
BusinessImpactTypeHashDataScopeSoftwareReferenceSpecId
ConfidenceRatingHistoryItemActionSoftwareReferenceDtype
ContactRoleIncidentPurposeSoftwareReferenceSpecName
ContactTypeIncidentStatusSystemCategory
CounterDurationIndicatorExpressionOperatorSystemImpactType
CounterTypeIntendedImpactTypeSystemOwnership
CounterUnitKeyRegistryactionTelephone-type
DiscoverySourceNodeRoleCategoryTimeImpactDuration
DomainDataDomainStatusPostalAddressTypeTimeImpactMetric
DomainDataSystemStatusRecordPatternOffsetunit
<?php

use Faker\Factory;
use Kigkonsult\FakerLocRelTypes\Provider\en_US\Rfc7970enums;

$faker = Factory::create();
$faker->addProvider( new Rfc7970enums( $faker ));

// Generator
// a random rfc7970 restriction enumeration value
$restriction = $faker->rfc7970Restriction();
SchemaURIs

Supporting schema URIs :
cid, data, dns *, fax, feed, ftp *, geo *, imap, http, https, ldap *, ldaps *, mailto *, mid, news, nntp, payto *, pop, rsync, sftp *, snews, smb *, ssh *, tel, telnet *, urnUuid, vnc *, webcal, xmpp * or any.

All generator method names are suffixed by Uri. The generator method anyUri returns a random schema URI.

*: without arg, method invoke returns simpler format output, one arg, true, expanded.

For details, please review List_of_URI_schemes.

<?php

use Faker\Factory;
use Kigkonsult\FakerLocRelTypes\Provider\SchemaURI;

$faker = Factory::create();
$faker->addProvider( new SchemaURI( $faker ));

// Generator examples

// a random tel schema Uri
// generate a tel schema Uri like "tel:+13859966391"
$telUri = $faker->telUri();

// a random vnc (extended) schema Uri
// generate a vnc schema Uri like "vnc://nhessel@veniam.schmeler.com:5594?ConnectionName=minima"
$vncUri = $faker->vncUri( true );

Installation

Add the FakerLocRelTypes library to your composer.json file:

composer require kigkonsult/fakerlocreltypes

Sponsorship

Donation using paypal.me/kigkonsult are appreciated. For invoice, please e-mail.

Support

For support go to github.com FakerLocRelTypes

License

This project is licensed under the LGPLv3 License

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2022-03-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固