The default importer class.
Expects the importing document to contain one
working sheet (set of data).
Methods
Constructor
__construct(\Webenq_Import_Adapter_Abstract $adapter, string $language)
Inherited
inherited_from |
\Webenq_Import_Abstract::__construct() |
Parameters
$language
string
Converts the data retrieved from the adapter to an array with questions
as keys and answers as array with values.
_getDataAsAnswers(array $data) : array
Inherited
inherited_from |
\Webenq_Import_Abstract::_getDataAsAnswers() |
Parameters
$data
array
Data retrieved from the adapter
Returns
array
Questions as keys and answers as array with values
Factors an instance of Webenq_Import_Abstract, depending on the
given type.
factory(string $type, \Webenq_Import_Adapter_Abstract $adapter, string $language) : \Webenq_Import_Abstract
InheritedStatic
inherited_from |
\Webenq_Import_Abstract::factory() |
Parameters
$type
string
$language
string
Returns
Runs the import process
import() : void
Return a collection of questionnaire-questions based on the
provided array with questions and ansers
_getQuestionnaireQuestions(array $questionsAndAnswers, string $language) : \Doctrine_Collection
Parameters
$questionsAndAnswers
array
$language
string
Returns
\Doctrine_Collection
Collection of questionnaire-question objects
Calculates the number of answers and returns a colllection of
respondent objects corresponding with the number of answers.
_getRespondents(array $questionsAndAnswers) : \Doctrine_Collection
Parameters
$questionsAndAnswers
array
Returns
\Doctrine_Collection
Collection of respondent objects
Stores the questions
_storeQuestionsAndAnswers() : \Webenq_Import_Default
fluent |
This method is part of a fluent interface and will return the same instance |
Returns
Properties
$supportedTypes : array
Inherited
inherited_from |
\Webenq_Import_Abstract::$$supportedTypes |
$_language : string
Inherited
inherited_from |
\Webenq_Import_Abstract::$$_language |