forked from caius/php-faker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFaker.class.php
More file actions
64 lines (47 loc) · 1.23 KB
/
Faker.class.php
File metadata and controls
64 lines (47 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
if (count(spl_autoload_functions()) <= 0)
{
require_once dirname(__FILE__) . '/autoload.php';
}
final class Faker
{
function __set ($property, $value)
{
throw new Exception('Unknow property "' . $property . '"');
}
private static $address;
public static function address ()
{
return self::$address ? self::$address : self::$address = new fkAddress();
}
private static $company;
public static function company ()
{
return self::$company ? self::$company : self::$company = new fkCompany();
}
private static $internet;
public static function internet ()
{
return self::$internet ? self::$internet : self::$internet = new fkInternet();
}
private static $lorem;
public static function lorem ()
{
return self::$lorem ? self::$lorem : self::$lorem = new fkLorem();
}
private static $name;
public static function name ()
{
return self::$name ? self::$name : self::$name = new fkName();
}
private static $phone;
public static function phoneNumber ()
{
return self::$phone ? self::$phone : self::$phone = new fkPhoneNumber();
}
private static $date;
public static function date ()
{
return self::$date ? self::$date : self::$date = new fkDate();
}
}