models/Condition.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Condition

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

Constants

>VConstant  TYPE_CONTENT = 1
>VConstant  TYPE_ORDER = 2
>VConstant  TYPE_QUOTA = 3
>VConstant  TYPE_COUNT = 4
>VConstant  TYPE_CROSS_COUNT = 5
>VConstant  TYPE_OPEN_NUMBER = 6

Properties

>VPropertyprotectedstring $_name = 'conditions'
table name
Default value'conditions'Details
Type
string
>VPropertypublic$all_proj
Details
Type
n/a
>VPropertyprivate$all_quest
Details
Type
n/a
>VPropertypublic$cfields = array()
Default valuearray()Details
Type
n/a
>VPropertypublic$id
Details
Type
n/a
>VPropertyprivate$new_ans = array()
Default valuearray()Details
Type
n/a
>VPropertyprivate$qs_id
Details
Type
n/a

Methods

methodpublic_make_prew(mixed $data) :

make preview condition from object

Parameters
NameTypeDescription
$datamixed
methodpubliccid2pos(integer $id) : integer

Convert C variable from position to id

Parameters
NameTypeDescription
$idinteger
Returns
TypeDescription
integer
methodpublicconditionProjectAnswersCount(integer $projectId, array $aAnswers) : integer
static

Calculate summary count of answers in given project

Parameters
NameTypeDescription
$projectIdinteger
$aAnswersarray
Returns
TypeDescription
integer
methodpubliccpos2id(integer $pos) : integer

Convert C variable position to id

Parameters
NameTypeDescription
$posinteger
Returns
TypeDescription
integer
methodpublicgetAllByQs(integer $qs_id) : array

Get all quesstions for questionnaire

Parameters
NameTypeDescription
$qs_idinteger
Returns
TypeDescription
array
methodpublicid2num(integer $id) : integer

Convert question id to number

Parameters
NameTypeDescription
$idinteger
Returns
TypeDescription
integer
methodpublicid2numAns(integer $quest_id, integer $ans) : integer

Convert answers ans to numbers

Parameters
NameTypeDescription
$quest_idinteger
$ansinteger
Returns
TypeDescription
integer
methodpublicinitQuest(integer $qs_id) : void

Init questionnaire data

Parameters
NameTypeDescription
$qs_idinteger
methodpublicmanual2obj(string $cur_script) : object

Process manual condition(text) to object

Parameters
NameTypeDescription
$cur_scriptstring
Returns
TypeDescription
object
methodpublicnum2id( $num) : void

Parameters
NameTypeDescription
$num
methodpublicnum2idAns(integer $quest_id, string $num) : integer

Convert number of answer to id

Parameters
NameTypeDescription
$quest_idinteger
$numstring
Returns
TypeDescription
integer
methodpublicparseIf(integer $for_quest, array $data) : object

Parse condition part from text to object

Parameters
NameTypeDescription
$for_questinteger
$dataarray
Returns
TypeDescription
object
methodpublicsetNewAnswers(object $answers) : void

Set new anwers

Parameters
NameTypeDescription
$answersobject
Documentation was generated by phpDocumentor 2.8.5.