public function __construct(Contact $contact) { $this->email = $contact->email; $data = new Data("User"); $this->connectionTable = $data->getTable("Connection"); $this->profileTable = $data->getTable("Profile"); }
public static function getFromEmail($email) { $data = new Data("User"); $table = $data->getTable("Profile"); return new Contact($table->getBy("email", $email)); }