You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
856 B
48 lines
856 B
<?php
|
|
|
|
namespace BusinessClass;
|
|
|
|
abstract class Question implements IResponseProcessingStrategy, IPrintQuestionStrategy
|
|
{
|
|
private int $id;
|
|
private string $content;
|
|
|
|
/**
|
|
* @param int $id
|
|
* @param string $content
|
|
*/
|
|
public function __construct(int $id, string $content)
|
|
{
|
|
$this->id = $id;
|
|
$this->content = $content;
|
|
}
|
|
|
|
public abstract function responseStrategy();
|
|
|
|
public abstract function printStrategy(): string;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getContent(): string
|
|
{
|
|
return $this->content;
|
|
}
|
|
|
|
/**
|
|
* @param string $content
|
|
*/
|
|
public function setContent(string $content): void
|
|
{
|
|
$this->content = $content;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
}
|