Question class definition
This class has been auto-generated by the Doctrine ORM Framework
package | Webenq_Models |
---|---|
author | Bart Huttinga |
subpackage | |
version | SVN: $Id: Builder.php,v 1.2 2011/07/12 13:39:03 bart Exp $ |
addAnswer(\Webenq_Model_Answer | string $answer, \Respondent $respondent) : \Webenq_Model_Question
fluent | This method is part of a fluent interface and will return the same instance |
---|
\Respondent
addAnswers(array $answers, array $respondents) : \Webenq_Model_Question
fluent | This method is part of a fluent interface and will return the same instance |
---|
array
array
addInvalidType(string $invalidType)
string
Class names
addInvalidTypes(array $invalidTypes)
array
Array of valid class names
addQuestionText(string $language, string $text) : \Webenq_Model_Question
fluent | This method is part of a fluent interface and will return the same instance |
---|
string
The language to set the text for
string
The question text for the given language
addQuestionTexts(array $texts) : \Webenq_Model_Question
fluent | This method is part of a fluent interface and will return the same instance |
---|
array
Array with language codes as keys and question texts as values
addValidType(string $validType)
string
Class names
addValidTypes(array $validTypes)
array
Array of valid class names
answersGiven(array $values) : bool
array
Array with values
bool
True if any answers, false otherwiseautocomplete($term, $lang, $limit)
count() : int
int
Number of valuescountUnique() : int
int
Number of unique valuescountUniqueExcludingNullValues() : int
int
Number of unique valuesdiffLen() : int
int
Difference in lengthfactory(array $answers, string $language) : \Webenq_Model_Question
The provided data is used for detecting the proper question type, but is not included in the returned question object because answers can only be added to questions that are connected to a questionnaire (which is beyond the scope of this factory).
array
Array of answer values to test against
string
findByQuestionText($questionText, $language)
getAnswerValues() : array
array
An array with answer valuesgetInvalidTypes() : array
array
getQuestionText(string $language) : \Webenq_Model_QuestionText
getQuestionnaires() : \Doctrine_Collection
\Doctrine_Collection
getUniqueValues() : array
array
getUniqueValuesExcludingNullValues() : array
array
getValidTypes() : array
array
isNumeric() : bool
bool
True or falseisType(\Webenq_Model_Question $question, string $language) : bool
string
bool
True if is this type, false otherwisemaxLen() : int
int
Length of the value with the biggest lengthmaxVal() : string
string
Biggest valueminLen() : int
int
Length of the value with the smallest lengthminVal() : string
string
Smallest valuepreInsert($event)
search(string $term, string $lang, $limit) : \Doctrine_Collection
If no language is given, all languages are searched.
string
string
\Doctrine_Collection
containing instances of QuestionsetAnswerValues(array $answers)
array
An array with answer values
setInvalidTypes(array $types)
array
Array of class names
setQuestionnaire(\Questionnaire $questionnaire)
setTableDefinition()
inherited_from | \Webenq_Model_Base_Question::setTableDefinition() |
---|
setUp()
inherited_from | \Webenq_Model_Base_Question::setUp() |
---|
setValidTypes(array $types)
array
Array of class names
_determineType(\Webenq_Model_Question $callingObject, string $language) : \Webenq_Model_Question
$children : array
$_answerValues : array
Used for quickly storing answer values, i.e. by the factory method. Storing all answers as Webenq_Model_Answer objects would cause unnecessary overhead.
$_invalidTypes : array
$_questionnaire
$_validTypes : array