emanueleminotto/faker-bundle

为 Symfony 2 提供 Faker 库的 Bundle

1.0.1 2015-02-18 02:23 UTC

This package is auto-updated.

Last update: 2024-08-28 06:41:38 UTC


README

Build Status SensioLabs Insight Coverage Status Scrutinizer Code Quality Total Downloads

为 Symfony 2 提供的 Faker 库的 Bundle。

API: emanueleminotto.github.io/FakerBundle

步骤 1: 下载 Bundle

打开命令行,进入项目目录并执行以下命令以下载此 Bundle 的最新稳定版本

$ composer require --dev emanueleminotto/faker-bundle

此命令要求您全局安装 Composer,如 Composer 文档中的安装章节所述。

步骤 2: 启用 Bundle

然后,通过在您的项目中的 app/AppKernel.php 文件中添加以下行来启用 Bundle

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
        );

        if (...) {
            // ...
            $bundles[] = new EmanueleMinotto\FakerBundle\FakerBundle();
        }
    }
}

用法

没有更多要求,您现在可以使用 faker 服务。

阅读

许可证

此 Bundle 采用 MIT 许可证。请参阅 Bundle 中的完整许可证。

Resources/meta/LICENSE