Created
February 24, 2011 11:13
-
-
Save johnwards/842054 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(db="woformbuilder",collection="forms") | |
*/ | |
class FormBuilder | |
{ | |
/** @mongodb:Id */ | |
private $id; | |
/** | |
* @validation:NotBlank | |
* @mongodb:Field(type="string") | |
*/ | |
private $name; | |
/** | |
* @validation:NotBlank | |
* @mongodb:Field(type="string") | |
*/ | |
private $short_url; | |
/** | |
* @validation:NotBlank | |
* @mongodb:Field(type="string") | |
*/ | |
private $welcome_text; | |
/** | |
* @validation:NotBlank | |
* @validation:AssertType("boolean") | |
* @mongodb:Field(type="boolean") | |
*/ | |
private $self_registration; | |
/** | |
* @mongodb:ReferenceMany(targetDocument="Page") | |
*/ | |
private $pages; | |
public function setName($name) | |
{ | |
$this->name = $name; | |
} | |
public function getName() | |
{ | |
return $this->name; | |
} | |
public function setSelfRegistration($self_registration) { | |
$this->self_registration = $self_registration; | |
} | |
public function getSelfRegistration() { | |
return $this->self_registration; | |
} | |
public function setShortUrl($short_url) { | |
$this->short_url = $short_url; | |
} | |
public function getShortUrl() { | |
return $this->short_url; | |
} | |
public function setWelcomeText($welcome_text) { | |
$this->welcome_text = $welcome_text; | |
} | |
public function getWelcomeText() { | |
return $this->welcome_text; | |
} | |
public function setId($id) { | |
$this->id = $id; | |
} | |
public function getId() { | |
return $this->id; | |
} | |
public function setPages($pages) { | |
$this->pages = $pages; | |
} | |
public function getPages() { | |
return $this->pages; | |
} | |
} |
This file contains hidden or 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(db="woformbuilder",collection="pages") | |
*/ | |
class Page | |
{ | |
/** @mongodb:Id */ | |
private $id; | |
/** @mongodb:Field */ | |
private $title; | |
/** | |
* @mongodb:EmbedMany(targetDocument="Element") | |
*/ | |
private $elements = array(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment