30,6 → 30,14 |
protected $urns = array(); |
|
/** |
* <code>true</code> generates form controls for submitting test case |
* results |
* |
* @var bool |
*/ |
protected $testcase = false; |
|
/** |
* The list of language features |
* |
* @var array[Features] |
53,7 → 61,8 |
{ |
$aVars = get_class_vars(get_class($this)); |
|
while ((list($key, $value) = each($aVars))) |
|
foreach ($aVars as $key => $value) |
{ |
if (isset($a[$key])) |
{ |
83,15 → 92,29 |
} |
} |
|
/* |
* Protected properties may be read, but not written |
*/ |
public function __get($property) |
{ |
if (property_exists(get_class($this), $property)) |
{ |
return $this->$property; |
} |
} |
|
public function printHeaders() |
{ |
foreach ($this->versions as $ver) |
foreach ($this->versions as $key => $ver) |
{ |
if ($key || $this->testcase) |
{ |
?> |
<th><?php echo $ver; ?></th> |
<?php |
} |
} |
} |
|
/** |
* Prints the list of features. |
222,7 → 245,7 |
{ |
$aVars = get_class_vars(__CLASS__); |
|
while ((list($key, $value) = each($aVars))) |
foreach ($aVars as $key => $value) |
{ |
if (isset($params[$key])) |
{ |
419,9 → 442,11 |
?></th> |
<?php |
$versions = $this->versions; |
$testcase = false; |
if (!is_null($this->list)) |
{ |
$versions =& $this->list->versions; |
$testcase = $this->list->testcase; |
} |
|
static $row = 0; |
435,6 → 460,8 |
$column++; |
$id = "td$row-$column"; |
$ver = isset($thisVersions[$key]) ? $thisVersions[$key] : ''; |
if ($key || $testcase) |
{ |
?> |
<td<?php |
if (!$key) |
466,6 → 493,14 |
. ' a manual test."'; |
} |
} |
else |
{ |
echo ' title="' |
. htmlspecialchars( |
preg_replace('/<.*?>/', '', $value), |
ENT_COMPAT, FEATURES_ENCODING) |
. '"'; |
} |
?>><?php |
if ($key) |
{ |
479,13 → 514,14 |
} |
else |
{ |
if (!empty($ver)) |
if (!empty($ver) && $testcase) |
{ |
?><script type="text/javascript"> |
// <![CDATA[ |
var s = test(<?php echo $ver; ?>, '<span title="Supported">+<\/span>', |
'<span title="Not supported">−<\/span>'); |
tryThis("document.write(s);", |
var s = test(<?php echo $ver; ?>, |
'<input title="Supported" name="<?php echo htmlspecialchars($this->title, ENT_COMPAT, FEATURES_ENCODING); ?>" value="+" readonly>', |
'<input title="Not supported" name="<?php echo htmlspecialchars($this->title, ENT_COMPAT, FEATURES_ENCODING); ?>" value="−" readonly>'); |
jsx.tryThis("document.write(s);", |
"document.getElementById('<?php echo $id; ?>').appendChild(" |
+ "document.createTextNode(s));"); |
// ]]> |
499,6 → 535,7 |
?></td> |
<?php |
} |
} |
?> |
</tr> |
<?php |