コード例 #1
0
 /**
  * Constructor
  *
  * @param string             $name     Name of the "entity"
  * @param DocBlock|null      $docblock Docblock
  * @param BaseReflector|null $source   Source Element.
  */
 public function __construct($name, $docblock = null, $source = null)
 {
     $this->entityName = $name;
     $this->lineNumber = $docblock ? $docblock->getLocation()->getLineNumber() : $source->getLineNumber();
     $this->docblock = $docblock;
     $this->source = $source;
 }
コード例 #2
0
 /**
  * Constructor
  *
  * @param \phpDocumentor\Plugin\Plugin            $plugin     Plugin to which this
  *     validator belongs.
  * @param string                                  $name       Name of the "entity"
  * @param \phpDocumentor\Reflection\DocBlock|null $docblock   Docblock
  * @param \phpDocumentor\Reflection\BaseReflector|null  $source     Source Element.
  */
 public function __construct($plugin, $name, $docblock = null, $source = null)
 {
     $this->entityName = $name;
     $this->lineNumber = $docblock ? $docblock->line_number : $source->getLineNumber();
     $this->docblock = $docblock;
     $this->source = $source;
     parent::__construct($plugin->getEventDispatcher(), $plugin->getConfiguration(), $plugin->getTranslator());
 }