Skip to content

Instantly share code, notes, and snippets.

@collegeman
Created May 7, 2010 22:12
Show Gist options
  • Save collegeman/394057 to your computer and use it in GitHub Desktop.
Save collegeman/394057 to your computer and use it in GitHub Desktop.
Thinking about Muse
<?php
// create a new artist
$srv = new Artist('Stevie Ray Vaughan');
$srv->played[] = 'Electric Guitar';
$srv->influences[] = new Artist('Jimi Hendrix');
$srv->influences[] = new Artist('Buddy Guy');
$srv->save();
// create another new artist
$layton = new Artist('Chris Layton');
$layton->played[] = 'Drums';
$layton->save();
// one more for good measure
$shannon = new Artist('Tommy Shannon');
$shannon->played[] = 'Electric Bass';
$shannon->save();
// these guys played together
band('Stevie Ray Vaughan and Double Trouble', array($srv, $layton, $shannon));
// so did these guys
$lets_dance = album("Let's Dance", array($srv, new Artist('David Bowie')), array("released" => 1983));
@kennethreitz
Copy link

Documentation-driven development?

@collegeman
Copy link
Author

Trying to capture some ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment