Skip to content

Commit 2ea2751

Browse files
committed
docgen processor now handling class definitions.
1 parent cf363a5 commit 2ea2751

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

docgen/src/Processor.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Processor
44
public $file;
55
public $blocks;
66

7+
public $class;
78
public $consts;
89
public $methods;
910
public $properties;
@@ -74,7 +75,11 @@ private function scanFile() {
7475
// Process the data into our documentation types
7576
for ($i = 0; $i < $this->total(); $i++)
7677
{
77-
if ($this->blocks[$i]->isConst)
78+
if ($this->blocks[$i]->isClass)
79+
{
80+
$this->class = new ClassDesc($this->blocks[$i]);
81+
}
82+
else if ($this->blocks[$i]->isConst)
7883
{
7984
$tempConst = new Constant($this->blocks[$i]);
8085
$this->consts[$tempConst->name] = $tempConst;

docgen/view.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
<h1><?php echo $src ?></h1>
5757

5858
<?php
59-
// echo "<pre>";
60-
// print_r($data->methods[$method]->getArray());
61-
// echo "</pre>";
59+
echo "<pre>";
60+
print_r($data->class->getArray());
61+
echo "</pre>";
6262

6363
if ($method)
6464
{

0 commit comments

Comments
 (0)