etelford/faker-instrument-names

An instrument name generator for Faker.

v1.0.3 2021-03-28 14:54 UTC

This package is auto-updated.

Last update: 2025-04-29 00:43:48 UTC


README

Generate random instrument names with the help of fzaninotto/Faker.

Names of instruments were pulled and parsed from MusicBrainz.

Installation

composer.json:

"require": {
    "etelford/faker-instrument-names": "*"
}

Example

Make an instance of Faker and an instance of the InstrumentFaker, add it as a provider and call the instrument method you want.

$faker = \Faker\Factory::create();
$generator = new \Etelford\InstrumentFaker($faker);
$faker->addProvider($generator);

// Get a random instrument name
echo $faker->instrument;

// Get a random wind instrument name
echo $faker->windInstrument;

// Get a random string instrument name
echo $faker->stringInstrument;

// Get a random percussion instrument name
echo $faker->percussionInstrument;

// Get a random electronic instrument name
echo $faker->electronicInstrument;