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.
 
 

38 lines
851 B

<?php
/**
* This file is part of Swoole-Compiler(AOT).
*
* @link https://www.swoole.com/
* @contact service@swoole.com
*/
namespace PhpAot\Php\Entity;
use PhpAot\Php\ArgInfo;
class FunctionDef
{
public string $name;
public string $returnType;
/**
* @var array<ArgInfo>
*/
public array $argInfoList = [];
public int $argCountRequired = 0;
public string $params = '';
public string $namespace = '';
public bool $method = false;
public function __construct(string $name, string $returnType, string $namespace = '')
{
$this->name = $name;
$this->returnType = $returnType;
$this->namespace = $namespace;
}
public function getNamespacedName(): string
{
return $this->namespace ? $this->namespace . '\\' . $this->name : $this->name;
}
}