PHP Classes
elePHPant
Icontem

File: example/app/site/views/test-match.phtml

Recommend this page to a friend!
  Classes of Rafael Rodriguez  >  Div PHP Ways  >  example/app/site/views/test-match.phtml  >  Download  
File: example/app/site/views/test-match.phtml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Div PHP Ways
Route HTTP requests to registered handlers
Author: By
Last change:
Date: 1 year ago
Size: 1,055 bytes
 

Contents

Class file image Download
<?php include "../app/site/views/header.html"; ?>

<style>
    tr.highlight:hover {
        background: yellow;
    }
</style>

<h2>Tests</h2>

<h2>Testing matches between ways and patterns</h2>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
    <tr>
        <th></th>
        <th width="20%">Pattern</th>
        <th width="20%">Way</th>
        <th width="20%">Match</th>
        <th>Args</th>
    </tr>

	<?php foreach($pairs as $title => $pair): ?>

		<?php $pattern = $pair[0]; ?>
		<?php $way = $pair[1]; ?>
		<?php $xargs = []; ?>
		<?php $r = divWays::match($pattern, $way, $xargs); ?>

        <tr class="highlight">
            <td><?php echo $title; ?></td>
            <td><?php echo $pattern; ?></td>
            <td><?php echo $way; ?></td>
            <td><?php echo $r ? "TRUE" : "FALSE" ?></td>
            <td>
				<?php foreach($xargs as $xarg => $value): ?>
                    <b><?php echo $xarg; ?></b> = <?php echo $value; ?>
				<?php endforeach; ?>
            </td>
        </tr>

	<?php endforeach; ?>
</table>