forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassDesc.php
More file actions
46 lines (36 loc) · 1.26 KB
/
Copy pathClassDesc.php
File metadata and controls
46 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class ClassDesc
{
public $name; // Phaser.Sprite
public $parameters = []; // an array containing the parameters
public $help = [];
public $extends = '';
public $hasConstructor = false;
public $isStatic = false;
public function __construct($block)
{
$this->name = $block->getLineContent('@class');
$params = $block->getLines('@param');
for ($i = 0; $i < count($params); $i++)
{
$this->parameters[] = new Parameter($params[$i]);
}
if ($block->getTypeBoolean('@extends'))
{
$this->extends = $block->getLineContent('@extends');
}
if ($block->getTypeBoolean('@constructor'))
{
$this->hasConstructor = true;
}
else
{
// Like Phaser.Math
$this->isStatic = true;
}
// This is a problem because the @classdesc block is often multi-line, but repeated in the clear content too.
// So all the classes probably need tidying up before this part will work correctly.
// $this->help = $block->cleanContent();
}
}
?>