123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526 |
- <?php
- /** @generate-class-entries */
- class PharException extends Exception
- {
- }
- class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess
- {
- public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null) {}
- public function __destruct() {}
- /** @tentative-return-type */
- public function addEmptyDir(string $directory): void {}
- /** @tentative-return-type */
- public function addFile(string $filename, ?string $localName = null): void {}
- /** @tentative-return-type */
- public function addFromString(string $localName, string $contents): void {}
- /** @tentative-return-type */
- public function buildFromDirectory(string $directory, string $pattern = ""): array {}
- /** @tentative-return-type */
- public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
- /** @tentative-return-type */
- public function compressFiles(int $compression): void {}
- /** @return bool */
- public function decompressFiles() {} // TODO make return type void
- /** @tentative-return-type */
- public function compress(int $compression, ?string $extension = null): ?Phar {}
- /** @tentative-return-type */
- public function decompress(?string $extension = null): ?Phar {}
- /** @tentative-return-type */
- public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null): ?Phar {}
- /** @tentative-return-type */
- public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null): ?PharData {}
- /** @return bool */
- public function copy(string $from, string $to) {} // TODO make return type void
- /** @tentative-return-type */
- public function count(int $mode = COUNT_NORMAL): int {}
- /** @return bool */
- public function delete(string $localName) {} // TODO make return type void
- /** @return bool */
- public function delMetadata() {} // TODO make return type void
- /** @tentative-return-type */
- public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false): bool {}
- /** @tentative-return-type */
- public function getAlias(): ?string {}
- /** @tentative-return-type */
- public function getPath(): string {}
- /** @tentative-return-type */
- public function getMetadata(array $unserializeOptions = []): mixed {}
- /** @tentative-return-type */
- public function getModified(): bool {}
- /** @tentative-return-type */
- public function getSignature(): array|false {}
- /** @tentative-return-type */
- public function getStub(): string {}
- /** @tentative-return-type */
- public function getVersion(): string {}
- /** @tentative-return-type */
- public function hasMetadata(): bool {}
- /** @tentative-return-type */
- public function isBuffering(): bool {}
- /** @tentative-return-type */
- public function isCompressed(): int|false {}
- /** @tentative-return-type */
- public function isFileFormat(int $format): bool {}
- /** @tentative-return-type */
- public function isWritable(): bool {}
- /**
- * @param string $localName
- * @tentative-return-type
- */
- public function offsetExists($localName): bool {}
- /**
- * @param string $localName
- * @tentative-return-type
- */
- public function offsetGet($localName): SplFileInfo {}
- /**
- * @param string $localName
- * @param resource|string $value
- * @tentative-return-type
- */
- public function offsetSet($localName, $value): void {}
- /**
- * @param string $localName
- * @tentative-return-type
- */
- public function offsetUnset($localName): void {}
- /** @tentative-return-type */
- public function setAlias(string $alias): bool {}
- /** @tentative-return-type */
- public function setDefaultStub(?string $index = null, ?string $webIndex = null): bool {}
- /** @tentative-return-type */
- public function setMetadata(mixed $metadata): void {}
- /** @tentative-return-type */
- public function setSignatureAlgorithm(int $algo, ?string $privateKey = null): void {}
- /**
- * @param resource|string $stub
- * @return bool
- */
- public function setStub($stub, int $length = UNKNOWN) {} // TODO make return type void
- /** @tentative-return-type */
- public function startBuffering(): void {}
- /** @tentative-return-type */
- public function stopBuffering(): void {}
- final public static function apiVersion(): string {}
- final public static function canCompress(int $compression = 0): bool {}
- final public static function canWrite(): bool {}
- final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}
- final public static function getSupportedCompression(): array {}
- final public static function getSupportedSignatures(): array {}
- final public static function interceptFileFuncs(): void {}
- final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}
- final public static function loadPhar(string $filename, ?string $alias = null): bool {}
- final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}
- final public static function running(bool $returnPhar = true): string {}
- final public static function mount(string $pharPath, string $externalPath): void {}
- final public static function mungServer(array $variables): void {}
- final public static function unlinkArchive(string $filename): bool {} // TODO make return type void
- final public static function webPhar(
- ?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
- array $mimeTypes = [], ?callable $rewrite = null): void {}
- }
- class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAccess
- {
- /**
- * @implementation-alias Phar::__construct
- * @no-verify PharData constructor accepts extra $format argument
- */
- public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $format = 0) {}
- /** @implementation-alias Phar::__destruct */
- public function __destruct() {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::addEmptyDir
- */
- public function addEmptyDir(string $directory): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::addFile
- */
- public function addFile(string $filename, ?string $localName = null): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::addFromString
- */
- public function addFromString(string $localName, string $contents): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::buildFromDirectory
- */
- public function buildFromDirectory(string $directory, string $pattern = ""): array {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::buildFromIterator
- */
- public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::compressFiles
- */
- public function compressFiles(int $compression): void {}
- /**
- * @return bool
- * @implementation-alias Phar::decompressFiles
- */
- public function decompressFiles() {} // TODO make return type void
- /**
- * @tentative-return-type
- * @implementation-alias Phar::compress
- * @no-verify
- */
- public function compress(int $compression, ?string $extension = null): ?PharData {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::decompress
- * @no-verify
- */
- public function decompress(?string $extension = null): ?PharData {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::convertToExecutable
- */
- public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null): ?Phar {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::convertToData
- */
- public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null): ?PharData {}
- /**
- * @return bool
- * @implementation-alias Phar::copy
- */
- public function copy(string $from, string $to) {} // TODO make return type void
- /**
- * @tentative-return-type
- * @implementation-alias Phar::count
- */
- public function count(int $mode = COUNT_NORMAL): int {}
- /**
- * @return bool
- * @implementation-alias Phar::delete
- */
- public function delete(string $localName) {} // TODO make return type void
- /**
- * @return bool
- * @implementation-alias Phar::delMetadata
- */
- public function delMetadata() {} // TODO make return type void
- /**
- * @tentative-return-type
- * @implementation-alias Phar::extractTo
- */
- public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getAlias
- */
- public function getAlias(): ?string {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getPath
- */
- public function getPath(): string {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getMetadata
- */
- public function getMetadata(array $unserializeOptions = []): mixed {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getModified
- */
- public function getModified(): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getSignature
- */
- public function getSignature(): array|false {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getStub
- */
- public function getStub(): string {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::getVersion
- */
- public function getVersion(): string {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::hasMetadata
- */
- public function hasMetadata(): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::isBuffering
- */
- public function isBuffering(): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::isCompressed
- */
- public function isCompressed(): int|false {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::isFileFormat
- */
- public function isFileFormat(int $format): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::isWritable
- */
- public function isWritable(): bool {}
- /**
- * @param string $localName
- * @tentative-return-type
- * @implementation-alias Phar::offsetExists
- */
- public function offsetExists($localName): bool {}
- /**
- * @param string $localName
- * @tentative-return-type
- * @implementation-alias Phar::offsetGet
- */
- public function offsetGet($localName): SplFileInfo {}
- /**
- * @param string $localName
- * @param resource|string $value
- * @tentative-return-type
- * @implementation-alias Phar::offsetSet
- */
- public function offsetSet($localName, $value): void {}
- /**
- * @param string $localName
- * @tentative-return-type
- * @implementation-alias Phar::offsetUnset
- */
- public function offsetUnset($localName): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::setAlias
- */
- public function setAlias(string $alias): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::setDefaultStub
- */
- public function setDefaultStub(?string $index = null, ?string $webIndex = null): bool {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::setMetadata
- */
- public function setMetadata(mixed $metadata): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::setSignatureAlgorithm
- */
- public function setSignatureAlgorithm(int $algo, ?string $privateKey = null): void {}
- /**
- * @param resource|string $stub
- * @return bool
- * @implementation-alias Phar::setStub
- */
- public function setStub($stub, int $length = UNKNOWN) {} // TODO make return type void
- /**
- * @tentative-return-type
- * @implementation-alias Phar::startBuffering
- */
- public function startBuffering(): void {}
- /**
- * @tentative-return-type
- * @implementation-alias Phar::stopBuffering
- */
- public function stopBuffering(): void {}
- /** @implementation-alias Phar::apiVersion */
- final public static function apiVersion(): string {}
- /** @implementation-alias Phar::canCompress */
- final public static function canCompress(int $compression = 0): bool {}
- /** @implementation-alias Phar::canWrite */
- final public static function canWrite(): bool {}
- /** @implementation-alias Phar::createDefaultStub */
- final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}
- /** @implementation-alias Phar::getSupportedCompression */
- final public static function getSupportedCompression(): array {}
- /** @implementation-alias Phar::getSupportedSignatures */
- final public static function getSupportedSignatures(): array {}
- /** @implementation-alias Phar::interceptFileFuncs */
- final public static function interceptFileFuncs(): void {}
- /** @implementation-alias Phar::isValidPharFilename */
- final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}
- /** @implementation-alias Phar::loadPhar */
- final public static function loadPhar(string $filename, ?string $alias = null): bool {}
- /** @implementation-alias Phar::mapPhar */
- final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}
- /** @implementation-alias Phar::running */
- final public static function running(bool $returnPhar = true): string {}
- /** @implementation-alias Phar::mount */
- final public static function mount(string $pharPath, string $externalPath): void {}
- /** @implementation-alias Phar::mungServer */
- final public static function mungServer(array $variables): void {}
- /** @implementation-alias Phar::unlinkArchive */
- final public static function unlinkArchive(string $filename): bool {} // TODO make return type void
- /** @implementation-alias Phar::webPhar */
- final public static function webPhar(
- ?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
- array $mimeTypes = [], ?callable $rewrite = null): void {}
- }
- class PharFileInfo extends SplFileInfo
- {
- public function __construct(string $filename) {}
- public function __destruct() {}
- /** @tentative-return-type */
- public function chmod(int $perms): void {}
- /** @return bool */
- public function compress(int $compression) {} // TODO make return type void
- /** @return bool */
- public function decompress() {} // TODO make return type void
- /** @return bool */
- public function delMetadata() {} // TODO make return type void
- /** @tentative-return-type */
- public function getCompressedSize(): int {}
- /** @tentative-return-type */
- public function getCRC32(): int {}
- /** @tentative-return-type */
- public function getContent(): string {}
- /** @tentative-return-type */
- public function getMetadata(array $unserializeOptions = []): mixed {}
- /** @tentative-return-type */
- public function getPharFlags(): int {}
- /** @tentative-return-type */
- public function hasMetadata(): bool {}
- /** @tentative-return-type */
- public function isCompressed(?int $compression = null): bool {}
- /** @tentative-return-type */
- public function isCRCChecked(): bool {}
- /** @tentative-return-type */
- public function setMetadata(mixed $metadata): void {}
- }
|