类处理代码

pull/1/head
韩天峰 8 months ago
parent 7ae7e12ad8
commit bfc1d8b2c7
  1. 14
      src/Php/ClassDef.php
  2. 19
      src/Php/ConstDef.php
  3. 19
      src/Php/PropertyDef.php

@ -0,0 +1,14 @@
<?php
namespace PhpAot\Php;
class ClassDef
{
public string $name;
public array $methods;
/**
* @var array<PropertyDef>
*/
public array $properties;
public array $constants;
}

@ -0,0 +1,19 @@
<?php
namespace PhpAot\Php;
class ConstDef
{
public string $name;
public string $type;
public string $flags;
public string $value;
public function __construct(string $name, string $flags, string $type, string $value)
{
$this->name = $name;
$this->type = $type;
$this->flags = $flags;
$this->value = $value;
}
}

@ -0,0 +1,19 @@
<?php
namespace PhpAot\Php;
class PropertyDef
{
public string $name;
public string $type;
public string $flags;
public ?string $default = null;
public function __construct(string $name, string $flags, string $type, ?string $default = null)
{
$this->flags = $flags;
$this->name = $name;
$this->type = $type;
$this->default = $default;
}
}
Loading…
Cancel
Save