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)
stringClass names
addInvalidTypes(array $invalidTypes)
arrayArray 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 |
|---|
stringThe language to set the text for
stringThe 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 |
|---|
arrayArray with language codes as keys and question texts as values
addValidType(string $validType)
stringClass names
addValidTypes(array $validTypes)
arrayArray of valid class names
answersGiven(array $values) : bool
arrayArray with values
boolTrue if any answers, false otherwiseautocomplete($term, $lang, $limit)
count() : int
intNumber of valuescountUnique() : int
intNumber of unique valuescountUniqueExcludingNullValues() : int
intNumber of unique valuesdiffLen() : int
intDifference 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).
arrayArray of answer values to test against
string
findByQuestionText($questionText, $language)
getAnswerValues() : array
arrayAn array with answer valuesgetInvalidTypes() : array
arraygetQuestionText(string $language) : \Webenq_Model_QuestionText
getQuestionnaires() : \Doctrine_Collection
\Doctrine_CollectiongetUniqueValues() : array
arraygetUniqueValuesExcludingNullValues() : array
arraygetValidTypes() : array
arrayisNumeric() : bool
boolTrue or falseisType(\Webenq_Model_Question $question, string $language) : bool
string
boolTrue if is this type, false otherwisemaxLen() : int
intLength of the value with the biggest lengthmaxVal() : string
stringBiggest valueminLen() : int
intLength of the value with the smallest lengthminVal() : string
stringSmallest valuepreInsert($event)
search(string $term, string $lang, $limit) : \Doctrine_Collection
If no language is given, all languages are searched.
string
string
\Doctrine_Collectioncontaining instances of QuestionsetAnswerValues(array $answers)
arrayAn array with answer values
setInvalidTypes(array $types)
arrayArray 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)
arrayArray 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