2020-10-30 18:28:14 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
interface Stringable
|
|
|
|
{
|
|
|
|
/** @return string */
|
|
|
|
function __toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @template TClass as object
|
|
|
|
*/
|
|
|
|
class ReflectionAttribute
|
|
|
|
{
|
|
|
|
const IS_INSTANCEOF = 2;
|
|
|
|
|
|
|
|
private function __construct()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2020-10-30 18:28:14 +01:00
|
|
|
public function getName() : string
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @return int-mask-of<Attribute::TARGET_*>
|
|
|
|
*/
|
2020-10-30 18:28:14 +01:00
|
|
|
public function getTarget() : int
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
2020-10-30 18:28:14 +01:00
|
|
|
public function isRepeated() : bool
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getArguments() : array
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return TClass
|
|
|
|
*/
|
|
|
|
public function newInstance() : object
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return never-return
|
|
|
|
*/
|
|
|
|
private function __clone()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/**
|
|
|
|
* @template-covariant T as object
|
|
|
|
*
|
|
|
|
* @property-read class-string<T> $name
|
|
|
|
*/
|
|
|
|
class ReflectionClass implements Reflector {
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getFileName(): string|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getStartLine(): int|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getEndLine(): int|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDocComment(): string|false {}
|
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @template J as object
|
|
|
|
* @param self<J>|class-string<J> $class
|
|
|
|
* @psalm-assert-if-true self<T&J> $this
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function isSubclassOf(self|string $class): bool {}
|
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @template J as object
|
|
|
|
* @param self<J>|interface-string<J> $interface
|
|
|
|
* @psalm-assert-if-true self<T&J> $this
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function implementsInterface(self|string $interface): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getExtensionName(): string|false {}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @psalm-immutable */
|
2021-10-05 16:03:19 +02:00
|
|
|
class ReflectionClassConstant
|
|
|
|
{
|
|
|
|
public const IS_PUBLIC = 1;
|
|
|
|
public const IS_PROTECTED = 2;
|
|
|
|
public const IS_PRIVATE = 4;
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/** @return non-empty-string|false */
|
|
|
|
public function getDocComment(): string|false {}
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class ReflectionFunctionAbstract implements Reflector
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDocComment(): string|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getStartLine(): int|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getEndLine(): int|false {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getFileName(): string|false {}
|
2023-01-03 22:16:58 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getExtensionName(): string|false {}
|
2021-10-05 16:03:19 +02:00
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-immutable */
|
2020-10-30 18:28:14 +01:00
|
|
|
class Attribute
|
|
|
|
{
|
2022-10-17 01:33:26 +02:00
|
|
|
public int $flags;
|
|
|
|
|
2020-10-30 18:28:14 +01:00
|
|
|
public const TARGET_CLASS = 1;
|
|
|
|
public const TARGET_FUNCTION = 2;
|
|
|
|
public const TARGET_METHOD = 4;
|
|
|
|
public const TARGET_PROPERTY = 8;
|
|
|
|
public const TARGET_CLASS_CONSTANT = 16;
|
|
|
|
public const TARGET_PARAMETER = 32;
|
|
|
|
public const TARGET_ALL = 63;
|
2021-01-11 03:55:06 +01:00
|
|
|
public const IS_REPEATABLE = 64;
|
2020-10-30 18:28:14 +01:00
|
|
|
|
|
|
|
/**
|
2021-01-11 03:55:06 +01:00
|
|
|
* @param int-mask-of<self::*> $flags
|
2020-10-30 18:28:14 +01:00
|
|
|
*/
|
|
|
|
public function __construct(int $flags = self::TARGET_ALL)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
2020-11-08 20:22:21 +01:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
class ReflectionProperty implements Reflector
|
|
|
|
{
|
2020-11-08 20:22:21 +01:00
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
2020-11-08 20:22:21 +01:00
|
|
|
*/
|
2022-11-19 15:54:02 +01:00
|
|
|
public function getDocComment(): string|false {}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @psalm-immutable */
|
|
|
|
class ReflectionUnionType extends ReflectionType {
|
|
|
|
/** @return non-empty-list<ReflectionNamedType> */
|
|
|
|
public function getTypes(): array {}
|
2020-11-08 20:22:21 +01:00
|
|
|
}
|
2020-11-09 16:00:53 +01:00
|
|
|
|
|
|
|
class UnhandledMatchError extends Error {}
|
2022-07-25 15:37:49 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-immutable
|
|
|
|
*
|
|
|
|
* @template-covariant Start of string|DateTimeInterface
|
|
|
|
* @implements IteratorAggregate<int, DateTimeInterface>
|
|
|
|
*/
|
|
|
|
class DatePeriod implements IteratorAggregate
|
|
|
|
{
|
|
|
|
const EXCLUDE_START_DATE = 1;
|
|
|
|
/**
|
|
|
|
* @param Start $start
|
|
|
|
* @param (Start is string ? 0|self::EXCLUDE_START_DATE : DateInterval) $interval
|
|
|
|
* @param (Start is string ? never : DateTimeInterface|positive-int) $end
|
|
|
|
* @param (Start is string ? never : 0|self::EXCLUDE_START_DATE) $options
|
|
|
|
*/
|
|
|
|
public function __construct($start, $interval = 0, $end = 1, $options = 0) {}
|
|
|
|
|
|
|
|
/** @psalm-return (Start is string ? (Traversable<int, DateTime>&Iterator) : (Traversable<int, Start>&Iterator)) */
|
|
|
|
public function getIterator(): Iterator {}
|
2022-07-25 16:15:28 +02:00
|
|
|
}
|