This class has been auto-generated by the Doctrine ORM Framework
package |
Webenq_Models |
subpackage |
|
author |
Nivocer |
version |
SVN: $Id: Builder.php,v 1.2 2011/07/12 13:39:03 bart Exp $ |
Methods
Adds an answer to the current question
addAnswer(\Webenq_Model_Answer | string $answer, \Respondent $respondent) : \Webenq_Model_Base_Question_Closed_Scale_Four
Inherited
inherited_from |
\Webenq_Model_Question::addAnswer() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addAnswer() |
inherited_from |
\Webenq_Model_Question_Closed::addAnswer() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addAnswer() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addAnswer() |
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$respondent
\Respondent
Returns
Adds a collection of answers to the current question
addAnswers(array $answers, array $respondents) : \Webenq_Model_Base_Question_Closed_Scale_Four
Inherited
inherited_from |
\Webenq_Model_Question::addAnswers() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addAnswers() |
inherited_from |
\Webenq_Model_Question_Closed::addAnswers() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addAnswers() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addAnswers() |
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$answers
array
$respondents
array
Returns
Add a type that has not been validated
addInvalidType(string $invalidType)
Inherited
inherited_from |
\Webenq_Model_Question::addInvalidType() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addInvalidType() |
inherited_from |
\Webenq_Model_Question_Closed::addInvalidType() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addInvalidType() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addInvalidType() |
Parameters
$invalidType
string
Class names
Add an array of types that have not been validated
addInvalidTypes(array $invalidTypes)
Inherited
inherited_from |
\Webenq_Model_Question::addInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::addInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addInvalidTypes() |
Parameters
$invalidTypes
array
Array of valid class names
Sets the question text for a given language
addQuestionText(string $language, string $text) : \Webenq_Model_Base_Question_Closed_Scale_Four
Inherited
inherited_from |
\Webenq_Model_Question::addQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed::addQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addQuestionText() |
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$language
string
The language to set the text for
$text
string
The question text for the given language
Returns
Sets the question texts for every language
addQuestionTexts(array $texts) : \Webenq_Model_Base_Question_Closed_Scale_Four
Inherited
inherited_from |
\Webenq_Model_Question::addQuestionTexts() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addQuestionTexts() |
inherited_from |
\Webenq_Model_Question_Closed::addQuestionTexts() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addQuestionTexts() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addQuestionTexts() |
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$texts
array
Array with language codes as keys and question texts as values
Returns
Add a type that has been validated
addValidType(string $validType)
Inherited
inherited_from |
\Webenq_Model_Question::addValidType() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addValidType() |
inherited_from |
\Webenq_Model_Question_Closed::addValidType() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addValidType() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addValidType() |
Parameters
$validType
string
Class names
Add an array of types that have been validated
addValidTypes(array $validTypes)
Inherited
inherited_from |
\Webenq_Model_Question::addValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::addValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::addValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::addValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::addValidTypes() |
Parameters
$validTypes
array
Array of valid class names
Checks if at least one answer is not-empty
answersGiven(array $values) : bool
InheritedStatic
inherited_from |
\Webenq_Model_Question::answersGiven() |
inherited_from |
\Webenq_Model_Base_Question_Closed::answersGiven() |
inherited_from |
\Webenq_Model_Question_Closed::answersGiven() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::answersGiven() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::answersGiven() |
Parameters
$values
array
Array with values
Returns
bool
True if any answers, false otherwise
autocomplete()
autocomplete($term, $lang, $limit)
InheritedStatic
inherited_from |
\Webenq_Model_Question::autocomplete() |
inherited_from |
\Webenq_Model_Base_Question_Closed::autocomplete() |
inherited_from |
\Webenq_Model_Question_Closed::autocomplete() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::autocomplete() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::autocomplete() |
Parameters
$term
$lang
$limit
Counts the number of values
count() : int
Inherited
inherited_from |
\Webenq_Model_Question::count() |
inherited_from |
\Webenq_Model_Base_Question_Closed::count() |
inherited_from |
\Webenq_Model_Question_Closed::count() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::count() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::count() |
Returns
int
Number of values
Counts the number of unique values
countUnique() : int
Inherited
inherited_from |
\Webenq_Model_Question::countUnique() |
inherited_from |
\Webenq_Model_Base_Question_Closed::countUnique() |
inherited_from |
\Webenq_Model_Question_Closed::countUnique() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::countUnique() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::countUnique() |
Returns
int
Number of unique values
Counts the number of unique values, excluding null values
countUniqueExcludingNullValues() : int
Inherited
inherited_from |
\Webenq_Model_Question::countUniqueExcludingNullValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed::countUniqueExcludingNullValues() |
inherited_from |
\Webenq_Model_Question_Closed::countUniqueExcludingNullValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::countUniqueExcludingNullValues() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::countUniqueExcludingNullValues() |
Returns
int
Number of unique values
Finds the maximum difference in length of the values
diffLen() : int
Inherited
inherited_from |
\Webenq_Model_Question::diffLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed::diffLen() |
inherited_from |
\Webenq_Model_Question_Closed::diffLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::diffLen() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::diffLen() |
Returns
int
Difference in length
Factors a question object of the right type
factory(array $answers, string $language) : \Webenq_Model_Question
InheritedStatic
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).
inherited_from |
\Webenq_Model_Question::factory() |
inherited_from |
\Webenq_Model_Base_Question_Closed::factory() |
inherited_from |
\Webenq_Model_Question_Closed::factory() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::factory() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::factory() |
Parameters
$answers
array
Array of answer values to test against
$language
string
Returns
findByQuestionText()
findByQuestionText($questionText, $language)
InheritedStatic
inherited_from |
\Webenq_Model_Question::findByQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed::findByQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed::findByQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::findByQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::findByQuestionText() |
Parameters
$questionText
$language
Generates a barchart
generateBarchart(string $file, integer $width, integer $height) : void
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::generateBarchart() |
Parameters
Returns the answer values
getAnswerValues() : array
Inherited
inherited_from |
\Webenq_Model_Question::getAnswerValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getAnswerValues() |
inherited_from |
\Webenq_Model_Question_Closed::getAnswerValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getAnswerValues() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getAnswerValues() |
Returns
array
An array with answer values
Gets all types for which this question would not validate
getInvalidTypes() : array
Inherited
inherited_from |
\Webenq_Model_Question::getInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::getInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getInvalidTypes() |
Returns
array
Convert percentages into negative/neutral/positive percentages
getNegativeNeutralPositivePercentages() : array
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::getNegativeNeutralPositivePercentages() |
Returns
array
Percentages
Get an array with values/percentages pairs
getPercentages() : array
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::getPercentages() |
Returns
array
Array with unique values as keys and percentages as values
Gets the question text in the given, current or preferred language
getQuestionText(string $language) : \Webenq_Model_QuestionText
Inherited
inherited_from |
\Webenq_Model_Question::getQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed::getQuestionText() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getQuestionText() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getQuestionText() |
Parameters
$language
string
Exceptions
Returns
Returns the questionnaires using this question
getQuestionnaires() : \Doctrine_Collection
Inherited
inherited_from |
\Webenq_Model_Question::getQuestionnaires() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getQuestionnaires() |
inherited_from |
\Webenq_Model_Question_Closed::getQuestionnaires() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getQuestionnaires() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getQuestionnaires() |
Returns
\Doctrine_Collection
Returns the defined scale values
getScaleValues() : array
InheritedStatic
inherited_from |
\Webenq_Model_Question_Closed_Scale::getScaleValues() |
Returns
array
Scale values
Returns unique values
getUniqueValues() : array
Inherited
inherited_from |
\Webenq_Model_Question::getUniqueValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getUniqueValues() |
inherited_from |
\Webenq_Model_Question_Closed::getUniqueValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getUniqueValues() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getUniqueValues() |
Returns
array
Returns unique values
getUniqueValuesExcludingNullValues() : array
Inherited
inherited_from |
\Webenq_Model_Question::getUniqueValuesExcludingNullValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getUniqueValuesExcludingNullValues() |
inherited_from |
\Webenq_Model_Question_Closed::getUniqueValuesExcludingNullValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getUniqueValuesExcludingNullValues() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getUniqueValuesExcludingNullValues() |
Returns
array
Gets all types for which this question would validate
getValidTypes() : array
Inherited
inherited_from |
\Webenq_Model_Question::getValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::getValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::getValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::getValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::getValidTypes() |
Returns
array
Determines whether the values are numeric values only
isNumeric() : bool
Inherited
inherited_from |
\Webenq_Model_Question::isNumeric() |
inherited_from |
\Webenq_Model_Base_Question_Closed::isNumeric() |
inherited_from |
\Webenq_Model_Question_Closed::isNumeric() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::isNumeric() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::isNumeric() |
Returns
bool
True or false
Checks if the given result set validates for this type
isType(\Webenq_Model_Question $question, string $language) : bool
InheritedStatic
inherited_from |
\Webenq_Model_Question_Closed_Scale::isType() |
Parameters
$language
string
Returns
bool
True if is this type, false otherwise
Finds the length of the value with the biggest lenth
maxLen() : int
Inherited
inherited_from |
\Webenq_Model_Question::maxLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed::maxLen() |
inherited_from |
\Webenq_Model_Question_Closed::maxLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::maxLen() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::maxLen() |
Returns
int
Length of the value with the biggest length
Finds the biggest value
maxVal() : string
Inherited
inherited_from |
\Webenq_Model_Question::maxVal() |
inherited_from |
\Webenq_Model_Base_Question_Closed::maxVal() |
inherited_from |
\Webenq_Model_Question_Closed::maxVal() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::maxVal() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::maxVal() |
Returns
string
Biggest value
Finds the length of the value with the smallest lenth
minLen() : int
Inherited
inherited_from |
\Webenq_Model_Question::minLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed::minLen() |
inherited_from |
\Webenq_Model_Question_Closed::minLen() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::minLen() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::minLen() |
Returns
int
Length of the value with the smallest length
Finds the smallest value
minVal() : string
Inherited
inherited_from |
\Webenq_Model_Question::minVal() |
inherited_from |
\Webenq_Model_Base_Question_Closed::minVal() |
inherited_from |
\Webenq_Model_Question_Closed::minVal() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::minVal() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::minVal() |
Returns
string
Smallest value
otherValuesThanDefinedValid()
otherValuesThanDefinedValid()
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::otherValuesThanDefinedValid() |
preInsert()
preInsert($event)
Inherited
inherited_from |
\Webenq_Model_Question::preInsert() |
inherited_from |
\Webenq_Model_Base_Question_Closed::preInsert() |
inherited_from |
\Webenq_Model_Question_Closed::preInsert() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::preInsert() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::preInsert() |
Parameters
$event
Searches the question repository for the given term in the given language.
search(string $term, string $lang, $limit) : \Doctrine_Collection
InheritedStatic
If no language is given, all languages are searched.
inherited_from |
\Webenq_Model_Question::search() |
inherited_from |
\Webenq_Model_Base_Question_Closed::search() |
inherited_from |
\Webenq_Model_Question_Closed::search() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::search() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::search() |
Parameters
$term
string
$lang
string
$limit
Returns
\Doctrine_Collection
containing instances of Question
Sets the answer values
setAnswerValues(array $answers)
Inherited
inherited_from |
\Webenq_Model_Question::setAnswerValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed::setAnswerValues() |
inherited_from |
\Webenq_Model_Question_Closed::setAnswerValues() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::setAnswerValues() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::setAnswerValues() |
Parameters
$answers
array
An array with answer values
Sets the types for which the data would not validate
setInvalidTypes(array $types)
Inherited
inherited_from |
\Webenq_Model_Question::setInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::setInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::setInvalidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::setInvalidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::setInvalidTypes() |
Parameters
$types
array
Array of class names
setQuestionnaire()
setQuestionnaire(\Questionnaire $questionnaire)
Inherited
inherited_from |
\Webenq_Model_Question::setQuestionnaire() |
inherited_from |
\Webenq_Model_Base_Question_Closed::setQuestionnaire() |
inherited_from |
\Webenq_Model_Question_Closed::setQuestionnaire() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::setQuestionnaire() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::setQuestionnaire() |
Parameters
$questionnaire
setTableDefinition()
setTableDefinition()
Inherited
inherited_from |
\Webenq_Model_Base_Question::setTableDefinition() |
inherited_from |
\Webenq_Model_Question::setTableDefinition() |
inherited_from |
\Webenq_Model_Base_Question_Closed::setTableDefinition() |
inherited_from |
\Webenq_Model_Question_Closed::setTableDefinition() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::setTableDefinition() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::setTableDefinition() |
Sets the types for which the data would validate
setValidTypes(array $types)
Inherited
inherited_from |
\Webenq_Model_Question::setValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed::setValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed::setValidTypes() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::setValidTypes() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::setValidTypes() |
Parameters
$types
array
Array of class names
Determines the question type based on the data provided
_determineType(\Webenq_Model_Question $callingObject, string $language) : \Webenq_Model_Question
Inherited
inherited_from |
\Webenq_Model_Question::_determineType() |
inherited_from |
\Webenq_Model_Base_Question_Closed::_determineType() |
inherited_from |
\Webenq_Model_Question_Closed::_determineType() |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::_determineType() |
inherited_from |
\Webenq_Model_Question_Closed_Scale::_determineType() |
Parameters
$language
string
Returns
Properties
$children : array
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$children |
$_answerValues : array
Inherited
Used for quickly storing answer values, i.e. by the factory
method. Storing all answers as Webenq_Model_Answer objects
would cause unnecessary overhead.
inherited_from |
\Webenq_Model_Question::$$_answerValues |
inherited_from |
\Webenq_Model_Base_Question_Closed::$$_answerValues |
inherited_from |
\Webenq_Model_Question_Closed::$$_answerValues |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::$$_answerValues |
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$_answerValues |
$_groups
Inherited
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$_groups |
$_invalidTypes : array
Inherited
inherited_from |
\Webenq_Model_Question::$$_invalidTypes |
inherited_from |
\Webenq_Model_Base_Question_Closed::$$_invalidTypes |
inherited_from |
\Webenq_Model_Question_Closed::$$_invalidTypes |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::$$_invalidTypes |
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$_invalidTypes |
$_questionnaire
Inherited
inherited_from |
\Webenq_Model_Question::$$_questionnaire |
inherited_from |
\Webenq_Model_Base_Question_Closed::$$_questionnaire |
inherited_from |
\Webenq_Model_Question_Closed::$$_questionnaire |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::$$_questionnaire |
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$_questionnaire |
$_validTypes : array
Inherited
inherited_from |
\Webenq_Model_Question::$$_validTypes |
inherited_from |
\Webenq_Model_Base_Question_Closed::$$_validTypes |
inherited_from |
\Webenq_Model_Question_Closed::$$_validTypes |
inherited_from |
\Webenq_Model_Base_Question_Closed_Scale::$$_validTypes |
inherited_from |
\Webenq_Model_Question_Closed_Scale::$$_validTypes |