mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-23 04:00:23 +08:00
simplified model and context creation
This commit is contained in:
@ -19,37 +19,23 @@ class ClassDoc extends BaseDoc
|
||||
|
||||
public $interfaces = [];
|
||||
public $traits = [];
|
||||
// will be set by Context::updateReferences()
|
||||
public $subclasses = [];
|
||||
|
||||
// TODO
|
||||
public $properties = [];
|
||||
public $methods = [];
|
||||
public $events = [];
|
||||
public $constants = [];
|
||||
|
||||
// public $protectedPropertyCount=0;
|
||||
// public $publicPropertyCount=0;
|
||||
// public $protectedMethodCount=0;
|
||||
// public $publicMethodCount=0;
|
||||
//
|
||||
// public $nativePropertyCount=0;
|
||||
// public $nativeMethodCount=0;
|
||||
// public $nativeEventCount=0;
|
||||
|
||||
public $sinceVersion;
|
||||
|
||||
public $subclasses = [];
|
||||
|
||||
|
||||
/**
|
||||
* @param \phpDocumentor\Reflection\ClassReflector $reflector
|
||||
* @param Context $context
|
||||
* @param array $config
|
||||
*/
|
||||
public function __construct($reflector, $context = null, $config = [])
|
||||
public function __construct($reflector, $config = [])
|
||||
{
|
||||
// base properties
|
||||
$this->name = ltrim($reflector->getName(), '\\');
|
||||
$this->startLine = $reflector->getNode()->getAttribute('startLine');
|
||||
$this->endLine = $reflector->getNode()->getAttribute('endLine');
|
||||
parent::__construct($reflector, $config);
|
||||
|
||||
$this->parentClass = ltrim($reflector->getParentClass(), '\\');
|
||||
if (empty($this->parentClass)) {
|
||||
@ -68,13 +54,5 @@ class ClassDoc extends BaseDoc
|
||||
// TODO methods
|
||||
|
||||
// TODO properties
|
||||
|
||||
// TODO docblock
|
||||
|
||||
if ($context !== null) {
|
||||
$context->addClass($this);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user