TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
710 B
33 lines
710 B
<?php
|
|
|
|
namespace PhpAot\Php;
|
|
|
|
class ClassDef extends ClassLikeDef
|
|
{
|
|
/**
|
|
* @var array<string, MethodDef>
|
|
*/
|
|
public array $methods = [];
|
|
/**
|
|
* @var array<string, PropertyDef>
|
|
*/
|
|
public array $properties = [];
|
|
/**
|
|
* @var array<string, ConstantDef>
|
|
*/
|
|
public array $constants = [];
|
|
public array $implements = [];
|
|
public string $extends = '';
|
|
public int $flags;
|
|
|
|
public function __construct(string $name, int $flags, string $namespace = '')
|
|
{
|
|
$this->flags = $flags;
|
|
parent::__construct($name, $namespace);
|
|
}
|
|
|
|
public function hasMethod(string $method): bool
|
|
{
|
|
return isset($this->methods[$method]);
|
|
}
|
|
} |