PHP Class Faker\Provider\Image

Inheritance: extends Faker\Provider\Base
Show file Open project: fzaninotto/faker Class Usage Examples

Protected Properties

Property Type Description
$categories

Public Methods

Method Description
image ( $dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null ) Download a remote random image to disk and return its location
imageUrl ( $width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false ) Generate the URL that will return a random image

Method Details

image() public static method

Requires curl, or allow_url_fopen to be on in php.ini.
public static image ( $dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null )

imageUrl() public static method

Set randomize to false to remove the random GET parameter at the end of the url.
public static imageUrl ( $width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false )

Property Details

$categories protected static property

protected static $categories