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
<?php
/**
*
*
* @author Carsten Brandt <mail@cebe.cc>
*/
namespace yii\phpdoc\models;
class InterfaceDoc extends BaseDoc
{
public $parentInterfaces = [];
public $implementedBy = [];
public $methods = [];
/**
* @param \phpDocumentor\Reflection\InterfaceReflector $reflector
* @param Context $context
* @param array $config
*/
public function __construct($reflector, $context = null, $config = [])
{
// base properties
$this->name = ltrim($reflector->getName(), '\\');
$this->startLine = $reflector->getNode()->getAttribute('startLine');
$this->endLine = $reflector->getNode()->getAttribute('endLine');
foreach($reflector->getParentInterfaces() as $interface) {
$this->parentInterfaces[] = ltrim($interface, '\\');
}
// TODO methods
// TODO docblock
if ($context !== null) {
$context->addInterface($this);
}
parent::__construct($config);
}
}