Documentation

AnswersManager
in package

Class AnswersManager

Tags
category

Managers

subpackage

Models

Table of Contents

COLUMN_COMMENT  = 'comment'
COLUMN_ID  = 'id'
COLUMN_IS_RIGHT  = 'is_right'
COLUMN_QUESTION_ID  = 'question_id'
COLUMN_SORT  = 'sort'
COLUMN_TEXT  = 'text'
TABLE_NAME  = 'answers'
$database  : Context
__construct()  : mixed
add()  : array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable
deleteQuestionAnswers()  : int
Deletes question answer
get()  : ActiveRow
getAnswerByQuestionAndTitle()  : ActiveRow|null
getAnswersQuestion()  : array<string|int, ActiveRow>
Get answers question
getAnswersQuestionWithMeta()  : mixed
getIsRightAnswerQuestion()  : array<string|int, ActiveRow>
update()  : ActiveRow

Constants

COLUMN_QUESTION_ID

public string COLUMN_QUESTION_ID = 'question_id'

Properties

Methods

__construct()

public __construct(Context $database) : mixed
Parameters
$database : Context
Return values
mixed

add()

public add(iteratable<string|int, mixed> $data) : array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable
Parameters
$data : iteratable<string|int, mixed>
Tags
throws
QuestionInvalidId
Return values
array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable

deleteQuestionAnswers()

Deletes question answer

public deleteQuestionAnswers( $question_id) : int
Parameters
$question_id :
Tags
throws
QuestionInvalidId
Return values
int

getAnswerByQuestionAndTitle()

public getAnswerByQuestionAndTitle(string $text, int $question_id) : ActiveRow|null
Parameters
$text : string
$question_id : int
Return values
ActiveRow|null

getAnswersQuestion()

Get answers question

public getAnswersQuestion( $question_id) : array<string|int, ActiveRow>
Parameters
$question_id :
Return values
array<string|int, ActiveRow>

getAnswersQuestionWithMeta()

public getAnswersQuestionWithMeta(mixed $question_id) : mixed
Parameters
$question_id : mixed
Return values
mixed

getIsRightAnswerQuestion()

public getIsRightAnswerQuestion( $question_id) : array<string|int, ActiveRow>
Parameters
$question_id :
Tags
throws
QuestionInvalidId
Return values
array<string|int, ActiveRow>

Search results