2017 © Pedro Peláez
 

library faker-placehold-it-provider

placehold.it provider for Faker

image

emanueleminotto/faker-placehold-it-provider

placehold.it provider for Faker

  • Sunday, October 11, 2015
  • by EmanueleMinotto
  • Repository
  • 1 Watchers
  • 7 Stars
  • 5,294 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

PlaceholdIt Provider

Build Status SensioLabs Insight Coverage Status Scrutinizer Code Quality Total Downloads, (*1)

placehold.it provider for Faker., (*2)

API: emanueleminotto.github.io/PlaceholdItProvider, (*3)

Install

Install Silex using Composer., (*4)

Install the PlaceholdItProvider adding emanueleminotto/faker-placehold-it-provider to your composer.json or from CLI:, (*5)

$ composer require emanueleminotto/faker-placehold-it-provider

Usage

$faker = Faker\Factory::create();
$faker->addProvider(new EmanueleMinotto\Faker\PlaceholdItProvider($faker));

// size
$url = $faker->imageUrl(50); // http://placehold.it/50.gif
$url = $faker->imageUrl('50x100'); // http://placehold.it/50x100.gif
$url = $faker->imageUrl(array(50, 100)); // http://placehold.it/50x100.gif
$url = $faker->imageUrl(array('w' => 100, 'h' => 50)); // http://placehold.it/50x100.gif

// format
// can be gif, jpeg, jpg or png
$url = $faker->imageUrl(50); // http://placehold.it/50.gif
$url = $faker->imageUrl(50, 'jpeg'); // http://placehold.it/50.jpeg
$url = $faker->imageUrl(50, 'jpg'); // http://placehold.it/50.jpg
$url = $faker->imageUrl(50, 'png'); // http://placehold.it/50.png

// colors
$url = $faker->imageUrl(50, null, array('000', 'fff')); // http://placehold.it/50.gif/000/fff
$url = $faker->imageUrl(50, null, array('w' => 100, 'h' => 100)); // http://placehold.it/50.gif/000/fff

// text
$url = $faker->imageUrl(50, null, array(), 'lorem ipsum'); // http://placehold.it/50.gif?text=lorem+ipsum

The Versions

11/10 2015

dev-master

9999999-dev

placehold.it provider for Faker

  Sources   Download

MIT

The Requires

 

The Development Requires

faker provider placeholder

30/01 2015

1.0.0

1.0.0.0

placehold.it provider for Faker

  Sources   Download

MIT

The Requires

 

The Development Requires

faker provider placeholder