PHP Classes

File: templates/grey/_resources.phtml

Recommend this page to a friend!
  Classes of Mike Stowe   PHP RAML to HTML   templates/grey/_resources.phtml   Download  
File: templates/grey/_resources.phtml
Role: Auxiliary script
Content type: text/plain
Description: Sample output
Class: PHP RAML to HTML
Parse RAML of an API to generate documentation
Author: By
Last change:
Date: 10 years ago
Size: 460 bytes
 

Contents

Class file image Download
<h3>Available Endpoints</h3>
<ul class="resources">
    <?php foreach ($RAML->path()->getChildren() as $abspath => $endpoint) { ?>
    <li>
        <div style="display: inline-block; width: 150px;">
            <a href="<?php echo $_SERVER['PHP_SELF']; ?>?path=<?php echo $abspath; ?>"><?php echo $endpoint; ?></a>
        </div>
       
        <div style="display: inline-block;">
            <?php echo $RAML->getPathObject($abspath)->get('description'); ?>
</div>
       
        <br />
    </li>
    <?php } ?>
</ul>