models/Answer.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Answer

Package: Models
Answer model
Parent(s)
\Zend_Db_Table_Abstract
Access
public  
Author
Alexander  
Version
$Id$  

Constants

>VConstant  NA_VALUE_NUMERIC = -99999
>VConstant  NA_VALUE_TEXT = "NA_SELECTION"

Properties

>VPropertyprotectedstring $_name = 'answers'
table name
Default value'answers'Details
Type
string
>VPropertypublic$id
Details
Type
n/a

Methods

methodpublicaddAnswers(mixed $question_id, mixed $answers) : void

Add answers to question

Parameters
NameTypeDescription
$question_idmixed
$answersmixed
methodpublicgetByQuestion(mixed $id, string $lang = '',  $orparent = true) : \Zend_Db_Table_Rowset_Abstract

Get all answers by question id

Parameters
NameTypeDescription
$idmixed
$langstring
$orparent
Returns
TypeDescription
\Zend_Db_Table_Rowset_Abstract
methodpublicgetByQuestionIdExt(integer $id) : array

Return list of answers to question. If no answers - create "virtual answer" with id=0 and text=open

Parameters
NameTypeDescription
$idinteger

// question Id

Returns
TypeDescription
array
methodpublicupdatePos(integer $qs_id) : void

Update aswers postions for question

Parameters
NameTypeDescription
$qs_idinteger
Documentation was generated by phpDocumentor 2.8.5.