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.
34 lines
666 B
34 lines
666 B
<?php
|
|
|
|
namespace BusinessClass;
|
|
|
|
class TextQuestion extends Question
|
|
{
|
|
/**
|
|
* @param string $content
|
|
* @param int $id
|
|
*/
|
|
public function __construct(string $content, int $id)
|
|
{
|
|
parent::__construct($id, $content);
|
|
}
|
|
|
|
public function responseStrategy(): void
|
|
{
|
|
echo "Implement responseStrategy() method.";
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function printStrategy(): string
|
|
{
|
|
$content = $this->getContent();
|
|
|
|
return "\t\t\t<div class='question'>
|
|
<label>$content</label>
|
|
<input type='text' name='answers[]' />
|
|
</div>\n";
|
|
}
|
|
}
|