Skip to content

Instantly share code, notes, and snippets.

@nubs
Created October 26, 2015 13:58
Show Gist options
  • Save nubs/8d1078440ec7c651898e to your computer and use it in GitHub Desktop.
Save nubs/8d1078440ec7c651898e to your computer and use it in GitHub Desktop.
Example random name generator project

Example Random Name Generator

This is a sample project for the nubs/random-name-generator composer package.

Instructions

First, install the dependencies (I created the composer.json file by running composer require nubs/random-name-generator):

composer install

Then execute the sample script - you should see a random video game name and a random alliterative name:

php test.php
{
"require": {
"nubs/random-name-generator": "^0.2.0"
}
}
<?php
require('vendor/autoload.php');
$vgng = new \Nubs\RandomNameGenerator\Vgng();
$alliteration = new \Nubs\RandomNameGenerator\Alliteration();
echo "{$vgng->getName()} | {$alliteration->getName()}\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment