Skip to content

Commit ac2add8

Browse files
authored
Merge pull request #179 from cracksalad/master
Add PHP stub file
2 parents f510734 + 99ae6ab commit ac2add8

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

msgpack-stub.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
class MessagePack {
4+
5+
public const OPT_PHPONLY = -1001;
6+
public const OPT_ASSOC = -1002;
7+
8+
public function __construct(bool $phponly = false) {}
9+
10+
public function pack(mixed $data): string {}
11+
12+
public function setOption(int $option, mixed $value): bool {}
13+
14+
public function unpack(string $serialized): mixed {}
15+
16+
public function unpacker(): MessagePackUnpacker {}
17+
}
18+
19+
class MessagePackUnpacker {
20+
21+
public function __construct(bool $phponly = false) {}
22+
23+
public function __destruct() {}
24+
25+
public function data(string|object|null $object = null): mixed {}
26+
27+
public function execute(int|float|null $offset = null): bool {}
28+
29+
public function feed(string $chunk): bool {}
30+
31+
public function reset(): void {}
32+
33+
public function setOption(int $option, mixed $value): bool {}
34+
}
35+
36+
function msgpack_serialize(mixed $value): string {}
37+
38+
/**
39+
* alias for msgpack_serialize()
40+
*/
41+
function msgpack_pack(mixed $value): string {}
42+
43+
function msgpack_unserialize(string $str): mixed {}
44+
45+
/**
46+
* alias for msgpack_unserialize()
47+
*/
48+
function msgpack_unpack(string $str): mixed {}

0 commit comments

Comments
 (0)