Public Member Functions | |
| ilMetaTechnical (&$a_meta_data) | |
| Constructor. | |
| getId () | |
| getType () | |
| delete ($a_id, $a_type) | |
| delete all technical meta data of given object static | |
| create () | |
| create | |
| readTechnicalSections (&$a_meta_obj) | |
| reads all technical sections from db into a meta data object note: there should be max. | |
| addFormat ($a_format) | |
| Format. | |
| getFormats () | |
| setSize ($a_size) | |
| Size. | |
| getSize () | |
| addLocation ($a_type, $a_loc) | |
| Location. | |
| getLocations () | |
| addRequirementSet ($a_requirement_set) | |
| Requirements. | |
| getRequirementSets () | |
| setInstallationRemarks ($a_remarks) | |
| Installation Remarks. | |
| setInstallationRemarksLanguage ($a_lang) | |
| getInstallationRemarksLanguage () | |
| getInstallationRemarks () | |
| setOtherRequirements ($a_requirements) | |
| Other Platform Requirements. | |
| setOtherRequirementsLanguage ($a_lang) | |
| getOtherRequirementsLanguage () | |
| getOtherRequirements () | |
| setDuration ($a_duration) | |
| Duration. | |
| getDuration () | |
| getXML () | |
Data Fields | |
| $ilias | |
| $meta_data | |
| $tech_id | |
| $formats | |
| $size | |
| $locations | |
| $requirement_sets | |
| $install_lang | |
| $install_remarks | |
| $other_req | |
| $other_req_lang | |
| $duration | |
Definition at line 34 of file class.ilMetaTechnical.php.
| ilMetaTechnical::addFormat | ( | $ | a_format | ) |
Format.
| string | $a_format mime type |
Definition at line 200 of file class.ilMetaTechnical.php.
{
$this->formats[] = $a_format;
}
| ilMetaTechnical::addLocation | ( | $ | a_type, | |
| $ | a_loc | |||
| ) |
Location.
Definition at line 227 of file class.ilMetaTechnical.php.
{
$this->locations[] = array("type" => $a_type, "loc" => $a_loc);
}
| ilMetaTechnical::addRequirementSet | ( | $ | a_requirement_set | ) |
Requirements.
| array | $a_requirement array( |
Definition at line 243 of file class.ilMetaTechnical.php.
{
$this->requirement_sets[] = $a_requirement_set;
}
| ilMetaTechnical::create | ( | ) |
create
Definition at line 109 of file class.ilMetaTechnical.php.
References $q, $row, and getType().
{
$q = "INSERT INTO meta_technical ".
"(obj_id, obj_type, size, install_remarks, install_remarks_lang,".
"other_requirements, other_requirements_lang, duration) ".
" VALUES ('".$this->getId()."','".$this->getType()."',".
"'".$this->getSize()."',".
"'".$this->getInstallationRemarks()."',".
"'".$this->getInstallationRemarksLanguage()."',".
"'".$this->getOtherRequirements()."',".
"'".$this->getOtherRequirementsLanguage()."',".
"'".$this->getDuration()."')";
//echo "MetaTechnical::create:$q<br>";
$this->ilias->db->query($q);
$q = "SELECT LAST_INSERT_ID() AS tech_id FROM meta_technical";
$row = $this->ilias->db->getRow($q, DB_FETCHMODE_ASSOC);
$this->tech_id = $row["tech_id"];
//echo "saving...tech_id:".$row["tech_id"].":<br>";
$i = 1;
foreach ($this->locations as $location)
{
//echo "INSERT INTO meta_techn_loc<br>";
$q = "INSERT INTO meta_techn_loc (tech_id, type, location, nr) VALUES".
" ('".$this->tech_id."','".$location["type"]."', '".
$location["loc"]."', '".$i++."')";
$this->ilias->db->query($q);
}
$i = 1;
foreach ($this->formats as $format)
{
//echo "INSERT INTO meta_techn_loc<br>";
$q = "INSERT INTO meta_techn_format (tech_id, format, nr) VALUES
('".$this->tech_id."','".$format."', '".$i++."')";
$this->ilias->db->query($q);
}
}
Here is the call graph for this function:| ilMetaTechnical::delete | ( | $ | a_id, | |
| $ | a_type | |||
| ) |
delete all technical meta data of given object static
TODO: requirements
Definition at line 85 of file class.ilMetaTechnical.php.
References $q.
{
// get locations and delete them
$q = "SELECT * FROM meta_technical WHERE ".
" obj_id='$a_id' AND obj_type='$a_type'";
$tech_set = $this->ilias->db->query($q);
while ($tech_rec = $tech_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$q = "DELETE FROM meta_techn_loc WHERE tech_id = '".$tech_rec["tech_id"]."'";
$this->ilias->db->query($q);
$q = "DELETE FROM meta_techn_format WHERE tech_id = '".$tech_rec["tech_id"]."'";
$this->ilias->db->query($q);
}
// delete technical db records
$q = "DELETE FROM meta_technical WHERE ".
" obj_id='$a_id' AND obj_type='$a_type'";
$this->ilias->db->query($q);
}
| ilMetaTechnical::getDuration | ( | ) |
Definition at line 317 of file class.ilMetaTechnical.php.
{
return $this->duration;
}
| ilMetaTechnical::getFormats | ( | ) |
Definition at line 205 of file class.ilMetaTechnical.php.
{
return $this->formats;
}
| ilMetaTechnical::getId | ( | ) |
Definition at line 69 of file class.ilMetaTechnical.php.
{
return $this->meta_data->getId();
}
| ilMetaTechnical::getInstallationRemarks | ( | ) |
Definition at line 275 of file class.ilMetaTechnical.php.
{
return $this->install_remarks;
}
| ilMetaTechnical::getInstallationRemarksLanguage | ( | ) |
Definition at line 270 of file class.ilMetaTechnical.php.
{
return $this->install_lang;
}
| ilMetaTechnical::getLocations | ( | ) |
Definition at line 232 of file class.ilMetaTechnical.php.
{
return $this->locations;
}
| ilMetaTechnical::getOtherRequirements | ( | ) |
Definition at line 301 of file class.ilMetaTechnical.php.
{
return $this->other_req;
}
| ilMetaTechnical::getOtherRequirementsLanguage | ( | ) |
Definition at line 296 of file class.ilMetaTechnical.php.
{
return $this->other_req_lang;
}
| ilMetaTechnical::getRequirementSets | ( | ) |
Definition at line 248 of file class.ilMetaTechnical.php.
Referenced by getXML().
{
return $this->requirement_sets;
}
Here is the caller graph for this function:| ilMetaTechnical::getSize | ( | ) |
Definition at line 218 of file class.ilMetaTechnical.php.
{
return $this->size;
}
| ilMetaTechnical::getType | ( | ) |
Definition at line 74 of file class.ilMetaTechnical.php.
Referenced by create().
{
return $this->meta_data->getType();
}
Here is the caller graph for this function:| ilMetaTechnical::getXML | ( | ) |
Definition at line 323 of file class.ilMetaTechnical.php.
References $xml, and getRequirementSets().
{
$xml = "<Technical>\n";
foreach ($this->formats as $format)
{
$xml.= "<Format>".$format."</Format>\n";
}
$xml.= "<Size>".$this->getSize()."</Size>\n";
foreach ($this->locations as $location)
{
$xml.= "<Location Type=\"".$location["type"]."\">".$location["loc"]."</Location>\n";
}
$req_sets =& $this->getRequirementSets();
foreach ($req_sets as $req_set)
{
$xml.= $req_set->getXML();
}
$xml.= "</Technical>";
return $xml;
}
Here is the call graph for this function:| ilMetaTechnical::ilMetaTechnical | ( | &$ | a_meta_data | ) |
Constructor.
public
Definition at line 57 of file class.ilMetaTechnical.php.
References $ilias.
Referenced by readTechnicalSections().
{
global $ilias;
$this->ilias =& $ilias;
$this->meta_data =& $a_meta_data;
$this->locations = array();
$this->formats = array();
$this->requirement_sets = array();
}
Here is the caller graph for this function:| ilMetaTechnical::readTechnicalSections | ( | &$ | a_meta_obj | ) |
reads all technical sections from db into a meta data object note: there should be max.
one technical section now, dtd has changed static
Definition at line 155 of file class.ilMetaTechnical.php.
References $query, and ilMetaTechnical().
{
//echo "ilMetaTechnical_read:".$a_meta_obj->getId().":".$a_meta_obj->getType().":<br>";
$query = "SELECT * FROM meta_technical WHERE obj_id='".$a_meta_obj->getId()."' ".
"AND obj_type='".$a_meta_obj->getType()."'";
$tech_set = $this->ilias->db->query($query);
while ($tech_rec = $tech_set->fetchRow(DB_FETCHMODE_ASSOC))
{
//echo "---tech---";
$tech_obj =& new ilMetaTechnical($a_meta_obj);
$tech_obj->setSize($tech_rec["size"]);
$tech_obj->setInstallationRemarks($tech_rec["install_remarks"]);
$tech_obj->setInstallationRemarksLanguage($tech_rec["install_remarks_lang"]);
$tech_obj->setOtherRequirements($tech_rec["other_requirements"]);
$tech_obj->setOtherRequirementsLanguage($tech_rec["other_requirements_lang"]);
$tech_obj->setDuration($tech_rec["duration"]);
// get formats
$query = "SELECT * FROM meta_techn_format WHERE tech_id='".$tech_rec["tech_id"]."'".
" ORDER BY nr";
$format_set = $this->ilias->db->query($query);
while ($format_rec = $format_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$tech_obj->addFormat($format_rec["format"]);
}
// get locations
$query = "SELECT * FROM meta_techn_loc WHERE tech_id='".$tech_rec["tech_id"]."'".
" ORDER BY nr";
$loc_set = $this->ilias->db->query($query);
while ($loc_rec = $loc_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$tech_obj->addLocation($loc_rec["type"], $loc_rec["location"]);
}
$a_meta_obj->addTechnicalSection($tech_obj);
}
//echo "count techs:".count($a_meta_obj->technicals).":<br>";
}
Here is the call graph for this function:| ilMetaTechnical::setDuration | ( | $ | a_duration | ) |
Duration.
| string | $a_duration duration |
Definition at line 312 of file class.ilMetaTechnical.php.
{
$this->duration = $a_duration;
}
| ilMetaTechnical::setInstallationRemarks | ( | $ | a_remarks | ) |
Installation Remarks.
| string | $a_lang language code | |
| string | $a_remarks installation remarks |
Definition at line 260 of file class.ilMetaTechnical.php.
{
$this->install_remarks = $a_remarks;
}
| ilMetaTechnical::setInstallationRemarksLanguage | ( | $ | a_lang | ) |
Definition at line 265 of file class.ilMetaTechnical.php.
{
$this->install_lang = $a_lang;
}
| ilMetaTechnical::setOtherRequirements | ( | $ | a_requirements | ) |
Other Platform Requirements.
| string | $a_remarks requirements |
Definition at line 286 of file class.ilMetaTechnical.php.
{
$this->other_req = $a_requirements;
}
| ilMetaTechnical::setOtherRequirementsLanguage | ( | $ | a_lang | ) |
Definition at line 291 of file class.ilMetaTechnical.php.
{
$this->other_req_lang = $a_lang;
}
| ilMetaTechnical::setSize | ( | $ | a_size | ) |
| ilMetaTechnical::$duration |
Definition at line 49 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$formats |
Definition at line 41 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$ilias |
Definition at line 36 of file class.ilMetaTechnical.php.
Referenced by ilMetaTechnical().
| ilMetaTechnical::$install_lang |
Definition at line 45 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$install_remarks |
Definition at line 46 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$locations |
Definition at line 43 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$meta_data |
Definition at line 38 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$other_req |
Definition at line 47 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$other_req_lang |
Definition at line 48 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$requirement_sets |
Definition at line 44 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$size |
Definition at line 42 of file class.ilMetaTechnical.php.
| ilMetaTechnical::$tech_id |
Definition at line 39 of file class.ilMetaTechnical.php.
1.7.1