MethodDoc.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\apidoc\models;
  8. /**
  9. * Represents API documentation information for a `method`.
  10. *
  11. * @author Carsten Brandt <mail@cebe.cc>
  12. * @since 2.0
  13. */
  14. class MethodDoc extends FunctionDoc
  15. {
  16. public $isAbstract;
  17. public $isFinal;
  18. public $isStatic;
  19. public $visibility;
  20. // will be set by creating class
  21. public $definedBy;
  22. /**
  23. * @param \phpDocumentor\Reflection\ClassReflector\MethodReflector $reflector
  24. * @param Context $context
  25. * @param array $config
  26. */
  27. public function __construct($reflector = null, $context = null, $config = [])
  28. {
  29. parent::__construct($reflector, $context, $config);
  30. if ($reflector === null) {
  31. return;
  32. }
  33. $this->isAbstract = $reflector->isAbstract();
  34. $this->isFinal = $reflector->isFinal();
  35. $this->isStatic = $reflector->isStatic();
  36. $this->visibility = $reflector->getVisibility();
  37. }
  38. }