models/Question.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Question

Package: Models
Question
Parent(s)
\Zend_Db_Table
Access
public  
Author
Alexander  
Copyright
2012  
Version
$Id$  

Properties

>VPropertypublic$Id2Num = array()
Default valuearray()Details
Type
n/a
>VPropertypublic$Num2Id = array()
Default valuearray()Details
Type
n/a
>VPropertyprivate$_fullTableName
Details
Type
n/a
>VPropertyprivate$_lang = ""
Default value""Details
Type
n/a
>VPropertyprotectedstring $_name = 'questions'
table name
Default value'questions'Details
Type
string
>VPropertypublic$answers
Details
Type
n/a
>VPropertypublic$child
Details
Type
n/a
>VPropertypublic$id
Details
Type
n/a

Methods

methodpublicaddQuestion(mixed $quest, boolean $pos = false) :

Add new question

Parameters
NameTypeDescription
$questmixed
$posboolean
methodpublicbyId(integer $id) : object

Get question by id

Parameters
NameTypeDescription
$idinteger
Returns
TypeDescription
object
methodpubliccopySameAns(integer $parent_id, integer $child_id) : void

Copy same answers for matrix same type

Parameters
NameTypeDescription
$parent_idinteger
$child_idinteger
methodpubliccopyTo(mixed $question, mixed $to_id, integer $start_pos = 1, integer $parent_id = 0) : void

Copy question to another questionnaire

Parameters
NameTypeDescription
$questionmixed
$to_idmixed
$start_posinteger
$parent_idinteger
methodpubliccreateTarnslateTables( $qs_id) : void

Create tables t[q_num]=q_id and t2[q_id]=q_num

Parameters
NameTypeDescription
$qs_id
methodpublicgetAll(mixed $qs_is, string $lang = '') : array | null

Get all question with children array in quesrionnaire

Parameters
NameTypeDescription
$qs_ismixed
$langstring
Returns
TypeDescription
array | null
methodpublicgetAllFlat(mixed $qs_is) : array

Get all question with children array in quesrionnaire without Parent-Child by ID only

Parameters
NameTypeDescription
$qs_ismixed
Returns
TypeDescription
array
methodpublicgetAllQuestionNumbersById( $qs_id) : array

Get all question numwer for questionnnaire

Parameters
NameTypeDescription
$qs_id
Returns
TypeDescription
array
methodpublicgetAns(mixed $id) : \Zend_Db_Table_Rowset_Abstract

Get answer by question id

Parameters
NameTypeDescription
$idmixed
Returns
TypeDescription
\Zend_Db_Table_Rowset_Abstract
methodpublicgetBinds(mixed $id) :

Get binds for question

Parameters
NameTypeDescription
$idmixed
methodpublicgetById(integer $id) : object

Get question by id

Parameters
NameTypeDescription
$idinteger
Returns
TypeDescription
object
methodpublicgetByPos( $pos, integer $qs_id) : object

Get question by iposition

Parameters
NameTypeDescription
$pos
$qs_idinteger
Returns
TypeDescription
object
methodpublicgetChild(mixed $id) : \Zend_Db_Table_Rowset_Abstract

Get children of question

Parameters
NameTypeDescription
$idmixed
Returns
TypeDescription
\Zend_Db_Table_Rowset_Abstract
methodpublicgetColChild(mixed $id) : \Zend_Db_Table_Rowset_Abstract

Get column questions

Parameters
NameTypeDescription
$idmixed
Returns
TypeDescription
\Zend_Db_Table_Rowset_Abstract
methodpublicgetExportInfo(mixed $qs_is, boolean $full = false,  $lang) : array

Get all question with children array in questionnaire

Parameters
NameTypeDescription
$qs_ismixed
$fullboolean
$lang
Returns
TypeDescription
array
methodpublicgetFullChild(mixed $id, string $cur_lang = '') : array

Get all question childs + answers

Parameters
NameTypeDescription
$idmixed
$cur_langstring
Returns
TypeDescription
array
methodpublicgetIdByBum(integer $num, integer $qs_id) : object

Get by number

Parameters
NameTypeDescription
$numinteger
$qs_idinteger
Returns
TypeDescription
object
methodpublicgetLang() : string

get language of question

Returns
TypeDescription
string
methodpublicgetNAList( $qs_id = 0,  $lang = "") : void

Parameters
NameTypeDescription
$qs_id
$lang
methodpublicgetQstId(integer $question_id) : object

Get questionnaire id

Parameters
NameTypeDescription
$question_idinteger
Returns
TypeDescription
object
methodpublicgetQuoted(integer $qs_id) : array

Get quota type questions

Parameters
NameTypeDescription
$qs_idinteger
Returns
TypeDescription
array
methodpublicinit() : void

methodpublicsetLang(string $lang) : void

Set language

Parameters
NameTypeDescription
$langstring
methodpublicupdatePos(integer $qs_id) : void

Update position

Parameters
NameTypeDescription
$qs_idinteger
methodpublicupdatePosParent(integer $parent_id) : void

Update position of parent

Parameters
NameTypeDescription
$parent_idinteger
Documentation was generated by phpDocumentor 2.8.5.