Skip to content
Music's quotes to inspire your coding
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources
src
tests
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

comodojo/qotd

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Music's quotes to inspire your coding

WTF?

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.

Installation

  • Using composer:

    composer require comodojo/qotd 1.*

  • Downloading zip from GitHub

    Extract zip & include src/Qotd.php in your file.

Usage

  • 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();
    

Documentation

Contributing

Fell free to add quotes forking this repo, editing resources/quotes and submitting a pull request.

License

comodojo/qotd is released under the MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.