Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A fake data generator for Kohana
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
classes
config
guide/faker
views/faker
LICENSE
README.md
TODO
doxygen.cfg

README.md

K3-Faker Module

A Ko3 Module by John Hobbs of Little Filament, Inc.

Introduction

This module provides a lazy-loading, modular, locale aware fake data generator for Kohana 3.1.x.

It is inspired by (and borrows data from) Ruby's Faker gem, and Perl's Data::Faker

Installation

K3-Faker is a simple, standard module.

  1. Drop the source in your MODPATH folder.
  2. Add the module to Kohana::modules in your bootstrap.php

Usage

Use the module methods from Faker:

echo 'Name: ' . Faker::Name()->name();

Output:

Name: Abbigail Vandervort

Additionally, if you have no arguments, you can now act as if the module method is a property.

echo 'Name: ' . Faker::Name()->name;

An alternate syntax is to use the factory style (thanks @gevans):

echo 'Name: ' . Faker::factory( 'name' )->name;

Full documentation is available online

Inspiration / Credit

Something went wrong with that request. Please try again.