phaser/docgen/view.php

112 lines
2.1 KiB
PHP
Raw Normal View History

<?php
2014-09-15 11:50:46 +00:00
$src = "loader/Cache.js";
2014-09-15 11:50:46 +00:00
$method = null;
$property = null;
if (isset($_GET['src']))
{
2014-09-15 11:50:46 +00:00
$src = $_GET['src'];
}
2014-09-15 11:50:46 +00:00
if (isset($_GET['method']))
{
2014-09-15 11:50:46 +00:00
$method = $_GET['method'];
}
if (isset($_GET['property']))
{
$property = $_GET['property'];
}
require 'src/Block.php';
require 'src/ClassDesc.php';
require 'src/Constant.php';
require 'src/Method.php';
require 'src/Parameter.php';
require 'src/Property.php';
require 'src/ReturnType.php';
require 'src/Processor.php';
$data = new Processor("../src/$src");
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>Phaser Documentation Viewer: <?php echo $src ?></title>
<style type="text/css">
body {
font-family: Arial;
font-size: 14px;
background-color: #fff;
color: #000;
}
textarea {
width: 100%;
height: 1000px;
}
</style>
</head>
<body>
<a href="index.php">Index</a>
2014-09-15 11:50:46 +00:00
<h1><?php echo $src ?></h1>
<?php
echo "<pre>";
print_r($data->class->getArray());
echo "</pre>";
2014-09-15 11:50:46 +00:00
if ($method)
{
echo "<pre>";
print_r($data->methods[$method]->getArray());
echo "</pre>";
}
if ($property)
{
echo "<pre>";
print_r($data->properties[$property]->getArray());
echo "</pre>";
}
2014-09-15 11:50:46 +00:00
?>
<h2>Constants</h2>
<ul>
<?php
foreach ($data->consts as $constName => $const)
{
echo "<li>{$const->name}</li>";
}
?>
</ul>
<h2>Methods</h2>
<ul>
<?php
2014-09-15 11:50:46 +00:00
foreach ($data->methods as $methodName => $method)
{
2014-09-15 11:50:46 +00:00
echo "<li><a href=\"view.php?src=$src&amp;method={$method->name}\">{$method->name}</a></li>";
}
?>
</ul>
<h2>Properties</h2>
<ul>
<?php
foreach ($data->properties as $propertyName => $property)
{
echo "<li><a href=\"view.php?src=$src&amp;property={$property->name}\">{$property->name}</a></li>";
}
?>
</ul>
</body>
</html>