__construct() публичный Метод

public __construct ( Context $context, string $name, UnionType $type, integer $flags, Phan\Language\FQSEN $fqsen )
$context Phan\Language\Context The context in which the structural element lives
$name string
$type Phan\Language\UnionType
$flags integer
$fqsen Phan\Language\FQSEN A fully qualified name for the element
Пример #1
0
 /**
  * @param Context $context
  * The context in which the structural element lives
  *
  * @param string $name,
  * The name of the typed structural element
  *
  * @param UnionType $type,
  * A '|' delimited set of types satisfied by this
  * typed structural element.
  *
  * @param int $flags,
  * The flags property contains node specific flags. It is
  * always defined, but for most nodes it is always zero.
  * ast\kind_uses_flags() can be used to determine whether
  * a certain kind has a meaningful flags value.
  *
  * @param FullyQualifiedClassName $fqsen
  * A fully qualified name for this class
  *
  * @param Type|null $parent_type
  * @param FullyQualifiedClassName[]|null $interface_fqsen_list
  * @param FullyQualifiedClassName[]|null $trait_fqsen_list
  */
 public function __construct(Context $context, string $name, UnionType $type, int $flags, FullyQualifiedClassName $fqsen, Type $parent_type = null, array $interface_fqsen_list = [], array $trait_fqsen_list = [])
 {
     parent::__construct($context, $name, $type, $flags, $fqsen);
     $this->parent_type = $parent_type;
     $this->interface_fqsen_list = $interface_fqsen_list;
     $this->trait_fqsen_list = $trait_fqsen_list;
     $this->setInternalScope(new ClassScope($context->getScope(), $fqsen));
 }
Пример #2
0
 /**
  * @param Context $context
  * The context in which the structural element lives
  *
  * @param string $name,
  * The name of the typed structural element
  *
  * @param UnionType $type,
  * A '|' delimited set of types satisfyped by this
  * typed structural element.
  *
  * @param int $flags,
  * The flags property contains node specific flags. It is
  * always defined, but for most nodes it is always zero.
  * ast\kind_uses_flags() can be used to determine whether
  * a certain kind has a meaningful flags value.
  *
  * @param FullyQualifiedClassName|null $parent_class_fqsen
  * @param FullyQualifiedClassName[]|null $interface_fqsen_list
  * @param FullyQualifiedClassName[]|null $trait_fqsen_list
  */
 public function __construct(Context $context, string $name, UnionType $type, int $flags, FullyQualifiedClassName $parent_class_fqsen = null, array $interface_fqsen_list = [], array $trait_fqsen_list = [])
 {
     // Add variable '$this' to the scope
     $context = $context->withScopeVariable(new Variable($context, 'this', $type, 0));
     parent::__construct($context, $name, $type, $flags);
     $this->parent_class_fqsen = $parent_class_fqsen;
     $this->interface_fqsen_list = $interface_fqsen_list;
     $this->trait_fqsen_list = $trait_fqsen_list;
 }
Пример #3
0
 /**
  * @param \phan\Context $context
  * The context in which the structural element lives
  *
  * @param string $name,
  * The name of the typed structural element
  *
  * @param UnionType $type,
  * A '|' delimited set of types satisfyped by this
  * typed structural element.
  *
  * @param int $flags,
  * The flags property contains node specific flags. It is
  * always defined, but for most nodes it is always zero.
  * ast\kind_uses_flags() can be used to determine whether
  * a certain kind has a meaningful flags value.
  */
 public function __construct(Context $context, string $name, UnionType $type, int $flags)
 {
     parent::__construct($context, $name, $type, $flags);
 }
Пример #4
0
Файл: Func.php Проект: etsy/phan
 /**
  * @param \phan\Context $context
  * The context in which the structural element lives
  *
  * @param string $name,
  * The name of the typed structural element
  *
  * @param UnionType $type,
  * A '|' delimited set of types satisfyped by this
  * typed structural element.
  *
  * @param int $flags,
  * The flags property contains node specific flags. It is
  * always defined, but for most nodes it is always zero.
  * ast\kind_uses_flags() can be used to determine whether
  * a certain kind has a meaningful flags value.
  */
 public function __construct(Context $context, string $name, UnionType $type, int $flags, FullyQualifiedFunctionName $fqsen)
 {
     parent::__construct($context, $name, $type, $flags, $fqsen);
     $this->setInternalScope(new FunctionLikeScope($context->getScope(), $fqsen));
 }