26 foreach ($modules as $module) {
27 foreach ($module->attr_collections as $coll_i => $coll) {
28 if (!isset($this->info[$coll_i])) {
29 $this->info[$coll_i] = array();
31 foreach ($coll as $attr_i => $attr) {
32 if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) {
34 $this->info[$coll_i][$attr_i] = array_merge(
35 $this->info[$coll_i][$attr_i],
40 $this->info[$coll_i][$attr_i] = $attr;
45 foreach ($this->info as $name => $attr) {
60 if (!isset($attr[0])) {
66 for ($i = 0; isset($merge[$i]); $i++) {
67 if (isset($seen[$merge[$i]])) {
70 $seen[$merge[$i]] =
true;
72 if (!isset($this->info[$merge[$i]])) {
75 foreach ($this->info[$merge[$i]] as $key => $value) {
76 if (isset($attr[$key])) {
81 if (isset($this->info[$merge[$i]][0])) {
83 $merge = array_merge($merge, $this->info[$merge[$i]][0]);
101 foreach ($attr as $def_i => $def) {
107 if (isset($processed[$def_i])) {
112 if ($required = (strpos($def_i,
'*') !==
false)) {
114 unset($attr[$def_i]);
115 $def_i = trim($def_i,
'*');
116 $attr[$def_i] = $def;
119 $processed[$def_i] =
true;
122 if (is_object($def)) {
124 $attr[$def_i]->required = ($required || $attr[$def_i]->required);
128 if ($def ===
false) {
129 unset($attr[$def_i]);
133 if (
$t = $attr_types->get($def)) {
135 $attr[$def_i]->required = $required;
137 unset($attr[$def_i]);