/** * tests some Conifg */ public function testConfig() { $char = CharacterSet::model(); $this->assertType('string', $char->tableName()); $this->assertType('string', $char->primaryKey()); $this->assertType('array', $char->relations()); }
/** * Constructor * * @param string mode (objects/schemata) * @param string selected schema (when mode == objects) */ public function __construct() { @set_time_limit(0); if ($timeLimit = ini_get('max_execution_time')) { $this->timeLimit = (int) $timeLimit; } $this->partialImport = isset($_POST['ImportPage']['partialImport']) && $_POST['ImportPage']['partialImport']; $characterSets = CharacterSet::model()->findAll(); foreach ($characterSets as $characterSet) { $this->characterSets[] = array('name' => $characterSet->CHARACTER_SET_NAME, 'title' => Yii::t('collation', $characterSet->CHARACTER_SET_NAME)); } }
/** * Extracts attribute contents FROM a parent tree object * * @param array $tree an array containing an array FROM which the * object data should be extracted * @param string $ver represents the version of the GEDCOM standard * data is being extracted from * * @return void * * @access public * @since Method available since Release 0.0.1 */ public function parse_tree($tree, $ver) { if (isset($tree[0][1])) { $sub2 = $tree[0][1]; $this->ged_c->parse_tree($sub2, $ver); if (empty($ver)) { $ver = $this->ged_c->ver; } $this->source_system->parse_tree($sub2, $ver); if (($i1 = parent::find_tag($sub2, Rp_Tags::DEST)) !== false) { $this->destination_system = parent::parse_text($sub2[$i1], Rp_Tags::DEST); } if (($i1 = parent::find_tag($sub2, Rp_Tags::DATE)) !== false) { $this->transmission_date_time = parent::parse_text($sub2[$i1], Rp_Tags::DATE); if (isset($sub2[$i1][1])) { if (($i2 = parent::find_tag($sub2[$i1][1], Rp_Tags::TIME)) !== false) { $this->transmission_date_time .= ' ' . parent::parse_text($sub2[$i1][1][$i2], Rp_Tags::TIME); } } } if (($i1 = parent::find_tag($sub2, Rp_Tags::FILE)) !== false) { $this->filename = parent::parse_text($sub2[$i1], Rp_Tags::FILE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::COPYRIGHT)) !== false) { $this->copyright = parent::parse_text($sub2[$i1], Rp_Tags::COPYRIGHT); } if (($i1 = parent::find_tag($sub2, Rp_Tags::LANGUAGE)) !== false) { $this->language = parent::parse_text($sub2[$i1], Rp_Tags::LANGUAGE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMITTER)) !== false) { $this->submitter_id = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMITTER); } if (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMISSION)) !== false) { $this->submission_id = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMISSION); } $this->character_set->parse_tree($sub2, $ver); $this->note->parse_tree($sub2, $ver); if (($i1 = parent::find_tag($sub2, Rp_Tags::PLACE)) !== false) { if (isset($sub2[$i1][1])) { if (($i2 = parent::find_tag($sub2[$i1][1], Rp_Tags::FORM)) !== false) { $this->place_form = parent::parse_text($sub2[$i1][1][$i2], Rp_Tags::FORM); } } } } }