/** * */ public function __construct($options = array()) { parent::__construct($options); $data = common_ext_ExtensionsManager::singleton()->getExtensionById('tao')->getConfig(self::WHITELIST_KEY); if (is_array($data)) { $this->controllers = $data; } }
/** * PropertyWriter constructor. * Check if property config key is set and if property exists * * @param array $params * @throws InconsistencyConfigException */ public function __construct(array $params = []) { parent::__construct($params); if (!$this->hasOption(self::PROPERTY_KEY)) { throw new InconsistencyConfigException('Unable to find config key "' . self::PROPERTY_KEY . '" as property to write.'); } if (!$this->getProperty($this->getOption(self::PROPERTY_KEY))->exists()) { throw new InconsistencyConfigException('Config key "' . self::PROPERTY_KEY . '" found, ' . 'but property "' . $this->getOption(self::PROPERTY_KEY) . '" does not exist.'); } }
/** * Create a new TestCategoryRulesService instance. * * This constructor allows you to instantiate a new TestCategoryRulesService object with the following options available: * * * 'score-variable-identifier' (string) : The identifier of the item session outcome variable to be used when generating <testVariables> based rules. * * 'weight-identifier' (string) : The identifier of the item reference weight to be used when generating <testVariables> based rules. * * 'category-exclusions' (array) : An array of PCREs describing what are the categories to be excluded from the rule generation process. * * 'flags' (integer) : A binary flags configuration of the rule generation process composed by values described by the TestCategoryRulesGenerator class constants. * * @param array $options (optional) An optional array of options. */ public function __construct(array $options = array()) { parent::__construct($options); \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest'); $generator = new TestCategoryRulesGenerator(); $generator->setScoreVariableIdentifier(empty($options['score-variable-identifier']) ? 'SCORE' : (string) $options['score-variable-identifier']); $generator->setWeightIdentifier(array_key_exists('weight-identifier', $options) ? (string) $options['weight-identifier'] : ''); $generator->setCategoryExclusions(empty($options['category-exclusions']) ? array() : $options['category-exclusions']); $this->setGenerator($generator); }
/** * Constructor of the smooth model, expects a persistence in the configuration * * @param array $configuration * @throws common_exception_MissingParameter */ public function __construct($options = array()) { if (!isset($options['inner'])) { throw new common_exception_MissingParameter('inner', __CLASS__); } parent::__construct($options); $inner = $this->getInnerModel(); $this->rdf = new WrapperRdf($inner->getRdfInterface(), $this); $this->rdfs = new WrapperRdfs($inner->getRdfsInterface(), $this->getWorkspaceModel()->getRdfsInterface()); }
public function __construct(array $options) { parent::__construct($options); if (!$this->hasOption('fileLocation')) { throw new ExtractorException('File location config is not correctly set.'); } $this->extractors = $this->getOption('extractors'); $this->columns = $this->getOption('columns'); if (!$this->extractors || !$this->columns) { throw new ExtractorException('Data config is not correctly set.'); } }
public function __construct(array $options = array()) { parent::__construct($options); foreach ($this->contentValidation as $key => &$array) { foreach ($array as &$value) { $value = __DIR__ . $value; } } foreach ($this->manifestValidation as $key => &$array) { foreach ($array as &$value) { $value = __DIR__ . $value; } } }
/** * TestSessionHistoryService constructor. * @param array $options */ public function __construct(array $options = []) { parent::__construct($options); $this->proctorRole = new \core_kernel_classes_Resource('http://www.tao.lu/Ontologies/TAOProctor.rdf#ProctorRole'); }
/** * TestModel constructor. * @param array $options */ public function __construct($options = array()) { common_ext_ExtensionsManager::singleton()->getExtensionById('taoTestLinear'); // loads the extension parent::__construct($options); }
public function __construct(array $options = array()) { $this->deliveryExecutionService = \taoDelivery_models_classes_execution_ServiceProxy::singleton(); parent::__construct($options); }
/** * default constructor to ensure the implementation * can be instanciated * @param array $options * */ public function __construct($options = array()) { parent::__construct($options); \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest'); }