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.
33 lines
824 B
33 lines
824 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()
|
|
{
|
|
// TODO: Implement responseStrategy() method.
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function printStrategy(): string // Possibilité de rajouter l'id de la question en parametre
|
|
{ // pour la mettre en id du input afin de la lier à ça question
|
|
$content = $this->getContent();
|
|
|
|
return "\t\t\t<div class='question'>
|
|
<label>$content</label>
|
|
<input type='text' name='answers[]' />
|
|
</div>\n";
|
|
}
|
|
} |