Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A fake data generator for Kohana

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 classes
Octocat-spinner-32 config
Octocat-spinner-32 guide
Octocat-spinner-32 views
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 TODO
Octocat-spinner-32 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.