|
WriteDataObjects
How to write a data object for use with Junction
Junction Quick-startWriting a data object for JunctionAfter saving your mapping file it's time to create a data object. Junction operates on ordinary PHP objects -- which means you can extend, implement what you will, and that you can write whatever methods you want. That said there are two requirements placed on the data object by Junction.
Sample data objectclass JunctionUser {
private $_id;
private $_email;
private $_password;
private $_created;
public function __construct() {
}
public function getId() {
return $this->_id;
}
public function setId($id) {
$this->_id = $id;
}
public function getEmail() {
return $this->_email;
}
public function setEmail($email) {
$this->_email = $email;
}
public function getPassword() {
return $this->_password;
}
public function setPassword($password) {
$this->_password = $password;
}
public function getDate() {
return $this->_created;
}
public function setDate($date) {
$this->_created = $date;
}
}Go on to PerformCrud, or back to the JunctionQuickStart |
Sign in to add a comment