phaser/docgen/view.php

169 lines
3.4 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';
2014-09-18 19:33:01 +00:00
$data = new Processor(null, "../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
2014-09-18 15:58:47 +00:00
echo "<pre>";
print_r($data->getLog());
echo "</pre>";
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>
<h3>Public</h3>
<ul>
<?php
foreach ($data->methods['public'] as $methodName => $method)
{
echo "<li><a href=\"view.php?src=$src&amp;method={$method->name}\">{$method->name}</a></li>";
}
?>
</ul>
<h3>Protected</h3>
<ul>
<?php
foreach ($data->methods['protected'] as $methodName => $method)
{
echo "<li><a href=\"view.php?src=$src&amp;method={$method->name}\">{$method->name}</a></li>";
}
?>
</ul>
<h3>Private</h3>
<ul>
<?php
foreach ($data->methods['private'] as $methodName => $method)
{
echo "<li><a href=\"view.php?src=$src&amp;method={$method->name}\">{$method->name}</a></li>";
}
?>
</ul>
<h3>Static</h3>
<ul>
<?php
foreach ($data->methods['static'] 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>
<h3>Public</h3>
<ul>
<?php
foreach ($data->properties['public'] as $propertyName => $property)
{
echo "<li><a href=\"view.php?src=$src&amp;property={$property->name}\">{$property->name}</a></li>";
}
?>
</ul>
<h3>Protected</h3>
<ul>
<?php
foreach ($data->properties['protected'] as $propertyName => $property)
{
echo "<li><a href=\"view.php?src=$src&amp;property={$property->name}\">{$property->name}</a></li>";
}
?>
</ul>
<h3>Private</h3>
<ul>
<?php
foreach ($data->properties['private'] as $propertyName => $property)
{
echo "<li><a href=\"view.php?src=$src&amp;property={$property->name}\">{$property->name}</a></li>";
}
?>
</ul>
</body>
</html>