ConstDoc.php 816 B

12345678910111213141516171819202122232425262728293031323334353637
  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 `constant`.
  10. *
  11. * @author Carsten Brandt <mail@cebe.cc>
  12. * @since 2.0
  13. */
  14. class ConstDoc extends BaseDoc
  15. {
  16. public $definedBy;
  17. public $value;
  18. /**
  19. * @param \phpDocumentor\Reflection\ClassReflector\ConstantReflector $reflector
  20. * @param Context $context
  21. * @param array $config
  22. */
  23. public function __construct($reflector = null, $context = null, $config = [])
  24. {
  25. parent::__construct($reflector, $context, $config);
  26. if ($reflector === null) {
  27. return;
  28. }
  29. $this->value = $reflector->getValue();
  30. }
  31. }