MethodDoc.php 1.16 KB
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
class MethodDoc extends FunctionDoc
{
18 19
    public $isAbstract;
    public $isFinal;
20

21
    public $isStatic;
22

23
    public $visibility;
24

25 26
    // will be set by creating class
    public $definedBy;
27

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

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

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

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