function ARC_simple_model::get_resources in Taxonomy import/export via XML 6
Same name and namespace in other branches
- 5.2 arc/ARC_simple_model.php \ARC_simple_model::get_resources()
- 5 arc/ARC_simple_model.php \ARC_simple_model::get_resources()
- 6.2 arc/ARC_simple_model.php \ARC_simple_model::get_resources()
File
- arc/
ARC_simple_model.php, line 142
Class
Code
function get_resources($type = "") {
if ($type) {
if (is_array($type)) {
$result = array();
$added_resources = array();
for ($i = 0, $i_max = count($type); $i < $i_max; $i++) {
$cur_type = $type[$i];
$cur_resources = $this->typed_resources[$this
->get_abbr_val($cur_type)];
for ($j = 0, $j_max = count($cur_resources); $j < $j_max; $j++) {
$cur_resource = $cur_resources[$j];
$cur_resource_identifier = $cur_resource["val"];
if (!$added_resources[$cur_resource_identifier]) {
$result[] = $cur_resource;
$added_resources[$cur_resource_identifier] = true;
}
}
}
return $result;
}
else {
return $this->typed_resources[$this
->get_abbr_val($type)];
}
}
else {
return $this->resources;
}
}