Created
October 29, 2010 21:29
-
-
Save ornicar/654464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @mongodb:Document | |
*/ | |
class Band | |
{ | |
/** | |
* @mongodb:Field(type="string") | |
* @var string | |
*/ | |
protected $name; | |
} | |
/** | |
* @mongodb:Document | |
*/ | |
class Artist | |
{ | |
/** | |
* @mongodb:Field(type="string") | |
* @var string | |
*/ | |
protected $name; | |
} | |
/** | |
* @mongodb:Document | |
*/ | |
class Performer | |
{ | |
/** | |
* @mongodb:ReferenceOne(targetDocument="Artist") | |
* @var Artist | |
*/ | |
protected $artist; | |
/** | |
* @mongodb:ReferenceOne(targetDocument="Band") | |
* @var Band | |
*/ | |
protected $band; | |
/** | |
* @mongodb:EmbedOne(targetDocument="Image") | |
* @var Image | |
*/ | |
protected $photo; | |
/** | |
* @mongodb:Field(type="string") | |
* @var string | |
*/ | |
protected $instrument; | |
} | |
/** | |
* @mongodb:EmbeddedDocument | |
*/ | |
class Image | |
{ | |
/** | |
* Relative path like "artist/alainsouchon.bmp" | |
* | |
* mongodb:Field(type="string") | |
* @var string | |
*/ | |
protected $path; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment