Skip to content

Instantly share code, notes, and snippets.

@jinkrish
Last active June 1, 2016 11:40
Show Gist options
  • Save jinkrish/007262163c51571f8d0bf633b5c0db2e to your computer and use it in GitHub Desktop.
Save jinkrish/007262163c51571f8d0bf633b5c0db2e to your computer and use it in GitHub Desktop.
<?php
interface questionInterface{
public function setAuthor(Author $author);
}
class Question implements questionInterface {
private $author;
private $question;
public function __construct($question) {
$this->question = $question;
}
public function setAuthor(Author $author) {
$this->author = $author;
}
public function getAuthor() {
return $this->author;
}
public function getQuestion() {
return $this->question;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment