-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathIndexJava.php
More file actions
44 lines (38 loc) · 1.8 KB
/
Copy pathIndexJava.php
File metadata and controls
44 lines (38 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace BNETDocs\Views\Packet;
class IndexJava extends \BNETDocs\Views\Base\Java
{
public static function invoke(\BNETDocs\Interfaces\Model $model): void
{
if (!$model instanceof \BNETDocs\Models\Packet\Index)
{
throw new \BNETDocs\Exceptions\InvalidModelException($model);
}
$model->_responseHeaders['Content-Type'] = self::mimeType();
echo "/**\n";
echo " * BNETDocs, the documentation and discussion website for Blizzard protocols\n";
echo ' * Copyright (C) 2003-' . \date('Y') . " \"Arta\", Don Cullen \"Kyro\", Carl Bennett, others\n";
echo ' * <' . \BNETDocs\Libraries\Core\UrlFormatter::format('/legal') . ">\n";
echo " *\n";
echo " * BNETDocs is free software: you can redistribute it and/or modify\n";
echo " * it under the terms of the GNU Affero General Public License as published by\n";
echo " * the Free Software Foundation, either version 3 of the License, or\n";
echo " * (at your option) any later version.\n";
echo " *\n";
echo " * BNETDocs is distributed in the hope that it will be useful,\n";
echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
echo " * GNU Affero General Public License for more details.\n";
echo " *\n";
echo " * You should have received a copy of the GNU Affero General Public License\n";
echo " * along with BNETDocs. If not, see <http://www.gnu.org/licenses/>.\n";
echo " *\n";
echo " * Packet ID constants for Java\n";
echo ' * Generated by BNETDocs on ' . $model->timestamp->format('r') . "\n";
echo " */\n\n";
foreach ($model->packets as $pkt)
{
printf("static final byte %s = %s;\n", $pkt->getName(), $pkt->getPacketId(true));
}
}
}