├── .github
├── ISSUE_TEMPLATE.md
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ ├── L10n-update.yml
│ ├── php.yml
│ └── phpstan.yml
├── .gitignore
├── .phpcs.xml
├── LICENSE
├── README.md
├── application
├── controllers
│ └── ConfigController.php
├── forms
│ └── ChromeBinaryForm.php
└── views
│ └── scripts
│ └── config
│ └── chrome.phtml
├── composer.json
├── composer.lock
├── configuration.php
├── doc
├── 02-Installation.md
└── 70-Troubleshooting.md
├── library
└── Pdfexport
│ ├── HeadlessChrome.php
│ ├── PrintStyleSheet.php
│ ├── PrintableHtmlDocument.php
│ ├── ProvidedHook
│ └── Pdfexport.php
│ └── ShellCommand.php
├── module.info
├── patches
└── iio-libmergepdf-support-php82.patch
├── phpstan-baseline.neon
├── phpstan.neon
├── public
├── css
│ └── print.less
└── js
│ ├── layout-plugins
│ └── page-breaker.js
│ └── layout.js
├── run.php
└── vendor
├── autoload.php
├── composer
├── ClassLoader.php
├── InstalledVersions.php
├── LICENSE
├── autoload_classmap.php
├── autoload_namespaces.php
├── autoload_psr4.php
├── autoload_real.php
├── autoload_static.php
├── installed.json
├── installed.php
└── platform_check.php
├── cweagans
└── composer-patches
│ ├── .gitignore
│ ├── LICENSE.md
│ ├── README.md
│ ├── composer.json
│ ├── composer.lock
│ ├── phpunit.xml.dist
│ ├── src
│ ├── PatchEvent.php
│ ├── PatchEvents.php
│ └── Patches.php
│ └── tests
│ └── PatchEventTest.php
├── iio
└── libmergepdf
│ ├── .github
│ └── ISSUE_TEMPLATE
│ │ └── bug_report.md
│ ├── PATCHES.txt
│ ├── composer.json
│ ├── src
│ ├── Driver
│ │ ├── DefaultDriver.php
│ │ ├── DriverInterface.php
│ │ ├── Fpdi2Driver.php
│ │ └── TcpdiDriver.php
│ ├── Exception.php
│ ├── Merger.php
│ ├── Pages.php
│ ├── PagesInterface.php
│ └── Source
│ │ ├── FileSource.php
│ │ ├── RawSource.php
│ │ └── SourceInterface.php
│ └── tcpdi
│ ├── LICENSE
│ ├── README.md
│ ├── fpdf_tpl.php
│ ├── tcpdi.php
│ └── tcpdi_parser.php
├── psr
└── log
│ ├── LICENSE
│ ├── Psr
│ └── Log
│ │ ├── AbstractLogger.php
│ │ ├── InvalidArgumentException.php
│ │ ├── LogLevel.php
│ │ ├── LoggerAwareInterface.php
│ │ ├── LoggerAwareTrait.php
│ │ ├── LoggerInterface.php
│ │ ├── LoggerTrait.php
│ │ ├── NullLogger.php
│ │ └── Test
│ │ ├── DummyTest.php
│ │ ├── LoggerInterfaceTest.php
│ │ └── TestLogger.php
│ ├── README.md
│ └── composer.json
├── setasign
└── fpdi
│ ├── LICENSE.txt
│ ├── README.md
│ ├── SECURITY.md
│ ├── composer.json
│ └── src
│ ├── FpdfTpl.php
│ ├── FpdfTplTrait.php
│ ├── FpdfTrait.php
│ ├── Fpdi.php
│ ├── FpdiException.php
│ ├── FpdiTrait.php
│ ├── GraphicsState.php
│ ├── Math
│ ├── Matrix.php
│ └── Vector.php
│ ├── PdfParser
│ ├── CrossReference
│ │ ├── AbstractReader.php
│ │ ├── CrossReference.php
│ │ ├── CrossReferenceException.php
│ │ ├── FixedReader.php
│ │ ├── LineReader.php
│ │ └── ReaderInterface.php
│ ├── Filter
│ │ ├── Ascii85.php
│ │ ├── Ascii85Exception.php
│ │ ├── AsciiHex.php
│ │ ├── FilterException.php
│ │ ├── FilterInterface.php
│ │ ├── Flate.php
│ │ ├── FlateException.php
│ │ ├── Lzw.php
│ │ └── LzwException.php
│ ├── PdfParser.php
│ ├── PdfParserException.php
│ ├── StreamReader.php
│ ├── Tokenizer.php
│ └── Type
│ │ ├── PdfArray.php
│ │ ├── PdfBoolean.php
│ │ ├── PdfDictionary.php
│ │ ├── PdfHexString.php
│ │ ├── PdfIndirectObject.php
│ │ ├── PdfIndirectObjectReference.php
│ │ ├── PdfName.php
│ │ ├── PdfNull.php
│ │ ├── PdfNumeric.php
│ │ ├── PdfStream.php
│ │ ├── PdfString.php
│ │ ├── PdfToken.php
│ │ ├── PdfType.php
│ │ └── PdfTypeException.php
│ ├── PdfReader
│ ├── DataStructure
│ │ └── Rectangle.php
│ ├── Page.php
│ ├── PageBoundaries.php
│ ├── PdfReader.php
│ └── PdfReaderException.php
│ ├── Tcpdf
│ └── Fpdi.php
│ ├── TcpdfFpdi.php
│ ├── Tfpdf
│ ├── FpdfTpl.php
│ └── Fpdi.php
│ └── autoload.php
├── tecnickcom
└── tcpdf
│ ├── CHANGELOG.TXT
│ ├── LICENSE.TXT
│ ├── README.md
│ ├── VERSION
│ ├── composer.json
│ ├── config
│ └── tcpdf_config.php
│ ├── examples
│ ├── barcodes
│ │ ├── example_1d_html.php
│ │ ├── example_1d_png.php
│ │ ├── example_1d_svg.php
│ │ ├── example_1d_svgi.php
│ │ ├── example_2d_datamatrix_html.php
│ │ ├── example_2d_datamatrix_png.php
│ │ ├── example_2d_datamatrix_svg.php
│ │ ├── example_2d_datamatrix_svgi.php
│ │ ├── example_2d_pdf417_html.php
│ │ ├── example_2d_pdf417_png.php
│ │ ├── example_2d_pdf417_svg.php
│ │ ├── example_2d_pdf417_svgi.php
│ │ ├── example_2d_qrcode_html.php
│ │ ├── example_2d_qrcode_png.php
│ │ ├── example_2d_qrcode_svg.php
│ │ ├── example_2d_qrcode_svgi.php
│ │ ├── tcpdf_barcodes_1d_include.php
│ │ └── tcpdf_barcodes_2d_include.php
│ ├── config
│ │ └── tcpdf_config_alt.php
│ ├── data
│ │ ├── cert
│ │ │ ├── tcpdf.crt
│ │ │ ├── tcpdf.fdf
│ │ │ └── tcpdf.p12
│ │ ├── chapter_demo_1.txt
│ │ ├── chapter_demo_2.txt
│ │ ├── table_data_demo.txt
│ │ └── utf8test.txt
│ ├── example_001.php
│ ├── example_002.php
│ ├── example_003.php
│ ├── example_004.php
│ ├── example_005.php
│ ├── example_006.php
│ ├── example_007.php
│ ├── example_008.php
│ ├── example_009.php
│ ├── example_010.php
│ ├── example_011.php
│ ├── example_012.pdf
│ ├── example_012.php
│ ├── example_013.php
│ ├── example_014.php
│ ├── example_015.php
│ ├── example_016.php
│ ├── example_017.php
│ ├── example_018.php
│ ├── example_019.php
│ ├── example_020.php
│ ├── example_021.php
│ ├── example_022.php
│ ├── example_023.php
│ ├── example_024.php
│ ├── example_025.php
│ ├── example_026.php
│ ├── example_027.php
│ ├── example_028.php
│ ├── example_029.php
│ ├── example_030.php
│ ├── example_031.php
│ ├── example_032.php
│ ├── example_033.php
│ ├── example_034.php
│ ├── example_035.php
│ ├── example_036.php
│ ├── example_037.php
│ ├── example_038.php
│ ├── example_039.php
│ ├── example_040.php
│ ├── example_041.php
│ ├── example_042.php
│ ├── example_043.php
│ ├── example_044.php
│ ├── example_045.php
│ ├── example_046.php
│ ├── example_047.php
│ ├── example_048.php
│ ├── example_049.php
│ ├── example_050.php
│ ├── example_051.php
│ ├── example_052.php
│ ├── example_053.php
│ ├── example_054.php
│ ├── example_055.php
│ ├── example_056.php
│ ├── example_057.php
│ ├── example_058.php
│ ├── example_059.php
│ ├── example_060.php
│ ├── example_061.php
│ ├── example_062.php
│ ├── example_063.php
│ ├── example_064.php
│ ├── example_065.php
│ ├── example_066.php
│ ├── example_067.php
│ ├── images
│ │ ├── _blank.png
│ │ ├── alpha.png
│ │ ├── image_demo.jpg
│ │ ├── image_with_alpha.png
│ │ ├── img.png
│ │ ├── logo_example.gif
│ │ ├── logo_example.jpg
│ │ ├── logo_example.png
│ │ ├── tcpdf_box.ai
│ │ ├── tcpdf_box.svg
│ │ ├── tcpdf_cell.png
│ │ ├── tcpdf_logo.jpg
│ │ ├── tcpdf_signature.png
│ │ ├── testsvg.svg
│ │ └── tux.svg
│ ├── index.php
│ ├── lang
│ │ ├── afr.php
│ │ ├── ara.php
│ │ ├── aze.php
│ │ ├── bel.php
│ │ ├── bra.php
│ │ ├── bul.php
│ │ ├── cat.php
│ │ ├── ces.php
│ │ ├── chi.php
│ │ ├── cym.php
│ │ ├── dan.php
│ │ ├── eng.php
│ │ ├── est.php
│ │ ├── eus.php
│ │ ├── far.php
│ │ ├── fra.php
│ │ ├── ger.php
│ │ ├── gle.php
│ │ ├── glg.php
│ │ ├── hat.php
│ │ ├── heb.php
│ │ ├── hrv.php
│ │ ├── hun.php
│ │ ├── hye.php
│ │ ├── ind.php
│ │ ├── ita.php
│ │ ├── jpn.php
│ │ ├── kat.php
│ │ ├── kor.php
│ │ ├── mkd.php
│ │ ├── mlt.php
│ │ ├── msa.php
│ │ ├── nld.php
│ │ ├── nob.php
│ │ ├── pol.php
│ │ ├── por.php
│ │ ├── ron.php
│ │ ├── rus.php
│ │ ├── slv.php
│ │ ├── spa.php
│ │ ├── sqi.php
│ │ ├── srp.php
│ │ ├── swa.php
│ │ ├── swe.php
│ │ ├── ukr.php
│ │ ├── urd.php
│ │ ├── yid.php
│ │ └── zho.php
│ └── tcpdf_include.php
│ ├── fonts
│ ├── ae_fonts_2.0
│ │ ├── COPYING
│ │ ├── ChangeLog
│ │ └── README
│ ├── aealarabiya.ctg.z
│ ├── aealarabiya.php
│ ├── aealarabiya.z
│ ├── aefurat.ctg.z
│ ├── aefurat.php
│ ├── aefurat.z
│ ├── cid0cs.php
│ ├── cid0ct.php
│ ├── cid0jp.php
│ ├── cid0kr.php
│ ├── courier.php
│ ├── courierb.php
│ ├── courierbi.php
│ ├── courieri.php
│ ├── dejavu-fonts-ttf-2.33
│ │ ├── AUTHORS
│ │ ├── BUGS
│ │ ├── LICENSE
│ │ ├── NEWS
│ │ ├── README
│ │ ├── langcover.txt
│ │ └── unicover.txt
│ ├── dejavu-fonts-ttf-2.34
│ │ ├── AUTHORS
│ │ ├── BUGS
│ │ ├── LICENSE
│ │ ├── NEWS
│ │ ├── README
│ │ ├── langcover.txt
│ │ └── unicover.txt
│ ├── dejavusans.ctg.z
│ ├── dejavusans.php
│ ├── dejavusans.z
│ ├── dejavusansb.ctg.z
│ ├── dejavusansb.php
│ ├── dejavusansb.z
│ ├── dejavusansbi.ctg.z
│ ├── dejavusansbi.php
│ ├── dejavusansbi.z
│ ├── dejavusanscondensed.ctg.z
│ ├── dejavusanscondensed.php
│ ├── dejavusanscondensed.z
│ ├── dejavusanscondensedb.ctg.z
│ ├── dejavusanscondensedb.php
│ ├── dejavusanscondensedb.z
│ ├── dejavusanscondensedbi.ctg.z
│ ├── dejavusanscondensedbi.php
│ ├── dejavusanscondensedbi.z
│ ├── dejavusanscondensedi.ctg.z
│ ├── dejavusanscondensedi.php
│ ├── dejavusanscondensedi.z
│ ├── dejavusansextralight.ctg.z
│ ├── dejavusansextralight.php
│ ├── dejavusansextralight.z
│ ├── dejavusansi.ctg.z
│ ├── dejavusansi.php
│ ├── dejavusansi.z
│ ├── dejavusansmono.ctg.z
│ ├── dejavusansmono.php
│ ├── dejavusansmono.z
│ ├── dejavusansmonob.ctg.z
│ ├── dejavusansmonob.php
│ ├── dejavusansmonob.z
│ ├── dejavusansmonobi.ctg.z
│ ├── dejavusansmonobi.php
│ ├── dejavusansmonobi.z
│ ├── dejavusansmonoi.ctg.z
│ ├── dejavusansmonoi.php
│ ├── dejavusansmonoi.z
│ ├── dejavuserif.ctg.z
│ ├── dejavuserif.php
│ ├── dejavuserif.z
│ ├── dejavuserifb.ctg.z
│ ├── dejavuserifb.php
│ ├── dejavuserifb.z
│ ├── dejavuserifbi.ctg.z
│ ├── dejavuserifbi.php
│ ├── dejavuserifbi.z
│ ├── dejavuserifcondensed.ctg.z
│ ├── dejavuserifcondensed.php
│ ├── dejavuserifcondensed.z
│ ├── dejavuserifcondensedb.ctg.z
│ ├── dejavuserifcondensedb.php
│ ├── dejavuserifcondensedb.z
│ ├── dejavuserifcondensedbi.ctg.z
│ ├── dejavuserifcondensedbi.php
│ ├── dejavuserifcondensedbi.z
│ ├── dejavuserifcondensedi.ctg.z
│ ├── dejavuserifcondensedi.php
│ ├── dejavuserifcondensedi.z
│ ├── dejavuserifi.ctg.z
│ ├── dejavuserifi.php
│ ├── dejavuserifi.z
│ ├── freefont-20100919
│ │ ├── AUTHORS
│ │ ├── COPYING
│ │ ├── CREDITS
│ │ ├── ChangeLog
│ │ ├── INSTALL
│ │ └── README
│ ├── freefont-20120503
│ │ ├── AUTHORS
│ │ ├── COPYING
│ │ ├── CREDITS
│ │ ├── ChangeLog
│ │ ├── INSTALL
│ │ ├── README
│ │ ├── TROUBLESHOOTING
│ │ └── USAGE
│ ├── freemono.ctg.z
│ ├── freemono.php
│ ├── freemono.z
│ ├── freemonob.ctg.z
│ ├── freemonob.php
│ ├── freemonob.z
│ ├── freemonobi.ctg.z
│ ├── freemonobi.php
│ ├── freemonobi.z
│ ├── freemonoi.ctg.z
│ ├── freemonoi.php
│ ├── freemonoi.z
│ ├── freesans.ctg.z
│ ├── freesans.php
│ ├── freesans.z
│ ├── freesansb.ctg.z
│ ├── freesansb.php
│ ├── freesansb.z
│ ├── freesansbi.ctg.z
│ ├── freesansbi.php
│ ├── freesansbi.z
│ ├── freesansi.ctg.z
│ ├── freesansi.php
│ ├── freesansi.z
│ ├── freeserif.ctg.z
│ ├── freeserif.php
│ ├── freeserif.z
│ ├── freeserifb.ctg.z
│ ├── freeserifb.php
│ ├── freeserifb.z
│ ├── freeserifbi.ctg.z
│ ├── freeserifbi.php
│ ├── freeserifbi.z
│ ├── freeserifi.ctg.z
│ ├── freeserifi.php
│ ├── freeserifi.z
│ ├── helvetica.php
│ ├── helveticab.php
│ ├── helveticabi.php
│ ├── helveticai.php
│ ├── hysmyeongjostdmedium.php
│ ├── kozgopromedium.php
│ ├── kozminproregular.php
│ ├── msungstdlight.php
│ ├── pdfacourier.php
│ ├── pdfacourier.z
│ ├── pdfacourierb.php
│ ├── pdfacourierb.z
│ ├── pdfacourierbi.php
│ ├── pdfacourierbi.z
│ ├── pdfacourieri.php
│ ├── pdfacourieri.z
│ ├── pdfahelvetica.php
│ ├── pdfahelvetica.z
│ ├── pdfahelveticab.php
│ ├── pdfahelveticab.z
│ ├── pdfahelveticabi.php
│ ├── pdfahelveticabi.z
│ ├── pdfahelveticai.php
│ ├── pdfahelveticai.z
│ ├── pdfasymbol.php
│ ├── pdfasymbol.z
│ ├── pdfatimes.php
│ ├── pdfatimes.z
│ ├── pdfatimesb.php
│ ├── pdfatimesb.z
│ ├── pdfatimesbi.php
│ ├── pdfatimesbi.z
│ ├── pdfatimesi.php
│ ├── pdfatimesi.z
│ ├── pdfazapfdingbats.php
│ ├── pdfazapfdingbats.z
│ ├── stsongstdlight.php
│ ├── symbol.php
│ ├── times.php
│ ├── timesb.php
│ ├── timesbi.php
│ ├── timesi.php
│ ├── uni2cid_ac15.php
│ ├── uni2cid_ag15.php
│ ├── uni2cid_aj16.php
│ ├── uni2cid_ak12.php
│ └── zapfdingbats.php
│ ├── include
│ ├── barcodes
│ │ ├── datamatrix.php
│ │ ├── pdf417.php
│ │ └── qrcode.php
│ ├── sRGB.icc
│ ├── tcpdf_colors.php
│ ├── tcpdf_filters.php
│ ├── tcpdf_font_data.php
│ ├── tcpdf_fonts.php
│ ├── tcpdf_images.php
│ └── tcpdf_static.php
│ ├── tcpdf.php
│ ├── tcpdf_autoconfig.php
│ ├── tcpdf_barcodes_1d.php
│ ├── tcpdf_barcodes_2d.php
│ ├── tcpdf_import.php
│ ├── tcpdf_parser.php
│ └── tools
│ ├── convert_fonts_examples.txt
│ └── tcpdf_addfont.php
└── textalk
└── websocket
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── feature_request.md
│ └── other-issue.md
└── workflows
│ └── acceptance.yml
├── .gitignore
├── COPYING.md
├── Makefile
├── README.md
├── codestandard.xml
├── composer.json
├── docs
├── Changelog.md
├── Client.md
├── Contributing.md
├── Examples.md
├── Message.md
└── Server.md
├── examples
├── echoserver.php
├── random_client.php
├── random_server.php
└── send.php
├── lib
├── BadOpcodeException.php
├── BadUriException.php
├── Base.php
├── Client.php
├── ConnectionException.php
├── Exception.php
├── Message
│ ├── Binary.php
│ ├── Close.php
│ ├── Factory.php
│ ├── Message.php
│ ├── Ping.php
│ ├── Pong.php
│ └── Text.php
├── Server.php
└── TimeoutException.php
├── phpunit.xml.dist
└── tests
├── ClientTest.php
├── ExceptionTest.php
├── MessageTest.php
├── README.md
├── ServerTest.php
├── bootstrap.php
├── mock
├── EchoLog.php
├── MockSocket.php
├── mock-socket.php
├── payload.128.txt
└── payload.65536.txt
└── scripts
├── client.close.json
├── client.connect-authed.json
├── client.connect-bad-context.json
├── client.connect-context.json
├── client.connect-error.json
├── client.connect-extended.json
├── client.connect-failed.json
├── client.connect-handshake-error.json
├── client.connect-headers.json
├── client.connect-invalid-key.json
├── client.connect-invalid-upgrade.json
├── client.connect-persistent.json
├── client.connect-timeout.json
├── client.connect.json
├── client.destruct.json
├── client.reconnect.json
├── close-remote.json
├── config-timeout.json
├── ping-pong.json
├── receive-bad-opcode.json
├── receive-broken-read.json
├── receive-client-timeout.json
├── receive-empty-read.json
├── receive-fragmentation.json
├── send-bad-opcode.json
├── send-broken-write.json
├── send-convenicance.json
├── send-failed-write.json
├── send-receive-128.json
├── send-receive-65536.json
├── send-receive-multi-fragment.json
├── send-receive.json
├── server.accept-destruct.json
├── server.accept-error-connect.json
├── server.accept-failed-connect.json
├── server.accept-failed-http.json
├── server.accept-failed-ws-key.json
├── server.accept-timeout.json
├── server.accept.json
├── server.close.json
├── server.construct-error-socket-server.json
├── server.construct-failed-socket-server.json
└── server.construct.json
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 | ## Expected Behavior
16 |
17 |
18 |
19 | ## Current Behavior
20 |
21 |
22 |
23 | ## Possible Solution
24 |
25 |
26 |
27 | ## Steps to Reproduce (for bugs)
28 |
29 |
30 | 1.
31 | 2.
32 | 3.
33 | 4.
34 |
35 | ## Context
36 |
37 |
38 |
39 | ## Your Environment
40 |
41 | * Module version (System - About):
42 | * Icinga Web 2 version and modules (System - About):
43 | * Icinga 2 version (`icinga2 --version`):
44 | * Operating System and version:
45 | * Webserver, PHP versions:
46 |
47 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Describe the bug
11 |
12 | A clear and concise description of what the bug is.
13 |
14 | ## To Reproduce
15 |
16 | Steps to reproduce the behavior:
17 |
18 | 1.
19 | 2.
20 | 3.
21 | 4.
22 |
23 | ## Expected behavior
24 |
25 | A clear and concise description of what you expected to happen.
26 |
27 | ## Screenshots
28 |
29 | If applicable, add screenshots to help explain your problem.
30 |
31 | ## Your Environment
32 |
33 | * Module version:
34 | * Dependent module versions:
35 | * Icinga Web 2 version and modules (System - About):
36 | * Chrome/Chromium version (`google-chrome --version`):
37 | * Web browser and version:
38 | * PHP version used (`php --version`):
39 | * Server operating system and version:
40 |
41 | ## Additional context
42 |
43 | Add any other context about the problem here.
44 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Is your feature request related to a problem? Please describe.
11 | A clear and concise description of what the problem is. Ex. I'm always using this feature but am missing [...]
12 |
13 | ## Describe the solution you'd like
14 | A clear and concise description of what you want to happen.
15 |
16 | ## Describe alternatives you've considered
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | ## Additional context
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/L10n-update.yml:
--------------------------------------------------------------------------------
1 | name: L10n Update
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | update:
10 | uses: icinga/github-actions/.github/workflows/L10n-update.yml@main
11 | secrets: inherit
12 |
--------------------------------------------------------------------------------
/.github/workflows/php.yml:
--------------------------------------------------------------------------------
1 | name: PHP Tests
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | - release/*
8 | pull_request:
9 | branches:
10 | - main
11 |
12 | jobs:
13 | lint:
14 | name: Static analysis for php ${{ matrix.php }} on ${{ matrix.os }}
15 | runs-on: ${{ matrix.os }}
16 |
17 | strategy:
18 | fail-fast: false
19 | matrix:
20 | php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
21 | os: ['ubuntu-latest']
22 |
23 | steps:
24 | - name: Checkout code base
25 | uses: actions/checkout@v4
26 |
27 | - name: Setup PHP
28 | uses: shivammathur/setup-php@v2
29 | with:
30 | php-version: ${{ matrix.php }}
31 | tools: phpcs
32 |
33 | - name: Setup dependencies
34 | run: composer require -n --no-progress overtrue/phplint
35 |
36 | - name: PHP Lint
37 | if: ${{ ! cancelled() }}
38 | run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- .
39 |
40 | - name: PHP CodeSniffer
41 | if: ${{ ! cancelled() }}
42 | run: phpcs
43 |
--------------------------------------------------------------------------------
/.github/workflows/phpstan.yml:
--------------------------------------------------------------------------------
1 | name: PHPStan
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | phpstan:
10 | uses: icinga/github-actions/.github/workflows/phpstan.yml@main
11 | with:
12 | dependencies: |
13 | {
14 | "/icingaweb2" : "https://github.com/Icinga/icingaweb2.git"
15 | }
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Exclude all hidden files
2 | .*
3 |
4 | # Except those related to Git
5 | !.git*
6 |
--------------------------------------------------------------------------------
/.phpcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sniff our code a while
4 |
5 | ./
6 |
7 | vendor/*
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Icinga PDF Export
2 |
3 | [](https://php.net/)
4 | 
5 | [](https://github.com/Icinga/icingaweb2-module-pdfexport)
6 |
7 | PDF export functionality for Icinga Web 2 using Google Chrome/Chromium for rendering.
8 |
9 | ## Documentation
10 |
11 | * [Installation](doc/02-Installation.md)
12 | * [Troubleshooting](doc/70-Troubleshooting.md)
13 |
--------------------------------------------------------------------------------
/application/controllers/ConfigController.php:
--------------------------------------------------------------------------------
1 | assertPermission('config/modules');
16 |
17 | parent::init();
18 | }
19 |
20 | public function chromeAction()
21 | {
22 | $form = (new ChromeBinaryForm())
23 | ->setIniConfig(Config::module('pdfexport'));
24 |
25 | $form->handleRequest();
26 |
27 | $this->view->tabs = $this->Module()->getConfigTabs()->activate('chrome');
28 | $this->view->form = $form;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/application/views/scripts/config/chrome.phtml:
--------------------------------------------------------------------------------
1 |
2 | = /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs ?>
3 |
4 |
5 | = /** @var \Icinga\Module\Pdfexport\Forms\ChromeBinaryForm $form */ $form ?>
6 |
7 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "textalk/websocket": "^1.5",
4 | "iio/libmergepdf": "^4.0",
5 | "cweagans/composer-patches": "^1.7"
6 | },
7 | "config": {
8 | "sort-packages": true,
9 | "platform": {
10 | "php": "7.2.9"
11 | },
12 | "allow-plugins": {
13 | "cweagans/composer-patches": true
14 | }
15 | },
16 | "extra": {
17 | "composer-exit-on-patch-failure": true,
18 | "patches": {
19 | "iio/libmergepdf": {
20 | "Add PHP 8.2 support": "patches/iio-libmergepdf-support-php82.patch"
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/configuration.php:
--------------------------------------------------------------------------------
1 | provideConfigTab('chrome', array(
8 | 'title' => $this->translate('Configure the Chrome/Chromium connection'),
9 | 'label' => $this->translate('Chrome'),
10 | 'url' => 'config/chrome'
11 | ));
12 |
--------------------------------------------------------------------------------
/doc/70-Troubleshooting.md:
--------------------------------------------------------------------------------
1 | # Troubleshooting
2 |
3 | ## PDF Export
4 |
5 | If the PDF export fails, ensure that Chrome headless works fine.
6 | You can test that on the CLI like this:
7 |
8 | ```
9 | google-chrome --version
10 | ```
11 |
12 | If you have a local installation, you could also try to force temporary local
13 | storage. (Available in the module's configuration) This will store the content
14 | to print on disk, instead of transferring it directly to the browser. Note that
15 | for this to work, the browser needs to be able to access the temporary files of
16 | the webserver's process user.
17 |
--------------------------------------------------------------------------------
/library/Pdfexport/PrintStyleSheet.php:
--------------------------------------------------------------------------------
1 | lessCompiler->setTheme(join(DIRECTORY_SEPARATOR, [
17 | Icinga::app()->getModuleManager()->getModule('pdfexport')->getCssDir(),
18 | 'print.less'
19 | ]));
20 |
21 | if (method_exists($this->lessCompiler, 'setThemeMode')) {
22 | $this->lessCompiler->setThemeMode($this->pubPath . '/css/modes/none.less');
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/module.info:
--------------------------------------------------------------------------------
1 | Module: PDF Export
2 | Version: 0.11.0
3 | Requires:
4 | Libraries: icinga-php-library (>=0.8.0), icinga-php-thirdparty (>=0.10.0)
5 | Description: PDF Export via Google Chrome/Chromium
6 |
--------------------------------------------------------------------------------
/phpstan.neon:
--------------------------------------------------------------------------------
1 | includes:
2 | - phpstan-baseline.neon
3 |
4 | parameters:
5 | level: max
6 |
7 | checkFunctionNameCase: true
8 | checkInternalClassCaseSensitivity: true
9 | treatPhpDocTypesAsCertain: false
10 |
11 | paths:
12 | - application
13 | - library
14 |
15 | ignoreErrors:
16 | -
17 | messages:
18 | - '#Unsafe usage of new static\(\)#'
19 | - '#. but return statement is missing#'
20 | reportUnmatched: false
21 |
22 | scanDirectories:
23 | - /icingaweb2
24 | - /usr/share/icinga-php
25 |
26 | universalObjectCratesClasses:
27 | - Icinga\Web\View
28 |
--------------------------------------------------------------------------------
/public/css/print.less:
--------------------------------------------------------------------------------
1 | // icingaweb2
2 |
3 | @gray: #7F7F7F;
4 | @gray-semilight: #A9A9A9;
5 | @gray-light: #C9C9C9;
6 | @gray-lighter: #EEEEEE;
7 | @gray-lightest: #F7F7F7;
8 | @icinga-blue: #0095BF;
9 | @low-sat-blue: #dae3e6;
10 | @low-sat-blue-dark: #becbcf;
11 | @body-bg-color: #fff;
12 | @text-color: @black;
13 | @text-color-light: @gray;
14 | @tr-active-color: @body-bg-color;
15 | @tr-hover-color: @body-bg-color;
16 |
17 | // ipl-web
18 | @default-bg: @body-bg-color;
19 |
20 | @base-gray: @gray;
21 | @base-gray-light: @gray-light;
22 | @base-gray-lighter: @gray-lighter;
23 | @base-disabled: @disabled-gray;
24 | @base-primary-color: @icinga-blue;
25 | @base-primary-bg: @icinga-blue;
26 |
27 | @default-text-color: @text-color;
28 | @default-text-color-light: @text-color-light;
29 | @default-text-color-inverted: @text-color-inverted;
30 |
--------------------------------------------------------------------------------
/public/js/layout.js:
--------------------------------------------------------------------------------
1 | /* Icinga PDF Export | (c) 2021 Icinga GmbH | GPLv2 */
2 |
3 | "use strict";
4 |
5 | class Layout
6 | {
7 | static #plugins = [];
8 |
9 | static registerPlugin(name, plugin) {
10 | this.#plugins.push([name, plugin]);
11 | }
12 |
13 | apply() {
14 | for (let [name, plugin] of Layout.#plugins) {
15 | try {
16 | plugin();
17 | } catch (error) {
18 | console.error('Layout plugin ' + name + ' failed to run: ' + error);
19 | }
20 | }
21 |
22 | this.finish();
23 | }
24 |
25 | finish() {
26 | document.documentElement.dataset.layoutReady = 'yes';
27 | document.dispatchEvent(new CustomEvent('layout-ready', {
28 | cancelable: false,
29 | bubbles: false
30 | }));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/run.php:
--------------------------------------------------------------------------------
1 | provideHook('Pdfexport');
8 |
9 | require_once 'vendor/autoload.php';
10 |
--------------------------------------------------------------------------------
/vendor/autoload.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/setasign/fpdi/src'),
10 | 'iio\\libmergepdf\\' => array($vendorDir . '/iio/libmergepdf/src'),
11 | 'cweagans\\Composer\\' => array($vendorDir . '/cweagans/composer-patches/src'),
12 | 'WebSocket\\' => array($vendorDir . '/textalk/websocket/lib'),
13 | 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
14 | );
15 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | register(true);
35 |
36 | return $loader;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/composer/platform_check.php:
--------------------------------------------------------------------------------
1 | = 70200)) {
8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
9 | }
10 |
11 | if ($issues) {
12 | if (!headers_sent()) {
13 | header('HTTP/1.1 500 Internal Server Error');
14 | }
15 | if (!ini_get('display_errors')) {
16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 | } elseif (!headers_sent()) {
19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 | }
21 | }
22 | trigger_error(
23 | 'Composer detected issues in your platform: ' . implode(' ', $issues),
24 | E_USER_ERROR
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2013 Cameron Eagans
2 |
3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 |
5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
8 |
9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cweagans/composer-patches",
3 | "description": "Provides a way to patch Composer packages.",
4 | "minimum-stability": "dev",
5 | "license": "BSD-3-Clause",
6 | "type": "composer-plugin",
7 | "extra": {
8 | "class": "cweagans\\Composer\\Patches"
9 | },
10 | "authors": [
11 | {
12 | "name": "Cameron Eagans",
13 | "email": "me@cweagans.net"
14 | }
15 | ],
16 | "require": {
17 | "php": ">=5.3.0",
18 | "composer-plugin-api": "^1.0 || ^2.0"
19 | },
20 | "require-dev": {
21 | "composer/composer": "~1.0 || ~2.0",
22 | "phpunit/phpunit": "~4.6"
23 | },
24 | "autoload": {
25 | "psr-4": {"cweagans\\Composer\\": "src"}
26 | },
27 | "autoload-dev": {
28 | "psr-4": {"cweagans\\Composer\\Tests\\": "tests"}
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ./tests/
7 |
8 |
9 |
10 |
11 |
12 | src/
13 |
14 |
15 | vendor/
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/src/PatchEvent.php:
--------------------------------------------------------------------------------
1 | package = $package;
39 | $this->url = $url;
40 | $this->description = $description;
41 | }
42 |
43 | /**
44 | * Returns the package that is patched.
45 | *
46 | * @return PackageInterface
47 | */
48 | public function getPackage() {
49 | return $this->package;
50 | }
51 |
52 | /**
53 | * Returns the url of the patch.
54 | *
55 | * @return string
56 | */
57 | public function getUrl() {
58 | return $this->url;
59 | }
60 |
61 | /**
62 | * Returns the description of the patch.
63 | *
64 | * @return string
65 | */
66 | public function getDescription() {
67 | return $this->description;
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/vendor/cweagans/composer-patches/src/PatchEvents.php:
--------------------------------------------------------------------------------
1 | assertEquals($event_name, $patch_event->getName());
24 | $this->assertEquals($package, $patch_event->getPackage());
25 | $this->assertEquals($url, $patch_event->getUrl());
26 | $this->assertEquals($description, $patch_event->getDescription());
27 | }
28 |
29 | public function patchEventDataProvider() {
30 | $prophecy = $this->prophesize('Composer\Package\PackageInterface');
31 | $package = $prophecy->reveal();
32 |
33 | return array(
34 | array(PatchEvents::PRE_PATCH_APPLY, $package, 'https://www.drupal.org', 'A test patch'),
35 | array(PatchEvents::POST_PATCH_APPLY, $package, 'https://www.drupal.org', 'A test patch'),
36 | );
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Include files**
21 | Please include the files that you are trying to merge so that the error can be reproduced.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Please complete the following information:**
27 | - PHP-version
28 | - Version of library [e.g. 22]
29 | - Driver used
30 |
31 | **Additional context**
32 | Add any other context about the problem here.
33 |
34 | > Please note that this library is only a wrapper around other pdf editing tools.
35 | > As such we are only able to respond to problems regaring the actual
36 | > merging process. Issues concering deeper pdf parsing problems should
37 | > be directed elsewhere.
38 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/PATCHES.txt:
--------------------------------------------------------------------------------
1 | This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
2 | Patches applied to this directory:
3 |
4 | Add PHP 8.2 support
5 | Source: patches/iio-libmergepdf-support-php82.patch
6 |
7 |
8 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iio/libmergepdf",
3 | "description": "Library for merging multiple PDFs",
4 | "keywords": ["pdf", "merge"],
5 | "homepage": "https://github.com/hanneskod/libmergepdf",
6 | "type": "library",
7 | "license": "WTFPL",
8 | "authors": [
9 | {
10 | "name": "Hannes Forsgård",
11 | "email": "hannes.forsgard@fripost.org"
12 | }
13 | ],
14 | "autoload": {
15 | "psr-4": {
16 | "iio\\libmergepdf\\": "src/"
17 | },
18 | "classmap": [
19 | "tcpdi/"
20 | ]
21 | },
22 | "require": {
23 | "php": "^7.1||^8.0",
24 | "tecnickcom/tcpdf": "^6.2.22",
25 | "setasign/fpdi": "^2"
26 | },
27 | "conflict": {
28 | "setasign/fpdf": "*",
29 | "rafikhaceb/tcpdi": "*"
30 | },
31 | "require-dev": {
32 | "phpunit/phpunit": "^7|^8",
33 | "smalot/pdfparser": "~0.13"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/src/Driver/DefaultDriver.php:
--------------------------------------------------------------------------------
1 | wrapped = $wrapped ?: new Fpdi2Driver;
19 | }
20 |
21 | public function merge(SourceInterface ...$sources): string
22 | {
23 | return $this->wrapped->merge(...$sources);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/src/Driver/DriverInterface.php:
--------------------------------------------------------------------------------
1 | filename = $filename;
33 | $this->pages = $pages ?: new Pages;
34 | }
35 |
36 | public function getName(): string
37 | {
38 | return $this->filename;
39 | }
40 |
41 | public function getContents(): string
42 | {
43 | return (string)file_get_contents($this->filename);
44 | }
45 |
46 | public function getPages(): PagesInterface
47 | {
48 | return $this->pages;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/src/Source/RawSource.php:
--------------------------------------------------------------------------------
1 | contents = $contents;
28 | $this->pages = $pages ?: new Pages;
29 | }
30 |
31 | public function getName(): string
32 | {
33 | return "raw-content";
34 | }
35 |
36 | public function getContents(): string
37 | {
38 | return $this->contents;
39 | }
40 |
41 | public function getPages(): PagesInterface
42 | {
43 | return $this->pages;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/iio/libmergepdf/src/Source/SourceInterface.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/NullLogger.php:
--------------------------------------------------------------------------------
1 | logger) { }`
11 | * blocks.
12 | */
13 | class NullLogger extends AbstractLogger
14 | {
15 | /**
16 | * Logs with an arbitrary level.
17 | *
18 | * @param mixed $level
19 | * @param string $message
20 | * @param array $context
21 | *
22 | * @return void
23 | *
24 | * @throws \Psr\Log\InvalidArgumentException
25 | */
26 | public function log($level, $message, array $context = array())
27 | {
28 | // noop
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/Test/DummyTest.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
34 | }
35 |
36 | public function doSomething()
37 | {
38 | if ($this->logger) {
39 | $this->logger->info('Doing work');
40 | }
41 |
42 | try {
43 | $this->doSomethingElse();
44 | } catch (Exception $exception) {
45 | $this->logger->error('Oh no!', array('exception' => $exception));
46 | }
47 |
48 | // do something useful
49 | }
50 | }
51 | ```
52 |
53 | You can then pick one of the implementations of the interface to get a logger.
54 |
55 | If you want to implement the interface, you can require this package and
56 | implement `Psr\Log\LoggerInterface` in your code. Please read the
57 | [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
58 | for details.
59 |
--------------------------------------------------------------------------------
/vendor/psr/log/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/log",
3 | "description": "Common interface for logging libraries",
4 | "keywords": ["psr", "psr-3", "log"],
5 | "homepage": "https://github.com/php-fig/log",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "PHP-FIG",
10 | "homepage": "https://www.php-fig.org/"
11 | }
12 | ],
13 | "require": {
14 | "php": ">=5.3.0"
15 | },
16 | "autoload": {
17 | "psr-4": {
18 | "Psr\\Log\\": "Psr/Log/"
19 | }
20 | },
21 | "extra": {
22 | "branch-alias": {
23 | "dev-master": "1.1.x-dev"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2023 Setasign GmbH & Co. KG, https://www.setasign.com
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/SECURITY.md:
--------------------------------------------------------------------------------
1 | ## Security contact information
2 |
3 | To report a security vulnerability, please use the
4 | [Tidelift security contact](https://tidelift.com/security).
5 | Tidelift will coordinate the fix and disclosure.
6 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/FpdfTpl.php:
--------------------------------------------------------------------------------
1 | x = (float)$x;
35 | $this->y = (float)$y;
36 | }
37 |
38 | /**
39 | * @return float
40 | */
41 | public function getX()
42 | {
43 | return $this->x;
44 | }
45 |
46 | /**
47 | * @return float
48 | */
49 | public function getY()
50 | {
51 | return $this->y;
52 | }
53 |
54 | /**
55 | * @param Matrix $matrix
56 | * @return Vector
57 | */
58 | public function multiplyWithMatrix(Matrix $matrix)
59 | {
60 | list($a, $b, $c, $d, $e, $f) = $matrix->getValues();
61 | $x = $a * $this->x + $c * $this->y + $e;
62 | $y = $b * $this->x + $d * $this->y + $f;
63 |
64 | return new self($x, $y);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php:
--------------------------------------------------------------------------------
1 | '));
27 | if ((\strlen($data) % 2) === 1) {
28 | $data .= '0';
29 | }
30 |
31 | return \pack('H*', $data);
32 | }
33 |
34 | /**
35 | * Converts a string into ASCII hexadecimal representation.
36 | *
37 | * @param string $data The input string
38 | * @param boolean $leaveEOD
39 | * @return string
40 | */
41 | public function encode($data, $leaveEOD = false)
42 | {
43 | $t = \unpack('H*', $data);
44 | return \current($t)
45 | . ($leaveEOD ? '' : '>');
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/Filter/FilterException.php:
--------------------------------------------------------------------------------
1 | value = (bool) $value;
28 | return $v;
29 | }
30 |
31 | /**
32 | * Ensures that the passed value is a PdfBoolean instance.
33 | *
34 | * @param mixed $value
35 | * @return self
36 | * @throws PdfTypeException
37 | */
38 | public static function ensure($value)
39 | {
40 | return PdfType::ensureType(self::class, $value, 'Boolean value expected.');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php:
--------------------------------------------------------------------------------
1 | value = (int) $objectNumber;
29 | $v->generationNumber = (int) $generationNumber;
30 |
31 | return $v;
32 | }
33 |
34 | /**
35 | * Ensures that the passed value is a PdfIndirectObject instance.
36 | *
37 | * @param mixed $value
38 | * @return self
39 | * @throws PdfTypeException
40 | */
41 | public static function ensure($value)
42 | {
43 | return PdfType::ensureType(self::class, $value, 'Indirect reference value expected.');
44 | }
45 |
46 | /**
47 | * The generation number.
48 | *
49 | * @var int
50 | */
51 | public $generationNumber;
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php:
--------------------------------------------------------------------------------
1 | value = $value + 0;
28 |
29 | return $v;
30 | }
31 |
32 | /**
33 | * Ensures that the passed value is a PdfNumeric instance.
34 | *
35 | * @param mixed $value
36 | * @return self
37 | * @throws PdfTypeException
38 | */
39 | public static function ensure($value)
40 | {
41 | return PdfType::ensureType(self::class, $value, 'Numeric value expected.');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php:
--------------------------------------------------------------------------------
1 | value = $token;
28 |
29 | return $v;
30 | }
31 |
32 | /**
33 | * Ensures that the passed value is a PdfToken instance.
34 | *
35 | * @param mixed $token
36 | * @return self
37 | * @throws PdfTypeException
38 | */
39 | public static function ensure($token)
40 | {
41 | return PdfType::ensureType(self::class, $token, 'Token value expected.');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/setasign/fpdi/src/PdfParser/Type/PdfTypeException.php:
--------------------------------------------------------------------------------
1 | =5.5.0"
26 | },
27 | "autoload": {
28 | "classmap": [
29 | "config",
30 | "include",
31 | "tcpdf.php",
32 | "tcpdf_parser.php",
33 | "tcpdf_import.php",
34 | "tcpdf_barcodes_1d.php",
35 | "tcpdf_barcodes_2d.php",
36 | "include/tcpdf_colors.php",
37 | "include/tcpdf_filters.php",
38 | "include/tcpdf_font_data.php",
39 | "include/tcpdf_fonts.php",
40 | "include/tcpdf_images.php",
41 | "include/tcpdf_static.php",
42 | "include/barcodes/datamatrix.php",
43 | "include/barcodes/pdf417.php",
44 | "include/barcodes/qrcode.php"
45 | ]
46 | },
47 | "archive": {
48 | "exclude": [
49 | "/examples"
50 | ]
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.fdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.fdf
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.p12
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/data/table_data_demo.txt:
--------------------------------------------------------------------------------
1 | Austria;Vienna;83859;8075
2 | Belgium;Brussels;30518;10192
3 | Denmark;Copenhagen;43094;5295
4 | Finland;Helsinki;304529;5147
5 | France;Paris;543965;58728
6 | Germany;Berlin;357022;82057
7 | Greece;Athens;131625;10511
8 | Ireland;Dublin;70723;3694
9 | Italy;Roma;301316;57563
10 | Luxembourg;Luxembourg;2586;424
11 | Netherlands;Amsterdam;41526;15654
12 | Portugal;Lisbon;91906;9957
13 | Spain;Madrid;504790;39348
14 | Sweden;Stockholm;410934;8839
15 | United Kingdom;London;243820;58862
16 |
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/example_012.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/example_012.pdf
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/_blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/_blank.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/alpha.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/image_demo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/image_demo.jpg
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/image_with_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/image_with_alpha.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/img.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/logo_example.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/logo_example.gif
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/logo_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/logo_example.jpg
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/logo_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/logo_example.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/tcpdf_cell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/tcpdf_cell.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/tcpdf_logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/tcpdf_logo.jpg
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/images/tcpdf_signature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Icinga/icingaweb2-module-pdfexport/d93a4322714a8d9ffd22fc3e341dc77f2514c769/vendor/tecnickcom/tcpdf/examples/images/tcpdf_signature.png
--------------------------------------------------------------------------------
/vendor/tecnickcom/tcpdf/examples/lang/afr.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "textalk/websocket",
3 | "description": "WebSocket client and server",
4 | "license": "ISC",
5 | "type": "library",
6 | "authors": [
7 | {
8 | "name": "Fredrik Liljegren"
9 | },
10 | {
11 | "name": "Sören Jensen",
12 | "email": "soren@abicart.se"
13 | }
14 | ],
15 | "autoload": {
16 | "psr-4": {
17 | "WebSocket\\": "lib"
18 | }
19 | },
20 | "autoload-dev": {
21 | "psr-4": {
22 | "WebSocket\\": "tests/mock"
23 | }
24 | },
25 | "require": {
26 | "php": "^7.2 | ^8.0",
27 | "psr/log": "^1 | ^2 | ^3"
28 | },
29 | "require-dev": {
30 | "phpunit/phpunit": "^8.0|^9.0",
31 | "php-coveralls/php-coveralls": "^2.0",
32 | "squizlabs/php_codesniffer": "^3.5"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/docs/Contributing.md:
--------------------------------------------------------------------------------
1 | [Client](Client.md) • [Server](Server.md) • [Message](Message.md) • [Examples](Examples.md) • [Changelog](Changelog.md) • Contributing
2 |
3 | # Websocket: Contributing
4 |
5 | Everyone is welcome to help out!
6 | But to keep this project sustainable, please ensure your contribution respects the requirements below.
7 |
8 | ## PR Requirements
9 |
10 | Requirements on pull requests;
11 | * All tests **MUST** pass.
12 | * Code coverage **MUST** remain at 100%.
13 | * Code **MUST** adhere to PSR-1 and PSR-12 code standards.
14 |
15 | ## Dependency management
16 |
17 | Install or update dependencies using [Composer](https://getcomposer.org/).
18 |
19 | ```
20 | # Install dependencies
21 | make install
22 |
23 | # Update dependencies
24 | make update
25 | ```
26 |
27 | ## Code standard
28 |
29 | This project uses [PSR-1](https://www.php-fig.org/psr/psr-1/) and [PSR-12](https://www.php-fig.org/psr/psr-12/) code standards.
30 | ```
31 | # Check code standard adherence
32 | make cs-check
33 | ```
34 |
35 | ## Unit testing
36 |
37 | Unit tests with [PHPUnit](https://phpunit.readthedocs.io/), coverage with [Coveralls](https://github.com/php-coveralls/php-coveralls)
38 | ```
39 | # Run unit tests
40 | make test
41 |
42 | # Create coverage
43 | make coverage
44 | ```
45 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/lib/BadOpcodeException.php:
--------------------------------------------------------------------------------
1 | data = $data;
20 | }
21 |
22 | public function getData(): array
23 | {
24 | return $this->data;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/lib/Exception.php:
--------------------------------------------------------------------------------
1 | payload = $payload;
16 | $this->timestamp = new DateTime();
17 | }
18 |
19 | public function getOpcode(): string
20 | {
21 | return $this->opcode;
22 | }
23 |
24 | public function getLength(): int
25 | {
26 | return strlen($this->payload);
27 | }
28 |
29 | public function getTimestamp(): DateTime
30 | {
31 | return $this->timestamp;
32 | }
33 |
34 | public function getContent(): string
35 | {
36 | return $this->payload;
37 | }
38 |
39 | public function setContent(string $payload = ''): void
40 | {
41 | $this->payload = $payload;
42 | }
43 |
44 | public function hasContent(): bool
45 | {
46 | return $this->payload != '';
47 | }
48 |
49 | public function __toString(): string
50 | {
51 | return get_class($this);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/lib/Message/Ping.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | tests
7 |
8 |
9 |
10 |
11 | lib/
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/ExceptionTest.php:
--------------------------------------------------------------------------------
1 | 'with data'],
28 | new TimeoutException(
29 | 'Nested exception',
30 | ConnectionException::TIMED_OUT
31 | )
32 | );
33 | } catch (Throwable $e) {
34 | }
35 |
36 | $this->assertInstanceOf('WebSocket\ConnectionException', $e);
37 | $this->assertInstanceOf('WebSocket\Exception', $e);
38 | $this->assertInstanceOf('Exception', $e);
39 | $this->assertInstanceOf('Throwable', $e);
40 | $this->assertEquals('An error message', $e->getMessage());
41 | $this->assertEquals(1025, $e->getCode());
42 | $this->assertEquals(['test' => 'with data'], $e->getData());
43 |
44 | $p = $e->getPrevious();
45 | $this->assertInstanceOf('WebSocket\TimeoutException', $p);
46 | $this->assertInstanceOf('WebSocket\ConnectionException', $p);
47 | $this->assertEquals('Nested exception', $p->getMessage());
48 | $this->assertEquals(1024, $p->getCode());
49 | $this->assertEquals([], $p->getData());
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/README.md:
--------------------------------------------------------------------------------
1 | # Testing
2 |
3 | Unit tests with [PHPUnit](https://phpunit.readthedocs.io/).
4 |
5 |
6 | ## How to run
7 |
8 | To run all test, run in console.
9 |
10 | ```
11 | make test
12 | ```
13 |
14 |
15 | ## Continuous integration
16 |
17 | GitHub Actions are run on PHP versions
18 | `7.2`, `7.3`, `7.4` and `8.0`.
19 |
20 | Code coverage by [Coveralls](https://coveralls.io/github/Textalk/websocket-php).
21 |
22 |
23 | ## Test strategy
24 |
25 | Test set up overloads various stream and socket functions,
26 | and use "scripts" to define and mock input/output of these functions.
27 |
28 | This set up negates the dependency on running servers,
29 | and allow testing various errors that might occur.
30 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | interpolate($message, $context);
16 | $context_string = empty($context) ? '' : json_encode($context);
17 | echo str_pad($level, 8) . " | {$message} {$context_string}\n";
18 | }
19 |
20 | public function interpolate($message, array $context = [])
21 | {
22 | // Build a replacement array with braces around the context keys
23 | $replace = [];
24 | foreach ($context as $key => $val) {
25 | // Check that the value can be cast to string
26 | if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
27 | $replace['{' . $key . '}'] = $val;
28 | }
29 | }
30 |
31 | // Interpolate replacement values into the message and return
32 | return strtr($message, $replace);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/mock/payload.128.txt:
--------------------------------------------------------------------------------
1 | 128-chars
2 | abscdefgheijklmnopqrstuvwxyz0123456789
3 | abscdefgheijklmnopqrstuvwxyz0123456789
4 | abscdefgheijklmnopqrstuvwxyz0123456789
5 | a
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-authed.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "ssl:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 248
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return-op": "key-respond",
49 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}\r\n\r\n"
50 | },
51 | {
52 | "function": "fwrite",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return": 13
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-bad-context.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [],
5 | "return": "@mock-bad-context"
6 | }
7 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-context.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [],
5 | "return": "stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 199
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return-op": "key-respond",
49 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}\r\n\r\n"
50 | },
51 | {
52 | "function": "fwrite",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return": 13
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-error.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "error": {
18 | "msg": "A PHP error",
19 | "type": 512
20 | },
21 | "return": false
22 | }
23 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-extended.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 224
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return-op": "key-respond",
49 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}\r\n\r\n"
50 | },
51 | {
52 | "function": "fwrite",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return": 13
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-failed.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": false
18 | }
19 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-handshake-error.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 199
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return": false
49 | },
50 | {
51 | "function": "stream_get_meta_data",
52 | "params": [
53 | "@mock-stream"
54 | ],
55 | "return": {
56 | "timed_out": true,
57 | "blocked": true,
58 | "eof": false,
59 | "stream_type": "tcp_socket\/ssl",
60 | "mode": "r+",
61 | "unread_bytes": 0,
62 | "seekable": false
63 | }
64 | }
65 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return": 199
40 | },
41 | {
42 | "function": "fgets",
43 | "params": [
44 | "@mock-stream",
45 | 1024
46 | ],
47 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: BAD\r\n\r\n"
48 | }
49 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-invalid-upgrade.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return": 199
40 | },
41 | {
42 | "function": "fgets",
43 | "params": [
44 | "@mock-stream",
45 | 1024
46 | ],
47 | "return": "Invalid upgrade response\r\n\r\n"
48 | }
49 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect-timeout.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 300,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 300
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 199
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return-op": "key-respond",
49 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}\r\n\r\n"
50 | },
51 | {
52 | "function": "fwrite",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return": 13
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.connect.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_context_create",
4 | "params": [],
5 | "return": "@mock-stream-context"
6 | },
7 | {
8 | "function": "stream_socket_client",
9 | "params": [
10 | "tcp:\/\/localhost:8000",
11 | null,
12 | null,
13 | 5,
14 | 4,
15 | "@mock-stream-context"
16 | ],
17 | "return": "@mock-stream"
18 | },
19 | {
20 | "function": "get_resource_type",
21 | "params": [
22 | "@mock-stream"
23 | ],
24 | "return": "stream"
25 | },
26 | {
27 | "function": "stream_set_timeout",
28 | "params": [
29 | "@mock-stream",
30 | 5
31 | ],
32 | "return": true
33 | },
34 | {
35 | "function": "fwrite",
36 | "params": [
37 | "@mock-stream"
38 | ],
39 | "return-op": "key-save",
40 | "return": 199
41 | },
42 | {
43 | "function": "fgets",
44 | "params": [
45 | "@mock-stream",
46 | 1024
47 | ],
48 | "return-op": "key-respond",
49 | "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}\r\n\r\n"
50 | },
51 | {
52 | "function": "fwrite",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return": 13
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/client.destruct.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "get_resource_type",
11 | "params": [
12 | "@mock-stream"
13 | ],
14 | "return": "stream"
15 | },
16 | {
17 | "function": "fclose",
18 | "params": [
19 | "@mock-stream"
20 | ],
21 | "return": true
22 | }
23 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/close-remote.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fread",
11 | "params": [
12 | "@mock-stream",
13 | 2
14 | ],
15 | "return-op": "chr-array",
16 | "return": [136, 137]
17 | },
18 | {
19 | "function": "fread",
20 | "params": [
21 | "@mock-stream",
22 | 4
23 | ],
24 | "return-op": "chr-array",
25 | "return": [54, 79, 233, 244]
26 | },
27 | {
28 | "function": "fread",
29 | "params": [
30 | "@mock-stream",
31 | 9
32 | ],
33 | "return-op": "chr-array",
34 | "return": [117, 35, 170, 152, 89, 60, 128, 154, 81]
35 | },
36 | {
37 | "function": "get_resource_type",
38 | "params": [
39 | "@mock-stream"
40 | ],
41 | "return": "stream"
42 | },
43 | {
44 | "function": "fwrite",
45 | "params": [],
46 | "return": 33
47 | },
48 | {
49 | "function": "fclose",
50 | "params": [
51 | "@mock-stream"
52 | ],
53 | "return": true
54 | }
55 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/config-timeout.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "stream_set_timeout",
11 | "params": [
12 | "@mock-stream",
13 | 300
14 | ],
15 | "return": true
16 | },
17 | {
18 | "function": "get_resource_type",
19 | "params": [
20 | "@mock-stream"
21 | ],
22 | "return": "stream"
23 | }
24 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/receive-bad-opcode.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fread",
11 | "params": [
12 | "@mock-stream",
13 | 2
14 | ],
15 | "return-op": "chr-array",
16 | "return": [140, 115]
17 | }
18 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/receive-broken-read.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fread",
11 | "params": [],
12 | "return": false
13 | },
14 | {
15 | "function": "stream_get_meta_data",
16 | "params": [
17 | "@mock-stream"
18 | ],
19 | "return": {
20 | "timed_out": false,
21 | "blocked": true,
22 | "eof": true,
23 | "stream_type": "tcp_socket\/ssl",
24 | "mode": "r+",
25 | "unread_bytes": 2,
26 | "seekable": false
27 | }
28 | },
29 | {
30 | "function": "get_resource_type",
31 | "params": [
32 | "@mock-stream"
33 | ],
34 | "return": "stream"
35 | },
36 | {
37 | "function": "stream_get_meta_data",
38 | "params": [
39 | "@mock-stream"
40 | ],
41 | "return": {
42 | "timed_out": false,
43 | "blocked": true,
44 | "eof": true,
45 | "stream_type": "tcp_socket\/ssl",
46 | "mode": "r+",
47 | "unread_bytes": 2,
48 | "seekable": false
49 | }
50 | },
51 | {
52 | "function": "fclose",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return":true
57 | }
58 | ]
59 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/receive-client-timeout.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fread",
11 | "params": [],
12 | "return": false
13 | },
14 | {
15 | "function": "stream_get_meta_data",
16 | "params": [
17 | "@mock-stream"
18 | ],
19 | "return": {
20 | "timed_out": true,
21 | "blocked": true,
22 | "eof": false,
23 | "stream_type": "tcp_socket\/ssl",
24 | "mode": "r+",
25 | "unread_bytes": 0,
26 | "seekable": false
27 | }
28 | },
29 | {
30 | "function": "get_resource_type",
31 | "params": [
32 | "@mock-stream"
33 | ],
34 | "return": "stream"
35 | },
36 | {
37 | "function": "get_resource_type",
38 | "params": [
39 | "@mock-stream"
40 | ],
41 | "return": "stream"
42 | },
43 | {
44 | "function": "fclose",
45 | "params": [
46 | "@mock-stream"
47 | ],
48 | "return":true
49 | }
50 | ]
51 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/receive-empty-read.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fread",
11 | "params": [],
12 | "return": ""
13 | },
14 | {
15 | "function": "stream_get_meta_data",
16 | "params": [
17 | "@mock-stream"
18 | ],
19 | "return": {
20 | "timed_out": false,
21 | "blocked": true,
22 | "eof": false,
23 | "stream_type": "tcp_socket\/ssl",
24 | "mode": "r+",
25 | "unread_bytes": 0,
26 | "seekable": false
27 | }
28 | },
29 | {
30 | "function": "get_resource_type",
31 | "params": [
32 | "@mock-stream"
33 | ],
34 | "return": "stream"
35 | },
36 | {
37 | "function": "stream_get_meta_data",
38 | "params": [
39 | "@mock-stream"
40 | ],
41 | "return": {
42 | "timed_out": true,
43 | "blocked": true,
44 | "eof": false,
45 | "stream_type": "tcp_socket\/ssl",
46 | "mode": "r+",
47 | "unread_bytes": 2,
48 | "seekable": false
49 | }
50 | },
51 | {
52 | "function": "fclose",
53 | "params": [
54 | "@mock-stream"
55 | ],
56 | "return":true
57 | }
58 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/send-bad-opcode.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | }
9 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/send-broken-write.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fwrite",
11 | "params": [
12 | "@mock-stream"
13 | ],
14 | "return": 18
15 | },
16 | {
17 | "function": "get_resource_type",
18 | "params": [
19 | "@mock-stream"
20 | ],
21 | "return": "stream"
22 | },
23 | {
24 | "function": "stream_get_meta_data",
25 | "params": [
26 | "@mock-stream"
27 | ],
28 | "return": {
29 | "timed_out": false,
30 | "blocked": true,
31 | "eof": true,
32 | "stream_type": "tcp_socket\/ssl",
33 | "mode": "r+",
34 | "unread_bytes": 2,
35 | "seekable": false
36 | }
37 | },
38 | {
39 | "function": "fclose",
40 | "params": [],
41 | "return": true
42 | }
43 | ]
44 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/send-failed-write.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fwrite",
11 | "params": [
12 | "@mock-stream"
13 | ],
14 | "return": false
15 | },
16 | {
17 | "function": "get_resource_type",
18 | "params": [
19 | "@mock-stream"
20 | ],
21 | "return": "stream"
22 | },
23 | {
24 | "function": "stream_get_meta_data",
25 | "params": [
26 | "@mock-stream"
27 | ],
28 | "return": {
29 | "timed_out": true,
30 | "blocked": true,
31 | "eof": false,
32 | "stream_type": "tcp_socket\/ssl",
33 | "mode": "r+",
34 | "unread_bytes": 2,
35 | "seekable": false
36 | }
37 | },
38 | {
39 | "function": "fclose",
40 | "params": [],
41 | "return": true
42 | }
43 | ]
44 |
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/send-receive-128.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fwrite",
11 | "params": [
12 | "@mock-stream"
13 | ],
14 | "return": 132
15 | },
16 | {
17 | "function": "get_resource_type",
18 | "params": [
19 | "@mock-stream"
20 | ],
21 | "return": "stream"
22 | },
23 | {
24 | "function": "fread",
25 | "params": [
26 | "@mock-stream",
27 | 2
28 | ],
29 | "return-op": "chr-array",
30 | "return": [129, 126]
31 | },
32 | {
33 | "function": "fread",
34 | "params": [
35 | "@mock-stream",
36 | 2
37 | ],
38 | "return-op": "chr-array",
39 | "return": [0, 128]
40 | },
41 | {
42 | "function": "fread",
43 | "params": [
44 | "@mock-stream",
45 | 128
46 | ],
47 | "return-op": "file",
48 | "return": ["payload.128.txt", 0, 132]
49 | }
50 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/send-receive.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "get_resource_type",
4 | "params": [
5 | "@mock-stream"
6 | ],
7 | "return": "stream"
8 | },
9 | {
10 | "function": "fwrite",
11 | "params": [
12 | "@mock-stream"
13 | ],
14 | "return": 23
15 | },
16 | {
17 | "function": "get_resource_type",
18 | "params": [
19 | "@mock-stream"
20 | ],
21 | "return": "stream"
22 | },
23 | {
24 | "function": "fread",
25 | "params": [
26 | "@mock-stream",
27 | 2
28 | ],
29 | "return-op": "chr-array",
30 | "return": [129, 147]
31 | },
32 | {
33 | "function": "fread",
34 | "params": [
35 | "@mock-stream",
36 | 4
37 | ],
38 | "return-op": "chr-array",
39 | "return": [33, 111, 149, 174]
40 | },
41 | {
42 | "function": "fread",
43 | "params": [
44 | "@mock-stream",
45 | 19
46 | ],
47 | "return-op": "chr-array",
48 | "return": [115, 10, 246, 203, 72, 25, 252, 192, 70, 79, 244, 142, 76, 10, 230, 221, 64, 8, 240]
49 | }
50 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/server.accept-error-connect.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_socket_accept",
4 | "params": [],
5 | "error": {
6 | "msg": "A PHP error",
7 | "type": 512
8 | },
9 | "return": false
10 | },
11 | {
12 | "function": "fclose",
13 | "params": [
14 | false
15 | ],
16 | "return": true
17 | }
18 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/server.accept-failed-connect.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_socket_accept",
4 | "params": [],
5 | "return": false
6 | },
7 | {
8 | "function": "fclose",
9 | "params": [
10 | false
11 | ],
12 | "return": true
13 | }
14 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/server.construct-error-socket-server.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_socket_server",
4 | "params": [
5 | "tcp://0.0.0.0:9999",
6 | null,
7 | null
8 | ],
9 | "error": {
10 | "msg": "A PHP error",
11 | "type": 512
12 | },
13 | "return": false
14 | },
15 | {
16 | "function": "stream_socket_server",
17 | "params": [
18 | "tcp://0.0.0.0:10000",
19 | null,
20 | null
21 | ],
22 | "error": {
23 | "msg": "A PHP error",
24 | "type": 512
25 | },
26 | "return": false
27 | }
28 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/server.construct-failed-socket-server.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_socket_server",
4 | "params": [
5 | "tcp://0.0.0.0:9999",
6 | null,
7 | null
8 | ],
9 | "return": false
10 | },
11 | {
12 | "function": "stream_socket_server",
13 | "params": [
14 | "tcp://0.0.0.0:10000",
15 | null,
16 | null
17 | ],
18 | "return": false
19 | }
20 | ]
--------------------------------------------------------------------------------
/vendor/textalk/websocket/tests/scripts/server.construct.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "function": "stream_socket_server",
4 | "params": [
5 | "tcp://0.0.0.0:8000",
6 | null,
7 | null
8 | ],
9 | "return": "@mock-socket"
10 | }
11 | ]
--------------------------------------------------------------------------------