You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					80 lines
				
				1.7 KiB
			
		
		
			
		
	
	
					80 lines
				
				1.7 KiB
			| 
											12 years ago
										 | <?php
 | ||
| 
											12 years ago
										 | /**
 | ||
|  |  * @link http://www.yiiframework.com/
 | ||
|  |  * @copyright Copyright (c) 2008 Yii Software LLC
 | ||
|  |  * @license http://www.yiiframework.com/license/
 | ||
|  |  */
 | ||
| 
											12 years ago
										 | 
 | ||
| 
											12 years ago
										 | namespace yii\apidoc\models;
 | ||
| 
											12 years ago
										 | 
 | ||
|  | /**
 | ||
|  |  * Class ClassDoc
 | ||
|  |  */
 | ||
|  | class ClassDoc extends BaseDoc
 | ||
|  | {
 | ||
|  | 	public $parentClass;
 | ||
|  | 
 | ||
|  | 	public $isAbstract;
 | ||
|  | 	public $isFinal;
 | ||
|  | 
 | ||
|  | 	public $interfaces = [];
 | ||
|  | 	public $traits = [];
 | ||
|  | 
 | ||
|  | 	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 = [])
 | ||
|  | 	{
 | ||
|  | 		// base properties
 | ||
|  | 		$this->name = ltrim($reflector->getName(), '\\');
 | ||
|  | 		$this->startLine = $reflector->getNode()->getAttribute('startLine');
 | ||
|  | 		$this->endLine = $reflector->getNode()->getAttribute('endLine');
 | ||
|  | 
 | ||
|  | 		$this->parentClass = ltrim($reflector->getParentClass(), '\\');
 | ||
|  | 		if (empty($this->parentClass)) {
 | ||
|  | 			$this->parentClass = null;
 | ||
|  | 		}
 | ||
|  | 		$this->isAbstract = $reflector->isAbstract();
 | ||
|  | 		$this->isFinal = $reflector->isFinal();
 | ||
|  | 
 | ||
|  | 		foreach($reflector->getInterfaces() as $interface) {
 | ||
|  | 			$this->interfaces[] = ltrim($interface, '\\');
 | ||
|  | 		}
 | ||
|  | 		foreach($reflector->getTraits() as $trait) {
 | ||
|  | 			$this->traits[] = ltrim($trait, '\\');
 | ||
|  | 		}
 | ||
|  | 
 | ||
|  | 		// TODO methods
 | ||
|  | 
 | ||
|  | 		// TODO properties
 | ||
|  | 
 | ||
|  | 		// TODO docblock
 | ||
|  | 
 | ||
|  | 		if ($context !== null) {
 | ||
|  | 			$context->addClass($this);
 | ||
|  | 		}
 | ||
|  | 
 | ||
|  | 		parent::__construct($config);
 | ||
|  | 	}
 | ||
|  | }
 |