MethodDoc.php 943 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace yii\apidoc\models;

10
/**
11
 * Represents API documentation information for a `method`.
12 13 14 15
 *
 * @author Carsten Brandt <mail@cebe.cc>
 * @since 2.0
 */
16 17 18 19
class MethodDoc extends FunctionDoc
{
	public $isAbstract;
	public $isFinal;
20

21
	public $isStatic;
22 23 24 25

	public $visibility;

	// will be set by creating class
26
	public $definedBy;
27 28 29 30 31

	/**
	 * @param \phpDocumentor\Reflection\ClassReflector\MethodReflector $reflector
	 * @param array $config
	 */
32
	public function __construct($reflector = null, $config = [])
33 34 35
	{
		parent::__construct($reflector, $config);

36 37 38 39
		if ($reflector === null) {
			return;
		}

40 41 42 43 44 45
		$this->isAbstract = $reflector->isAbstract();
		$this->isFinal = $reflector->isFinal();
		$this->isStatic = $reflector->isStatic();

		$this->visibility = $reflector->getVisibility();
	}
46
}