springbokagency/faker-xpdo-orm-adapter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

springbokagency/faker-xpdo-orm-adapter

Composer 安装命令:

composer require springbokagency/faker-xpdo-orm-adapter

包简介

A Faker ORM adapter to populate xPDO objects with fake data

README 文档

README

A Faker ORM adapter to populate xPDO objects with fake data.

Table of contents

Installation

Install as development dependency using Composer.

$ composer require --dev springbokagency/faker-xpdo-orm-adapter

Usage

To populate xPDO objects, create a new populator class (using a generator instance as first parameter, and a valid xPDO instance as second parameter), then list the class and number of all the objects that must be generated. To launch the actual data population, call the execute() method.

Here is an example showing how to populate 5 modUser and 10 modResource objects:

<?php
$generator = \Faker\Factory::create();
$populator = new \SpringbokAgency\Faker\ORM\xPDO\Populator($generator, $xpdo);
$populator->addEntity(\MODX\Revolution\modUser::class, 5);
$populator->addEntity(\MODX\Revolution\modResource::class, 10);
$insertedPKs = $populator->execute();

For more info read the Faker documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固