Music's quotes to inspire your coding
It is a component used in comodojo to generate random text for tests or error messages.
It gets music quotes from file resources/quotes, where each line represent a single quote.
-
Using composer:
composer require comodojo/qotd 1.* -
Downloading zip from GitHub
Extract zip & include
src/Qotd.phpin your file.
-
Getting a simple random quote:
// create an instance $qotd = new \Comodojo\Qotd(); // get a single quote $quote = $qotd->getQuote();
-
Getting all quotes as array:
// create an instance $qotd = new \Comodojo\Qotd(); // get all quotes $array_of_quotes = $qotd->getQuotes();
-
Getting all quotes in id/quote store form (useful for client-side stores test):
// create an instance $qotd = new \Comodojo\Qotd(); // get all quotes $array_of_quotes = $qotd->getQuotesAsStore();
Fell free to add quotes forking this repo, editing resources/quotes and submitting a pull request.
comodojo/qotd is released under the MIT License (MIT). Please see License File for more information.
