Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

jmhobbs/K3-Faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A fake data generator for Kohana

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages