24 error_reporting(E_ALL);
27 if ((php_sapi_name() ==
'cli')) {
28 if (isset($_SERVER[
'argv'][1])) $SYSTEM_ROOT = $_SERVER[
'argv'][1];
29 $err_msg =
"You need to supply the path to the System Root as the first argument\n";
32 if (isset($_GET[
'SYSTEM_ROOT'])) $SYSTEM_ROOT = $_GET[
'SYSTEM_ROOT'];
34 <div style="background-color: red; color: white; font-weight: bold;">
35 You need to supply the path to the System Root as a query string variable called SYSTEM_ROOT
40 if (empty($SYSTEM_ROOT)) {
45 if (!is_dir($SYSTEM_ROOT) || !is_readable($SYSTEM_ROOT.
'/core/include/init.inc')) {
46 echo
"ERROR: Path provided doesn't point to a Matrix installation's System Root. Please provide correct path and try again.\n";
50 require_once $SYSTEM_ROOT.
'/core/include/init.inc';
52 $am = &$GLOBALS[
'SQ_SYSTEM']->am;
54 $design_area_types = $am->getTypeDescendants(
'design_area');
55 $design_types = $am->getTypeDescendants(
'design');
56 $design_types[] =
'design';
59 $all_design_area_types = array_diff($design_area_types, $design_types);
61 $design_areas = Array();
63 foreach ($all_design_area_types as $type_code) {
64 #pre_echo($type_code.' : '.$am->getTypeInfo($type_code, 'instantiable'));
65 if ($am->getTypeInfo($type_code,
'instantiable')) $design_areas[] = $type_code;
74 <title>Settable Attributes
for Instantiable
Design Areas</title>
75 <style type=
"text/css">
77 font-family: verdana, arial, sans-serif;
79 background-color: #ffffff;
92 background-color: #000000;
101 foreach ($design_areas as $type_code) {
103 $am->includeAsset($type_code);
104 $da =
new $type_code();
106 $setable_vars = $da->vars;
107 $protected_vars = $da->getProtectedAttrs();
110 echo $type_code,
" ", str_repeat(
'-', 80 - (strlen($type_code) + 1)),
"\n";
115 <th
class=
"type-code" colspan=
"3"><?php echo $type_code; ?></th>
118 <th width=
"20%">Var Name</th>
119 <th width=
"10%">Type</th>
120 <th width=
"70%">Description</th>
125 ksort($setable_vars);
127 foreach ($setable_vars as $var_name => $info) {
128 if (in_array($var_name, $protected_vars) || $info[
'type']==
'serialise')
continue;
129 $attr = $da->getAttribute($var_name);
130 $desc = $attr->description;
132 if ($info[
'type'] ==
'selection') {
133 if (!SQ_PHP_CLI) $desc .=
'<pre>';
135 $desc .=
"\t\tOptions : \n";
136 foreach ($attr->_params[
'options'] as $value => $text) {
137 $desc .=
"\t\t\t".$value.
' => '.$text.
"\n";
139 if (!SQ_PHP_CLI) $desc .=
'</pre>';
143 echo
"\t-> ", $var_name,
"\t" , $info[
'type'],
"\t", $desc,
"\n";
147 <td><?php echo $var_name; ?></th>
148 <td><?php echo $info[
'type']; ?></th>
149 <td><?php echo $desc; ?></th>
157 echo str_repeat(
'-', 80),
"\n\n";