文件操作 - Factory.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/give/src/TestData/Framework/Factory.php
编辑文件内容
<?php namespace Give\TestData\Framework; use Faker\Generator; abstract class Factory implements FactoryContract { use ProviderForwarder; /** @var Generator */ protected $faker; public function __construct(Generator $faker) { $this->faker = $faker; } /** * @param int $count * * @return \Generator */ public function make($count) { for ($i = 0; $i < $count; $i++) { yield $this->definition(); } } /** * Always generate consistent data * * @param bool $consistent * * @return Factory */ public function consistent($consistent = true) { if ($consistent) { $this->faker->seed(mt_getrandmax()); } return $this; } abstract public function definition(); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件