pax_global_header00006660000000000000000000000064151120503170014505gustar00rootroot0000000000000052 comment=f8039166007112ef2a803092726873b294a91574 icingaweb2-module-pdfexport-0.12.0+dfsg/000077500000000000000000000000001511205031700200125ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/.github/000077500000000000000000000000001511205031700213525ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/.github/ISSUE_TEMPLATE.md000066400000000000000000000027471511205031700240710ustar00rootroot00000000000000 ## Expected Behavior ## Current Behavior ## Possible Solution ## Steps to Reproduce (for bugs) 1. 2. 3. 4. ## Context ## Your Environment * Module version (System - About): * Icinga Web 2 version and modules (System - About): * Icinga 2 version (`icinga2 --version`): * Operating System and version: * Webserver, PHP versions: icingaweb2-module-pdfexport-0.12.0+dfsg/.github/ISSUE_TEMPLATE/000077500000000000000000000000001511205031700235355ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000013731511205031700262330ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- ## Describe the bug A clear and concise description of what the bug is. ## To Reproduce Steps to reproduce the behavior: 1. 2. 3. 4. ## Expected behavior A clear and concise description of what you expected to happen. ## Screenshots If applicable, add screenshots to help explain your problem. ## Your Environment * Module version: * Dependent module versions: * Icinga Web 2 version and modules (System - About): * Chrome/Chromium version (`google-chrome --version`): * Web browser and version: * PHP version used (`php --version`): * Server operating system and version: ## Additional context Add any other context about the problem here. icingaweb2-module-pdfexport-0.12.0+dfsg/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000011421511205031700272600ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- ## Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always using this feature but am missing [...] ## Describe the solution you'd like A clear and concise description of what you want to happen. ## Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. ## Additional context Add any other context or screenshots about the feature request here. icingaweb2-module-pdfexport-0.12.0+dfsg/.github/dependabot.yml000066400000000000000000000001571511205031700242050ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: "composer" directory: "/" schedule: interval: "daily" icingaweb2-module-pdfexport-0.12.0+dfsg/.github/workflows/000077500000000000000000000000001511205031700234075ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/.github/workflows/L10n-update.yml000066400000000000000000000002471511205031700261270ustar00rootroot00000000000000name: L10n Update on: push: branches: - main jobs: update: uses: icinga/github-actions/.github/workflows/L10n-update.yml@main secrets: inherit icingaweb2-module-pdfexport-0.12.0+dfsg/.github/workflows/php.yml000066400000000000000000000015541511205031700247260ustar00rootroot00000000000000name: PHP Tests on: push: branches: - main - release/* pull_request: branches: - main jobs: lint: name: Static analysis for php ${{ matrix.php }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: php: ['8.2', '8.3', '8.4'] os: ['ubuntu-latest'] steps: - name: Checkout code base uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} tools: phpcs - name: Setup dependencies run: composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- . - name: PHP CodeSniffer if: ${{ ! cancelled() }} run: phpcs icingaweb2-module-pdfexport-0.12.0+dfsg/.github/workflows/phpstan.yml000066400000000000000000000004141511205031700256060ustar00rootroot00000000000000name: PHPStan on: pull_request: branches: - main jobs: phpstan: uses: icinga/github-actions/.github/workflows/phpstan.yml@main with: dependencies: | { "/icingaweb2" : "https://github.com/Icinga/icingaweb2.git" } icingaweb2-module-pdfexport-0.12.0+dfsg/.gitignore000066400000000000000000000001041511205031700217750ustar00rootroot00000000000000# Exclude all hidden files .* # Except those related to Git !.git* icingaweb2-module-pdfexport-0.12.0+dfsg/.phpcs.xml000066400000000000000000000013331511205031700217270ustar00rootroot00000000000000 Sniff our code a while ./ vendor/* icingaweb2-module-pdfexport-0.12.0+dfsg/LICENSE000066400000000000000000000431761511205031700210320ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {description} Copyright (C) {year} {fullname} This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. {signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. icingaweb2-module-pdfexport-0.12.0+dfsg/README.md000066400000000000000000000011011511205031700212620ustar00rootroot00000000000000# Icinga PDF Export [![PHP Support](https://img.shields.io/badge/php-%3E%3D%208.2-777BB4?logo=PHP)](https://php.net/) ![Build Status](https://github.com/Icinga/icingaweb2-module-pdfexport/actions/workflows/php.yml/badge.svg?branch=main) [![Github Tag](https://img.shields.io/github/tag/Icinga/icingaweb2-module-pdfexport.svg)](https://github.com/Icinga/icingaweb2-module-pdfexport) PDF export functionality for Icinga Web 2 using Google Chrome/Chromium for rendering. ## Documentation * [Installation](doc/02-Installation.md) * [Troubleshooting](doc/70-Troubleshooting.md) icingaweb2-module-pdfexport-0.12.0+dfsg/application/000077500000000000000000000000001511205031700223155ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/controllers/000077500000000000000000000000001511205031700246635ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/controllers/ConfigController.php000066400000000000000000000012501511205031700306430ustar00rootroot00000000000000assertPermission('config/modules'); parent::init(); } public function chromeAction() { $form = (new ChromeBinaryForm()) ->setIniConfig(Config::module('pdfexport')); $form->handleRequest(); $this->view->tabs = $this->Module()->getConfigTabs()->activate('chrome'); $this->view->form = $form; } } icingaweb2-module-pdfexport-0.12.0+dfsg/application/forms/000077500000000000000000000000001511205031700234435ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/forms/ChromeBinaryForm.php000066400000000000000000000060711511205031700273660ustar00rootroot00000000000000setName('pdfexport_binary'); $this->setSubmitLabel($this->translate('Save Changes')); } public function createElements(array $formData) { $this->addElement('text', 'chrome_binary', [ 'label' => $this->translate('Local Binary'), 'placeholder' => '/usr/bin/google-chrome', 'validators' => [new Zend_Validate_Callback(function ($value) { $chrome = (new HeadlessChrome()) ->setBinary($value); try { $version = $chrome->getVersion(); } catch (Exception $e) { $this->getElement('chrome_binary')->addError($e->getMessage()); return true; } if ($version < 59) { $this->getElement('chrome_binary')->addError(sprintf( $this->translate( 'Chrome/Chromium supporting headless mode required' . ' which is provided since version 59. Version detected: %s' ), $version )); } return true; })] ]); $this->addElement('checkbox', 'chrome_force_temp_storage', [ 'label' => $this->translate('Force local temp storage') ]); $this->addElement('text', 'chrome_host', [ 'label' => $this->translate('Remote Host'), 'validators' => [new Zend_Validate_Callback(function ($value) { if ($value === null) { return true; } $port = $this->getValue('chrome_port') ?: 9222; $chrome = (new HeadlessChrome()) ->setRemote($value, $port); try { $version = $chrome->getVersion(); } catch (Exception $e) { $this->getElement('chrome_host')->addError($e->getMessage()); return true; } if ($version < 59) { $this->getElement('chrome_host')->addError(sprintf( $this->translate( 'Chrome/Chromium supporting headless mode required' . ' which is provided since version 59. Version detected: %s' ), $version )); } return true; })] ]); $this->addElement('number', 'chrome_port', [ 'label' => $this->translate('Remote Port'), 'placeholder' => 9222, 'min' => 1, 'max' => 65535 ]); } } icingaweb2-module-pdfexport-0.12.0+dfsg/application/views/000077500000000000000000000000001511205031700234525ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/views/scripts/000077500000000000000000000000001511205031700251415ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/views/scripts/config/000077500000000000000000000000001511205031700264065ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/application/views/scripts/config/chrome.phtml000066400000000000000000000003111511205031700307240ustar00rootroot00000000000000
icingaweb2-module-pdfexport-0.12.0+dfsg/composer.json000066400000000000000000000002311511205031700225300ustar00rootroot00000000000000{ "require": { "php": ">=8.2", "phrity/websocket": "^3.6", "karriere/pdf-merge": "^3.3" }, "config": { "sort-packages": true } } icingaweb2-module-pdfexport-0.12.0+dfsg/composer.lock000066400000000000000000000563401511205031700225230ustar00rootroot00000000000000{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "5cffa2096256d965b5bbedcd5a7b515b", "packages": [ { "name": "karriere/pdf-merge", "version": "v3.3.1", "source": { "type": "git", "url": "https://github.com/karriereat/pdf-merge.git", "reference": "d524a9d261ea96b18bbbab685b5710a7a0fe3a6e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/karriereat/pdf-merge/zipball/d524a9d261ea96b18bbbab685b5710a7a0fe3a6e", "reference": "d524a9d261ea96b18bbbab685b5710a7a0fe3a6e", "shasum": "" }, "require": { "php": "8.1.* | 8.2.* | 8.3.* | 8.4.*", "tecnickcom/tcpdf": "^6.3" }, "require-dev": { "laravel/pint": "^1.5 | ^1.6", "pestphp/pest": "^1.22", "phpstan/phpstan": "^1.10" }, "type": "library", "autoload": { "psr-4": { "Karriere\\PdfMerge\\": "src/" }, "classmap": [ "tcpi/fpdf_tpl.php", "tcpi/tcpdi.php", "tcpi/tcpdi_parser.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "authors": [ { "name": "Alexander Lentner", "email": "alexander.lentner@karriere.at", "role": "Maintainer" } ], "description": "A wrapper for the TCPDF class that provides an elegant API for merging PDFs", "keywords": [ "merge", "pdf" ], "support": { "issues": "https://github.com/karriereat/pdf-merge/issues", "source": "https://github.com/karriereat/pdf-merge/tree/v3.3.1" }, "time": "2025-02-19T11:02:10+00:00" }, { "name": "phrity/comparison", "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-comparison.git", "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-comparison/zipball/aedd44d59db08de7d6c31812d1490c22aab35c92", "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { "psr-4": { "Phrity\\Comparison\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Interfaces and helper trait for comparing objects. Comparator for sort and filter applications.", "homepage": "https://phrity.sirn.se/comparison", "keywords": [ "comparable", "comparator", "comparison", "equalable", "filter", "sort" ], "support": { "issues": "https://github.com/sirn-se/phrity-comparison/issues", "source": "https://github.com/sirn-se/phrity-comparison/tree/1.4.0" }, "time": "2025-05-26T20:12:39+00:00" }, { "name": "phrity/http", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-http.git", "reference": "536e3e46e6220d171a59599ed1f4da9f6b6244fc" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-http/zipball/536e3e46e6220d171a59599ed1f4da9f6b6244fc", "reference": "536e3e46e6220d171a59599ed1f4da9f6b6244fc", "shasum": "" }, "require": { "php": "^8.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { "psr-4": { "Phrity\\Http\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Utilities and interfaces for handling HTTP.", "homepage": "https://phrity.sirn.se/http", "keywords": [ "HTTP Factories", "http", "psr-17" ], "support": { "issues": "https://github.com/sirn-se/phrity-http/issues", "source": "https://github.com/sirn-se/phrity-http/tree/1.0.0" }, "time": "2025-09-07T17:04:26+00:00" }, { "name": "phrity/net-stream", "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-stream.git", "reference": "c621bb3108a5a02bba64df2e5f0cd7ada02665b5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-net-stream/zipball/c621bb3108a5a02bba64df2e5f0cd7ada02665b5", "reference": "c621bb3108a5a02bba64df2e5f0cd7ada02665b5", "shasum": "" }, "require": { "php": "^8.1", "phrity/util-errorhandler": "^1.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/net-uri": "^2.0", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Socket stream classes implementing PSR-7 Stream and PSR-17 StreamFactory", "homepage": "https://phrity.sirn.se/net-stream", "keywords": [ "Socket", "client", "psr-17", "psr-7", "server", "stream", "stream factory" ], "support": { "issues": "https://github.com/sirn-se/phrity-net-stream/issues", "source": "https://github.com/sirn-se/phrity-net-stream/tree/2.3.1" }, "time": "2025-08-08T09:51:04+00:00" }, { "name": "phrity/net-uri", "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-uri.git", "reference": "08de4cf07e439c4708f572249659f09198ac99f0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/08de4cf07e439c4708f572249659f09198ac99f0", "reference": "08de4cf07e439c4708f572249659f09198ac99f0", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.1", "phrity/comparison": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/util-errorhandler": "^1.1", "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-intl": "Enables IDN conversion for non-ASCII domains" }, "type": "library", "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "PSR-7 Uri and PSR-17 UriFactory implementation", "homepage": "https://phrity.sirn.se/net-uri", "keywords": [ "psr-17", "psr-7", "uri", "uri factory" ], "support": { "issues": "https://github.com/sirn-se/phrity-net-uri/issues", "source": "https://github.com/sirn-se/phrity-net-uri/tree/2.2.0" }, "time": "2025-05-25T13:05:13+00:00" }, { "name": "phrity/util-errorhandler", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-util-errorhandler.git", "reference": "9825f15ef9b4a93252ce53ca8962278832d834da" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-util-errorhandler/zipball/9825f15ef9b4a93252ce53ca8962278832d834da", "reference": "9825f15ef9b4a93252ce53ca8962278832d834da", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { "psr-4": { "Phrity\\Util\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Inline error handler; catch and resolve errors for code block.", "homepage": "https://phrity.sirn.se/util-errorhandler", "keywords": [ "error", "warning" ], "support": { "issues": "https://github.com/sirn-se/phrity-util-errorhandler/issues", "source": "https://github.com/sirn-se/phrity-util-errorhandler/tree/1.2.1" }, "time": "2025-08-08T09:48:45+00:00" }, { "name": "phrity/websocket", "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/sirn-se/websocket-php.git", "reference": "3f16b2564a230bbce716cccaff2f6156a60a8798" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/websocket-php/zipball/3f16b2564a230bbce716cccaff2f6156a60a8798", "reference": "3f16b2564a230bbce716cccaff2f6156a60a8798", "shasum": "" }, "require": { "php": "^8.1", "phrity/http": "^1.0", "phrity/net-stream": "^2.3", "phrity/net-uri": "^2.1", "psr/http-message": "^1.1 | ^2.0", "psr/log": "^1.0 | ^2.0 | ^3.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/logger-console": "^1.0", "phrity/net-mock": "^2.3", "phrity/util-errorhandler": "^1.1", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "autoload": { "psr-4": { "WebSocket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "ISC" ], "authors": [ { "name": "Fredrik Liljegren" }, { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "WebSocket client and server", "homepage": "https://phrity.sirn.se/websocket", "keywords": [ "client", "server", "websocket" ], "support": { "issues": "https://github.com/sirn-se/websocket-php/issues", "source": "https://github.com/sirn-se/websocket-php/tree/3.6.0" }, "time": "2025-09-08T16:21:41+00:00" }, { "name": "psr/http-factory", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", "message", "psr", "psr-17", "psr-7", "request", "response" ], "support": { "source": "https://github.com/php-fig/http-factory" }, "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "support": { "source": "https://github.com/php-fig/http-message/tree/2.0" }, "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], "support": { "source": "https://github.com/php-fig/log/tree/3.0.2" }, "time": "2024-09-11T13:17:53+00:00" }, { "name": "tecnickcom/tcpdf", "version": "6.10.0", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", "reference": "ca5b6de294512145db96bcbc94e61696599c391d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/ca5b6de294512145db96bcbc94e61696599c391d", "reference": "ca5b6de294512145db96bcbc94e61696599c391d", "shasum": "" }, "require": { "ext-curl": "*", "php": ">=7.1.0" }, "type": "library", "autoload": { "classmap": [ "config", "include", "tcpdf.php", "tcpdf_barcodes_1d.php", "tcpdf_barcodes_2d.php", "include/tcpdf_colors.php", "include/tcpdf_filters.php", "include/tcpdf_font_data.php", "include/tcpdf_fonts.php", "include/tcpdf_images.php", "include/tcpdf_static.php", "include/barcodes/datamatrix.php", "include/barcodes/pdf417.php", "include/barcodes/qrcode.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" ], "authors": [ { "name": "Nicola Asuni", "email": "info@tecnick.com", "role": "lead" } ], "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", "homepage": "http://www.tcpdf.org/", "keywords": [ "PDFD32000-2008", "TCPDF", "barcodes", "datamatrix", "pdf", "pdf417", "qrcode" ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", "source": "https://github.com/tecnickcom/TCPDF/tree/6.10.0" }, "funding": [ { "url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ", "type": "custom" } ], "time": "2025-05-27T18:02:28+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.2" }, "platform-dev": {}, "plugin-api-version": "2.6.0" } icingaweb2-module-pdfexport-0.12.0+dfsg/configuration.php000066400000000000000000000004711511205031700233740ustar00rootroot00000000000000provideConfigTab('chrome', array( 'title' => $this->translate('Configure the Chrome/Chromium connection'), 'label' => $this->translate('Chrome'), 'url' => 'config/chrome' )); icingaweb2-module-pdfexport-0.12.0+dfsg/doc/000077500000000000000000000000001511205031700205575ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/doc/02-Installation.md000066400000000000000000000054411511205031700237650ustar00rootroot00000000000000# Installation ## Requirements * PHP (>= 8.2) * Icinga Web 2 (>= 2.12) * Icinga Web 2 libraries: * [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.17.1) * [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.13) ## Google Chrome/Chromium Setup The module needs Google Chrome or Chromium supporting headless mode. ### RHEL/CentOS Add the Chrome repository from Google to yum, next to EPEL. ``` yum -y install epel-release cat >/etc/yum.repos.d/google-chrome-stable.repo < Add the Chrome repository from Google to apt. ``` apt-get -y install apt-transport-https gnupg wget wget -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list apt-get update ``` Install Chrome. ``` apt-get install google-chrome-stable ``` ## Module Installation 1. Install it [like any other module](https://icinga.com/docs/icinga-web-2/latest/doc/08-Modules/#installation). Use `pdfexport` as name. 2. You might need to set the absolute path to the Google Chrome / Chromium binary, depending on your system. This can be done in `Configuration -> Modules -> pdfexport -> Chrome` This concludes the installation. PDF exports now use Google Chrome/Chromium for rendering. ### Using a Remote Chrome/Chromium As an alternative to a local installation of Chrome/Chromium it is also possible to launch and utilize a remote instance. Just install it as described above on a different machine and configure its connection details in `Configuration -> Modules -> pdfexport -> Chrome`. To start a remote instance of Chrome/Chromium use the following commandline options: > google-chrome --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --headless --keep-alive-for-test --disable-gpu --disable-dev-shm-usage --no-sandbox --bwsi --no-first-run --user-data-dir=/tmp --homedir=/tmp Note that the browser does accept any and all connection attempts without any authentication. Keep that in mind and let it listen on a public IP (or even on 0.0.0.0) only during tests or with a proper firewall in place. icingaweb2-module-pdfexport-0.12.0+dfsg/doc/70-Troubleshooting.md000066400000000000000000000011151511205031700245120ustar00rootroot00000000000000# Troubleshooting ## PDF Export If the PDF export fails, ensure that Chrome headless works fine. You can test that on the CLI like this: ``` google-chrome --version ``` If you have a local installation, you could also try to force temporary local storage. (Available in the module's configuration) This will store the content to print on disk, instead of transferring it directly to the browser. Note that for this to work, the browser needs to be able to access the temporary files of the webserver's process user. icingaweb2-module-pdfexport-0.12.0+dfsg/library/000077500000000000000000000000001511205031700214565ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/000077500000000000000000000000001511205031700234315ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/HeadlessChrome.php000066400000000000000000000617111511205031700270360ustar00rootroot00000000000000\d+\.?){4}:\d+)\/devtools\/browser\/([\w-]+)/'; /** @var string */ const WAIT_FOR_NETWORK = 'wait-for-network'; /** @var string Javascript Promise to wait for layout initialization */ const WAIT_FOR_LAYOUT = << { let timeoutId = setTimeout(() => reject('fail'), 10000); if (document.documentElement.dataset.layoutReady === 'yes') { clearTimeout(timeoutId); fulfill(null); return; } document.addEventListener('layout-ready', e => { clearTimeout(timeoutId); fulfill(e.detail); }, { once: true }); }) JS; /** @var string Path to the Chrome binary */ protected $binary; /** @var array Host and port to the remote Chrome */ protected $remote; /** * The document to print * * @var PrintableHtmlDocument */ protected $document; /** @var string Target Url */ protected $url; /** @var StorageInterface */ protected $fileStorage; /** @var array */ private $interceptedRequests = []; /** @var array */ private $interceptedEvents = []; /** * Get the path to the Chrome binary * * @return string */ public function getBinary() { return $this->binary; } /** * Set the path to the Chrome binary * * @param string $binary * * @return $this */ public function setBinary($binary) { $this->binary = $binary; return $this; } /** * Get host and port combination of the remote chrome * * @return array */ public function getRemote() { return $this->remote; } /** * Set host and port combination of a remote chrome * * @param string $host * @param int $port * * @return $this */ public function setRemote($host, $port) { $this->remote = [$host, $port]; return $this; } /** * Get the target Url * * @return string */ public function getUrl() { return $this->url; } /** * Set the target Url * * @param string $url * * @return $this */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get the file storage * * @return StorageInterface */ public function getFileStorage() { if ($this->fileStorage === null) { $this->fileStorage = new TemporaryLocalFileStorage(); } return $this->fileStorage; } /** * Set the file storage * * @param StorageInterface $fileStorage * * @return $this */ public function setFileStorage($fileStorage) { $this->fileStorage = $fileStorage; return $this; } /** * Render the given argument name-value pairs as shell-escaped string * * @param array $arguments * * @return string */ public static function renderArgumentList(array $arguments) { $list = []; foreach ($arguments as $name => $value) { if ($value !== null) { $value = escapeshellarg($value); if (! is_int($name)) { if (substr($name, -1) === '=') { $glue = ''; } else { $glue = ' '; } $list[] = escapeshellarg($name) . $glue . $value; } else { $list[] = $value; } } else { $list[] = escapeshellarg($name); } } return implode(' ', $list); } /** * Use the given HTML as input * * @param string|PrintableHtmlDocument $html * @param bool $asFile * @return $this */ public function fromHtml($html, $asFile = false) { if ($html instanceof PrintableHtmlDocument) { $this->document = $html; } else { $this->document = (new PrintableHtmlDocument()) ->setContent(HtmlString::create($html)); } if ($asFile) { $path = uniqid('icingaweb2-pdfexport-') . '.html'; $storage = $this->getFileStorage(); $storage->create($path, $this->document->render()); $path = $storage->resolvePath($path, true); $this->setUrl("file://$path"); } return $this; } /** * Generate a PDF raw string asynchronously. * * @return ExtendedPromiseInterface */ public function asyncToPdf(): ExtendedPromiseInterface { $deferred = new Promise\Deferred(); Loop::futureTick(function () use ($deferred) { switch (true) { case $this->remote !== null: try { $result = $this->jsonVersion($this->remote[0], $this->remote[1]); if (is_array($result)) { $parts = explode('/', $result['webSocketDebuggerUrl']); $pdf = $this->printToPDF( join(':', $this->remote), end($parts), ! $this->document->isEmpty() ? $this->document->getPrintParameters() : [] ); break; } } catch (Exception $e) { if ($this->binary == null) { $deferred->reject($e); return; } Logger::warning( 'Failed to connect to remote chrome: %s:%d (%s)', $this->remote[0], $this->remote[1], $e ); } // Reject the promise if we didn't get the expected output from the /json/version endpoint. if ($this->binary === null) { $deferred->reject( new Exception('Failed to determine remote chrome version via the /json/version endpoint.') ); return; } // Fallback to the local binary if a remote chrome is unavailable case $this->binary !== null: $browserHome = $this->getFileStorage()->resolvePath('HOME'); $commandLine = join(' ', [ escapeshellarg($this->getBinary()), static::renderArgumentList([ '--bwsi', '--headless', '--disable-gpu', '--no-sandbox', '--no-first-run', '--disable-dev-shm-usage', '--remote-debugging-port=0', '--homedir=' => $browserHome, '--user-data-dir=' => $browserHome ]) ]); if (Platform::isLinux()) { Logger::debug('Starting browser process: HOME=%s exec %s', $browserHome, $commandLine); $chrome = new Process('exec ' . $commandLine, null, ['HOME' => $browserHome]); } else { Logger::debug('Starting browser process: %s', $commandLine); $chrome = new Process($commandLine); } $killer = Loop::addTimer(10, function (TimerInterface $timer) use ($chrome, $deferred) { $chrome->terminate(6); // SIGABRT Logger::error( 'Browser timed out after %d seconds without the expected output', $timer->getInterval() ); $deferred->reject( new Exception( 'Received empty response or none at all from browser.' . ' Please check the logs for further details.' ) ); }); $chrome->start(); $chrome->stderr->on('data', function ($chunk) use ($chrome, $deferred, $killer) { Logger::debug('Caught browser output: %s', $chunk); if (preg_match(self::DEBUG_ADDR_PATTERN, trim($chunk), $matches)) { Loop::cancelTimer($killer); try { $pdf = $this->printToPDF( $matches[1], $matches[2], ! $this->document->isEmpty() ? $this->document->getPrintParameters() : [] ); } catch (Exception $e) { Logger::error('Failed to print PDF. An error occurred: %s', $e); } $chrome->terminate(); if (! empty($pdf)) { $deferred->resolve($pdf); } else { $deferred->reject( new Exception( 'Received empty response or none at all from browser.' . ' Please check the logs for further details.' ) ); } } }); $chrome->on('exit', function ($exitCode, $signal) use ($killer) { Loop::cancelTimer($killer); Logger::debug('Browser terminated by signal %d and exited with code %d', $signal, $exitCode); // Browser is either timed out (after 10s) and the promise should have already been rejected, // or it is terminated using its terminate() method, in which case the promise is also already // resolved/rejected. So, we don't need to resolve/reject the promise here. }); return; } if (! empty($pdf)) { $deferred->resolve($pdf); } else { $deferred->reject( new Exception( 'Received empty response or none at all from browser.' . ' Please check the logs for further details.' ) ); } }); return $deferred->promise(); } /** * Export to PDF * * @return string * @throws Exception */ public function toPdf() { $pdf = ''; // We don't intend to register any then/otherwise handlers, so call done on that promise // to properly propagate unhandled exceptions to the caller. $this->asyncToPdf()->done(function (string $newPdf) use (&$pdf) { $pdf = $newPdf; }); Loop::run(); return $pdf; } /** * Export to PDF and save as file on disk * * @return string The path to the file on disk */ public function savePdf() { $path = uniqid('icingaweb2-pdfexport-') . '.pdf'; $storage = $this->getFileStorage(); $storage->create($path, ''); $path = $storage->resolvePath($path, true); file_put_contents($path, $this->toPdf()); return $path; } private function printToPDF($socket, $browserId, array $parameters) { $browser = new Client(sprintf('ws://%s/devtools/browser/%s', $socket, $browserId)); // Open new tab, get its id $result = $this->communicate($browser, 'Target.createTarget', [ 'url' => 'about:blank' ]); if (isset($result['targetId'])) { $targetId = $result['targetId']; } else { throw new Exception('Expected target id. Got instead: ' . json_encode($result)); } $page = new Client(sprintf('ws://%s/devtools/page/%s', $socket, $targetId), ['timeout' => 300]); // enable various events $this->communicate($page, 'Log.enable'); $this->communicate($page, 'Network.enable'); $this->communicate($page, 'Page.enable'); try { $this->communicate($page, 'Console.enable'); } catch (Exception $_) { // Deprecated, might fail } if (($url = $this->getUrl()) !== null) { // Navigate to target $result = $this->communicate($page, 'Page.navigate', [ 'url' => $url ]); if (isset($result['frameId'])) { $frameId = $result['frameId']; } else { throw new Exception('Expected navigation frame. Got instead: ' . json_encode($result)); } // wait for page to fully load $this->waitFor($page, 'Page.frameStoppedLoading', ['frameId' => $frameId]); } elseif (! $this->document->isEmpty()) { // If there's no url to load transfer the document's content directly $this->communicate($page, 'Page.setDocumentContent', [ 'frameId' => $targetId, 'html' => $this->document->render() ]); // wait for page to fully load $this->waitFor($page, 'Page.loadEventFired'); } else { throw new LogicException('Nothing to print'); } // Wait for network activity to finish $this->waitFor($page, self::WAIT_FOR_NETWORK); // Wait for layout to initialize if (! $this->document->isEmpty()) { // Ensure layout scripts work in the same environment as the pdf printing itself $this->communicate($page, 'Emulation.setEmulatedMedia', ['media' => 'print']); $this->communicate($page, 'Runtime.evaluate', [ 'timeout' => 1000, 'expression' => 'setTimeout(() => new Layout().apply(), 0)' ]); $promisedResult = $this->communicate($page, 'Runtime.evaluate', [ 'awaitPromise' => true, 'returnByValue' => true, 'timeout' => 1000, // Failsafe, doesn't apply to `await` it seems 'expression' => static::WAIT_FOR_LAYOUT ]); if (isset($promisedResult['exceptionDetails'])) { if (isset($promisedResult['exceptionDetails']['exception']['description'])) { Logger::error( 'PDF layout failed to initialize: %s', $promisedResult['exceptionDetails']['exception']['description'] ); } else { Logger::warning('PDF layout failed to initialize. Pages might look skewed.'); } } // Reset media emulation, this may prevent the real media from coming into effect? $this->communicate($page, 'Emulation.setEmulatedMedia', ['media' => '']); } // print pdf $result = $this->communicate($page, 'Page.printToPDF', array_merge( $parameters, ['transferMode' => 'ReturnAsBase64', 'printBackground' => true] )); if (isset($result['data']) && !empty($result['data'])) { $pdf = base64_decode($result['data']); } else { throw new Exception('Expected base64 data. Got instead: ' . json_encode($result)); } // close tab $result = $this->communicate($browser, 'Target.closeTarget', [ 'targetId' => $targetId ]); if (! isset($result['success'])) { throw new Exception('Expected close confirmation. Got instead: ' . json_encode($result)); } try { $browser->close(); } catch (ConnectionException $e) { // For some reason, the browser doesn't send a response Logger::debug(sprintf('Failed to close browser connection: ' . $e->getMessage())); } return $pdf; } private function renderApiCall($method, $options = null): string { $data = [ 'id' => time(), 'method' => $method, 'params' => $options ?: [] ]; return json_encode($data, JSON_FORCE_OBJECT); } private function parseApiResponse(string $payload) { $data = json_decode($payload, true); if (isset($data['method']) || isset($data['result'])) { return $data; } elseif (isset($data['error'])) { throw new Exception(sprintf( 'Error response (%s): %s', $data['error']['code'], $data['error']['message'] )); } else { throw new Exception(sprintf('Unknown response received: %s', $payload)); } } private function registerEvent($method, $params) { if (Logger::getInstance()->getLevel() === Logger::DEBUG) { $shortenValues = function ($params) use (&$shortenValues) { foreach ($params as &$value) { if (is_array($value)) { $value = $shortenValues($value); } elseif (is_string($value)) { $shortened = substr($value, 0, 256); if ($shortened !== $value) { $value = $shortened . '...'; } } } return $params; }; $shortenedParams = $shortenValues($params); Logger::debug( 'Received CDP event: %s(%s)', $method, join(',', array_map(function ($param) use ($shortenedParams) { return $param . '=' . json_encode($shortenedParams[$param]); }, array_keys($shortenedParams))) ); } if ($method === 'Network.requestWillBeSent') { $this->interceptedRequests[$params['requestId']] = $params; } elseif ($method === 'Network.loadingFinished') { unset($this->interceptedRequests[$params['requestId']]); } elseif ($method === 'Network.loadingFailed') { $requestData = $this->interceptedRequests[$params['requestId']]; unset($this->interceptedRequests[$params['requestId']]); Logger::error( 'Headless Chrome was unable to complete a request to "%s". Error: %s', $requestData['request']['url'], $params['errorText'] ); } else { $this->interceptedEvents[] = ['method' => $method, 'params' => $params]; } } private function communicate(Client $ws, $method, $params = null) { Logger::debug('Transmitting CDP call: %s(%s)', $method, $params ? join(',', array_keys($params)) : ''); $ws->text($this->renderApiCall($method, $params)); do { $response = $this->parseApiResponse($ws->receive()->getContent()); $gotEvent = isset($response['method']); if ($gotEvent) { $this->registerEvent($response['method'], $response['params']); } } while ($gotEvent); Logger::debug('Received CDP result: %s', empty($response['result']) ? 'none' : join(',', array_keys($response['result']))); return $response['result']; } private function waitFor(Client $ws, $eventName, array $expectedParams = null) { if ($eventName !== self::WAIT_FOR_NETWORK) { Logger::debug( 'Awaiting CDP event: %s(%s)', $eventName, $expectedParams ? join(',', array_keys($expectedParams)) : '' ); } elseif (empty($this->interceptedRequests)) { return null; } $wait = true; $interceptedPos = -1; $params = null; do { if (isset($this->interceptedEvents[++$interceptedPos])) { $response = $this->interceptedEvents[$interceptedPos]; $intercepted = true; } else { $response = $this->parseApiResponse($ws->receive()->getContent()); $intercepted = false; } if (isset($response['method'])) { $method = $response['method']; $params = $response['params']; if (! $intercepted) { $this->registerEvent($method, $params); } if ($eventName === self::WAIT_FOR_NETWORK) { $wait = ! empty($this->interceptedRequests); } elseif ($method === $eventName) { if ($expectedParams !== null) { $diff = array_intersect_assoc($params, $expectedParams); $wait = empty($diff); } else { $wait = false; } } if (! $wait && $intercepted) { unset($this->interceptedEvents[$interceptedPos]); } } } while ($wait); return $params; } /** * Get the major version number of Chrome or false on failure * * @return int|false * * @throws Exception */ public function getVersion() { switch (true) { case $this->remote !== null: try { $result = $this->jsonVersion($this->remote[0], $this->remote[1]); $version = $result['Browser']; break; } catch (Exception $e) { if ($this->binary === null) { throw $e; } else { Logger::warning( 'Failed to connect to remote chrome: %s:%d (%s)', $this->remote[0], $this->remote[1], $e ); } } // Fallback to the local binary if a remote chrome is unavailable case $this->binary !== null: $command = new ShellCommand( escapeshellarg($this->getBinary()) . ' ' . static::renderArgumentList(['--version']), false ); $output = $command->execute(); if ($command->getExitCode() !== 0) { throw new \Exception($output->stderr); } $version = $output->stdout; break; default: throw new LogicException('Set a binary or remote first'); } if (preg_match('/(\d+)\.[\d.]+/', $version, $match)) { return (int) $match[1]; } return false; } /** * Fetch result from the /json/version API endpoint * * @param string $host * @param int $port * * @return bool|array */ protected function jsonVersion($host, $port) { $client = new \GuzzleHttp\Client(); try { $response = $client->request('GET', sprintf('http://%s:%s/json/version', $host, $port)); } catch (\GuzzleHttp\Exception\ServerException $e) { // Check if we've run into the host header security change, and re-run the request with no host header. // ref: https://issues.chromium.org/issues/40090537 if (strstr($e->getMessage(), 'Host header is specified and is not an IP address or localhost.')) { $response = $client->request( 'GET', sprintf('http://%s:%s/json/version', $host, $port), ['headers' => ['Host' => null]] ); } else { throw $e; } } if ($response->getStatusCode() !== 200) { return false; } return json_decode($response->getBody(), true); } } icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/PrintStyleSheet.php000066400000000000000000000011651511205031700272530ustar00rootroot00000000000000lessCompiler->setTheme(join(DIRECTORY_SEPARATOR, [ Icinga::app()->getModuleManager()->getModule('pdfexport')->getCssDir(), 'print.less' ])); if (method_exists($this->lessCompiler, 'setThemeMode')) { $this->lessCompiler->setThemeMode($this->pubPath . '/css/modes/none.less'); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/PrintableHtmlDocument.php000066400000000000000000000326261511205031700304170ustar00rootroot00000000000000 *:not(:last-child), footer > *:not(:last-child) { margin-right: 10px; } span { line-height: 7px; white-space: nowrap; } p { margin: 0; line-height: 7px; word-break: break-word; text-overflow: ellipsis; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } CSS; /** @var string Document title */ protected $title; /** * Paper orientation * * Defaults to false. * * @var ?bool */ protected $landscape; /** * Print background graphics * * Defaults to false. * * @var ?bool */ protected $printBackground; /** * Scale of the webpage rendering * * Defaults to 1. * * @var ?float */ protected $scale; /** * Paper width in inches * * Defaults to 8.5 inches. * * @var ?float */ protected $paperWidth; /** * Paper height in inches * * Defaults to 11 inches. * * @var ?float */ protected $paperHeight; /** * Top margin in inches * * Defaults to 1cm (~0.4 inches). * * @var ?float */ protected $marginTop; /** * Bottom margin in inches * * Defaults to 1cm (~0.4 inches). * * @var ?float */ protected $marginBottom; /** * Left margin in inches * * Defaults to 1cm (~0.4 inches). * * @var ?float */ protected $marginLeft; /** * Right margin in inches * * Defaults to 1cm (~0.4 inches). * * @var ?float */ protected $marginRight; /** * Paper ranges to print, e.g., '1-5, 8, 11-13' * * Defaults to the empty string, which means print all pages * * @var ?string */ protected $pageRanges; /** * Page height in pixels * * Minus the default vertical margins, this is 1035. * If the vertical margins are zero, it's 1160. * Whether there's a header or footer doesn't matter in any case. * * @var int */ protected $pagePixelHeight = 1035; /** * HTML template for the print header * * Should be valid HTML markup with following classes used to inject printing values into them: * * date: formatted print date * * title: document title * * url: document location * * pageNumber: current page number * * totalPages: total pages in the document * * For example, `` would generate span containing the title. * * Note that the header cannot exceed a height of 21px regardless of the margin's height or document's scale. * With the default style, this height is separated by three lines, each accommodating 7px. * Use `span`'s for single line text and `p`'s for multiline text. * * @var ?ValidHtml */ protected $headerTemplate; /** * HTML template for the print footer * * Should be valid HTML markup with following classes used to inject printing values into them: * * date: formatted print date * * title: document title * * url: document location * * pageNumber: current page number * * totalPages: total pages in the document * * For example, `` would generate span containing the title. * * Note that the footer cannot exceed a height of 21px regardless of the margin's height or document's scale. * With the default style, this height is separated by three lines, each accommodating 7px. * Use `span`'s for single line text and `p`'s for multiline text. * * @var ?ValidHtml */ protected $footerTemplate; /** * HTML for the cover page * * @var ValidHtml */ protected $coverPage; /** * Whether or not to prefer page size as defined by css * * Defaults to false, in which case the content will be scaled to fit the paper size. * * @var ?bool */ protected $preferCSSPageSize; protected $tag = 'body'; /** * Get the document title * * @return string */ public function getTitle() { return $this->title; } /** * Set the document title * * @param string $title * * @return $this */ public function setTitle($title) { $this->title = $title; return $this; } /** * Set page header * * @param ValidHtml $header * * @return $this */ public function setHeader(ValidHtml $header) { $this->headerTemplate = $header; return $this; } /** * Set page footer * * @param ValidHtml $footer * * @return $this */ public function setFooter(ValidHtml $footer) { $this->footerTemplate = $footer; return $this; } /** * Get the cover page * * @return ValidHtml|null */ public function getCoverPage() { return $this->coverPage; } /** * Set cover page * * @param ValidHtml $coverPage * * @return $this */ public function setCoverPage(ValidHtml $coverPage) { $this->coverPage = $coverPage; return $this; } /** * Remove page margins * * @return $this */ public function removeMargins() { $this->marginBottom = 0; $this->marginLeft = 0; $this->marginRight = 0; $this->marginTop = 0; return $this; } /** * Finalize document to be printed */ protected function assemble() { $this->setWrapper(new HtmlElement( 'html', null, new HtmlElement( 'head', null, new HtmlElement( 'title', null, Text::create($this->title) ), $this->createStylesheet(), $this->createLayoutScript() ) )); $this->getAttributes()->registerAttributeCallback('data-content-height', function () { return $this->pagePixelHeight; }); $this->getAttributes()->registerAttributeCallback('style', function () { return sprintf('width: %sin;', $this->paperWidth ?: 8.5); }); } /** * Get the parameters for Page.printToPDF * * @return array */ public function getPrintParameters() { $parameters = []; if (isset($this->landscape)) { $parameters['landscape'] = $this->landscape; } if (isset($this->printBackground)) { $parameters['printBackground'] = $this->printBackground; } if (isset($this->scale)) { $parameters['scale'] = $this->scale; } if (isset($this->paperWidth)) { $parameters['paperWidth'] = $this->paperWidth; } if (isset($this->paperHeight)) { $parameters['paperHeight'] = $this->paperHeight; } if (isset($this->marginTop)) { $parameters['marginTop'] = $this->marginTop; } if (isset($this->marginBottom)) { $parameters['marginBottom'] = $this->marginBottom; } if (isset($this->marginLeft)) { $parameters['marginLeft'] = $this->marginLeft; } if (isset($this->marginRight)) { $parameters['marginRight'] = $this->marginRight; } if (isset($this->pageRanges)) { $parameters['pageRanges'] = $this->pageRanges; } if (isset($this->headerTemplate)) { $parameters['headerTemplate'] = $this->createHeader()->render(); $parameters['displayHeaderFooter'] = true; if (! isset($parameters['marginTop'])) { $parameters['marginTop'] = 0.6; } } else { $parameters['headerTemplate'] = ' '; // An empty string is ignored } if (isset($this->footerTemplate)) { $parameters['footerTemplate'] = $this->createFooter()->render(); $parameters['displayHeaderFooter'] = true; if (! isset($parameters['marginBottom'])) { $parameters['marginBottom'] = 0.6; } } else { $parameters['footerTemplate'] = ' '; // An empty string is ignored } if (isset($this->preferCSSPageSize)) { $parameters['preferCSSPageSize'] = $this->preferCSSPageSize; } return $parameters; } /** * Create CSS stylesheet * * @return ValidHtml */ protected function createStylesheet(): ValidHtml { $app = Icinga::app(); $css = preg_replace_callback( '~(?<=url\()[\'"]?([^(\'"]*)[\'"]?(?=\))~', function ($matches) use ($app) { if (substr($matches[1], 0, 3) !== '../') { return $matches[1]; } $path = substr($matches[1], 3); if (substr($path, 0, 4) === 'lib/') { $assetPath = substr($path, 4); $library = null; foreach ($app->getLibraries() as $candidate) { if (substr($assetPath, 0, strlen($candidate->getName())) === $candidate->getName()) { $library = $candidate; $assetPath = ltrim(substr($assetPath, strlen($candidate->getName())), '/'); break; } } if ($library === null) { return $matches[1]; } $path = $library->getStaticAssetPath() . DIRECTORY_SEPARATOR . $assetPath; } elseif (substr($matches[1], 0, 14) === '../static/img?') { list($_, $query) = explode('?', $matches[1], 2); $params = UrlParams::fromQueryString($query); if (! $app->getModuleManager()->hasEnabled($params->get('module_name'))) { return $matches[1]; } $module = $app->getModuleManager()->getModule($params->get('module_name')); $imgRoot = $module->getBaseDir() . '/public/img/'; $path = realpath($imgRoot . $params->get('file')); } else { $path = $app->getBootstrapDirectory() . '/' . $path; } if (! $path || ! file_exists($path) || ! is_file($path)) { return $matches[1]; } $mimeType = @mime_content_type($path); if ($mimeType === false) { return $matches[1]; } $fileContent = @file_get_contents($path); if ($fileContent === false) { return $matches[1]; } return "'data:$mimeType; base64, " . base64_encode($fileContent) . "'"; }, (new PrintStyleSheet())->render(true) ); return new HtmlElement('style', null, HtmlString::create($css)); } /** * Create layout javascript * * @return ValidHtml */ protected function createLayoutScript(): ValidHtml { $module = Icinga::app()->getModuleManager()->getModule('pdfexport'); if (! method_exists($module, 'getJsDir')) { $jsPath = join(DIRECTORY_SEPARATOR, [$module->getBaseDir(), 'public', 'js']); } else { $jsPath = $module->getJsDir(); } $layoutJS = file_get_contents($jsPath . '/layout.js') . "\n\n\n"; $layoutJS .= file_get_contents($jsPath . '/layout-plugins/page-breaker.js') . "\n\n\n"; return new HtmlElement( 'script', Attributes::create(['type' => 'application/javascript']), HtmlString::create($layoutJS) ); } /** * Create document header * * @return ValidHtml */ protected function createHeader(): ValidHtml { return (new HtmlDocument()) ->addHtml( new HtmlElement('style', null, HtmlString::create( static::DEFAULT_HEADER_FOOTER_STYLE )), new HtmlElement('header', null, $this->headerTemplate) ); } /** * Create document footer * * @return ValidHtml */ protected function createFooter(): ValidHtml { return (new HtmlDocument()) ->addHtml( new HtmlElement('style', null, HtmlString::create( static::DEFAULT_HEADER_FOOTER_STYLE )), new HtmlElement('footer', null, $this->footerTemplate) ); } } icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/ProvidedHook/000077500000000000000000000000001511205031700260265ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/ProvidedHook/Pdfexport.php000066400000000000000000000127241511205031700305200ustar00rootroot00000000000000isSupported()) { throw new Exception( sprintf("Can't export: %s does not support exporting PDFs", get_class($pdfexport)) ); } } if (! $pdfexport) { throw new Exception("Can't export: No module found which provides PDF export"); } return $pdfexport; } public static function getBinary() { return Config::module('pdfexport')->get('chrome', 'binary', '/usr/bin/google-chrome'); } public static function getForceTempStorage() { return (bool) Config::module('pdfexport')->get('chrome', 'force_temp_storage', '0'); } public static function getHost() { return Config::module('pdfexport')->get('chrome', 'host'); } public static function getPort() { return Config::module('pdfexport')->get('chrome', 'port', 9222); } public function isSupported() { try { return $this->chrome()->getVersion() >= 59; } catch (Exception $e) { return false; } } public function htmlToPdf($html) { // Keep reference to the chrome object because it is using temp files which are automatically removed when // the object is destructed $chrome = $this->chrome(); $pdf = $chrome->fromHtml($html, static::getForceTempStorage())->toPdf(); if ($html instanceof PrintableHtmlDocument && ($coverPage = $html->getCoverPage()) !== null) { $coverPagePdf = $chrome ->fromHtml( (new PrintableHtmlDocument()) ->add($coverPage) ->addAttributes($html->getAttributes()) ->removeMargins(), static::getForceTempStorage() ) ->toPdf(); $pdf = $this->mergePdfs($coverPagePdf, $pdf); } return $pdf; } /** * Transforms the given printable html document/string asynchronously to PDF. * * @param PrintableHtmlDocument|string $html * * @return ExtendedPromiseInterface */ public function asyncHtmlToPdf($html): ExtendedPromiseInterface { // Keep reference to the chrome object because it is using temp files which are automatically removed when // the object is destructed $chrome = $this->chrome(); $pdfPromise = $chrome->fromHtml($html, static::getForceTempStorage())->asyncToPdf(); if ($html instanceof PrintableHtmlDocument && ($coverPage = $html->getCoverPage()) !== null) { /** @var ExtendedPromiseInterface $pdfPromise */ $pdfPromise = $pdfPromise->then(function (string $pdf) use ($chrome, $html, $coverPage) { return $chrome->fromHtml( (new PrintableHtmlDocument()) ->add($coverPage) ->addAttributes($html->getAttributes()) ->removeMargins(), static::getForceTempStorage() )->asyncToPdf()->then( function (string $coverPagePdf) use ($pdf) { return $this->mergePdfs($coverPagePdf, $pdf); } ); }); } return $pdfPromise; } public function streamPdfFromHtml($html, $filename) { $filename = basename($filename, '.pdf') . '.pdf'; // Generate the PDF before changing the response headers to properly handle and display errors in the UI. $pdf = $this->htmlToPdf($html); /** @var Web $app */ $app = Icinga::app(); $app->getResponse() ->setHeader('Content-Type', 'application/pdf', true) ->setHeader('Content-Disposition', "inline; filename=\"$filename\"", true) ->setBody($pdf) ->sendResponse(); exit; } /** * Create an instance of HeadlessChrome from configuration * * @return HeadlessChrome */ protected function chrome() { $chrome = new HeadlessChrome(); $chrome->setBinary(static::getBinary()); if (($host = static::getHost()) !== null) { $chrome->setRemote($host, static::getPort()); } return $chrome; } protected function mergePdfs(string ...$pdfs): string { $merger = new PdfMerge(); $storage = new TemporaryLocalFileStorage(); try { foreach ($pdfs as $i => $pdf) { $storage->create($i, $pdf); $merger->add($storage->resolvePath($i)); } return $merger->merge('', 'S'); } finally { foreach ($pdfs as $i => $_) { $storage->delete($i); } } } } icingaweb2-module-pdfexport-0.12.0+dfsg/library/Pdfexport/ShellCommand.php000066400000000000000000000070421511205031700265130ustar00rootroot00000000000000command = $escape ? escapeshellcmd($command) : $command; } /** * Get the exit code of the command * * @return int */ public function getExitCode() { return $this->exitCode; } /** * Get the status of the command * * @return object */ public function getStatus() { $status = (object) proc_get_status($this->resource); if ($status->running === false && $this->exitCode === null) { // The exit code is only valid the first time proc_get_status is // called in terms of running false, hence we capture it $this->exitCode = $status->exitcode; } return $status; } /** * Execute the command * * @return object * * @throws \Exception */ public function execute() { if ($this->resource !== null) { throw new \Exception('Command already started'); } $descriptors = [ ['pipe', 'r'], // stdin ['pipe', 'w'], // stdout ['pipe', 'w'] // stderr ]; $this->resource = proc_open( $this->command, $descriptors, $pipes ); if (! is_resource($this->resource)) { throw new \Exception(sprintf( "Can't fork '%s'", $this->command )); } $namedpipes = (object) [ 'stdin' => &$pipes[0], 'stdout' => &$pipes[1], 'stderr' => &$pipes[2] ]; fclose($namedpipes->stdin); $read = [$namedpipes->stderr, $namedpipes->stdout]; $origRead = $read; $write = null; // stdin not handled $except = null; $stdout = ''; $stderr = ''; stream_set_blocking($namedpipes->stdout, false); // non-blocking stream_set_blocking($namedpipes->stderr, false); while (stream_select($read, $write, $except, 0, 20000) !== false) { foreach ($read as $pipe) { if ($pipe === $namedpipes->stdout) { $stdout .= stream_get_contents($pipe); } if ($pipe === $namedpipes->stderr) { $stderr .= stream_get_contents($pipe); } } foreach ($origRead as $i => $str) { if (feof($str)) { unset($origRead[$i]); } } if (empty($origRead)) { break; } // Reset pipes $read = $origRead; } fclose($namedpipes->stderr); fclose($namedpipes->stdout); $exitCode = proc_close($this->resource); if ($this->exitCode === null) { $this->exitCode = $exitCode; } $this->resource = null; return (object) [ 'stdout' => $stdout, 'stderr' => $stderr ]; } } icingaweb2-module-pdfexport-0.12.0+dfsg/module.info000066400000000000000000000002551511205031700221560ustar00rootroot00000000000000Module: PDF Export Version: 0.12.0 Requires: Libraries: icinga-php-library (>=0.17.1), icinga-php-thirdparty (>=0.13.0) Description: PDF Export via Google Chrome/Chromium icingaweb2-module-pdfexport-0.12.0+dfsg/patches/000077500000000000000000000000001511205031700214415ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/patches/iio-libmergepdf-support-php82.patch000066400000000000000000000056541511205031700302030ustar00rootroot00000000000000diff --git a/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php b/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php index 0da7d7b..5322fa8 100644 --- a/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php +++ b/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php @@ -145,7 +145,7 @@ class FPDF_TPL extends FPDF { function endTemplate() { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args); + return call_user_func_array(array('TCPDF', 'endTemplate'), $args); } if ($this->_intpl) { @@ -275,7 +275,7 @@ class FPDF_TPL extends FPDF { public function SetFont($family, $style = '', $size = 0, $fontfile='', $subset='default', $out=true) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::SetFont'), $args); + return call_user_func_array(array('TCPDF', 'SetFont'), $args); } parent::SetFont($family, $style, $size); @@ -299,7 +299,7 @@ class FPDF_TPL extends FPDF { ) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::Image'), $args); + return call_user_func_array(array('TCPDF', 'Image'), $args); } $ret = parent::Image($file, $x, $y, $w, $h, $type, $link); @@ -320,7 +320,7 @@ class FPDF_TPL extends FPDF { function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::AddPage'), $args); + return call_user_func_array(array('TCPDF', 'AddPage'), $args); } if ($this->_intpl) @@ -335,7 +335,7 @@ class FPDF_TPL extends FPDF { function Link($x, $y, $w, $h, $link, $spaces = 0) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::Link'), $args); + return call_user_func_array(array('TCPDF', 'Link'), $args); } if ($this->_intpl) @@ -347,7 +347,7 @@ class FPDF_TPL extends FPDF { function AddLink() { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::AddLink'), $args); + return call_user_func_array(array('TCPDF', 'AddLink'), $args); } if ($this->_intpl) @@ -358,7 +358,7 @@ class FPDF_TPL extends FPDF { function SetLink($link, $y = 0, $page = -1) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); - return call_user_func_array(array($this, 'TCPDF::SetLink'), $args); + return call_user_func_array(array('TCPDF', 'SetLink'), $args); } if ($this->_intpl)icingaweb2-module-pdfexport-0.12.0+dfsg/phpstan-baseline.neon000066400000000000000000000310161511205031700241310ustar00rootroot00000000000000parameters: ignoreErrors: - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\Controllers\\\\ConfigController\\:\\:chromeAction\\(\\) has no return type specified\\.$#" count: 1 path: application/controllers/ConfigController.php - message: "#^Cannot call method addError\\(\\) on Zend_Form_Element\\|null\\.$#" count: 4 path: application/forms/ChromeBinaryForm.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\Forms\\\\ChromeBinaryForm\\:\\:createElements\\(\\) has no return type specified\\.$#" count: 1 path: application/forms/ChromeBinaryForm.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\Forms\\\\ChromeBinaryForm\\:\\:createElements\\(\\) has parameter \\$formData with no value type specified in iterable type array\\.$#" count: 1 path: application/forms/ChromeBinaryForm.php - message: "#^Parameter \\#2 \\$port of method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:setRemote\\(\\) expects int, mixed given\\.$#" count: 1 path: application/forms/ChromeBinaryForm.php - message: "#^Access to an undefined property object\\:\\:\\$stderr\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Access to an undefined property object\\:\\:\\$stdout\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'Browser' on array\\|bool\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'code' on mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'error' on mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'message' on mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'method' on mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot access offset 'result' on mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Cannot call method on\\(\\) on React\\\\Stream\\\\ReadableStreamInterface\\|React\\\\Stream\\\\WritableStreamInterface\\|null\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:asyncToPdf\\(\\) should return React\\\\Promise\\\\ExtendedPromiseInterface but returns React\\\\Promise\\\\PromiseInterface\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:communicate\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:communicate\\(\\) has parameter \\$method with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:communicate\\(\\) has parameter \\$params with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:getFileStorage\\(\\) return type has no value type specified in iterable type Icinga\\\\File\\\\Storage\\\\StorageInterface\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:getRemote\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:jsonVersion\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:jsonVersion\\(\\) should return array\\|bool but returns mixed\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:parseApiResponse\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:parseApiResponse\\(\\) has parameter \\$payload with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:printToPDF\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:printToPDF\\(\\) has parameter \\$browserId with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:printToPDF\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:printToPDF\\(\\) has parameter \\$socket with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:registerEvent\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:registerEvent\\(\\) has parameter \\$method with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:registerEvent\\(\\) has parameter \\$params with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:renderApiCall\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:renderApiCall\\(\\) has parameter \\$method with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:renderApiCall\\(\\) has parameter \\$options with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:renderArgumentList\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:setFileStorage\\(\\) has parameter \\$fileStorage with no value type specified in iterable type Icinga\\\\File\\\\Storage\\\\StorageInterface\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:waitFor\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:waitFor\\(\\) has parameter \\$eventName with no type specified\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:waitFor\\(\\) has parameter \\$expectedParams with no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Property Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:\\$fileStorage type has no value type specified in iterable type Icinga\\\\File\\\\Storage\\\\StorageInterface\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Property Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:\\$interceptedEvents type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Property Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:\\$interceptedRequests type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Property Icinga\\\\Module\\\\Pdfexport\\\\HeadlessChrome\\:\\:\\$remote type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/HeadlessChrome.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\PrintStyleSheet\\:\\:collect\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/PrintStyleSheet.php - message: "#^Cannot call method getName\\(\\) on mixed\\.$#" count: 3 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Cannot call method getStaticAssetPath\\(\\) on mixed\\.$#" count: 1 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\PrintableHtmlDocument\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\PrintableHtmlDocument\\:\\:getPrintParameters\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, string\\|null given\\.$#" count: 1 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Parameter \\#3 \\.\\.\\.\\$content of class ipl\\\\Html\\\\HtmlElement constructor expects ipl\\\\Html\\\\ValidHtml, ipl\\\\Html\\\\ValidHtml\\|null given\\.$#" count: 2 path: library/Pdfexport/PrintableHtmlDocument.php - message: "#^Cannot call method isSupported\\(\\) on mixed\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:first\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:getBinary\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:getForceTempStorage\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:getHost\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:getPort\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:htmlToPdf\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:htmlToPdf\\(\\) has parameter \\$html with no type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Method Icinga\\\\Module\\\\Pdfexport\\\\ProvidedHook\\\\Pdfexport\\:\\:streamPdfFromHtml\\(\\) has no return type specified\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Parameter \\#1 \\$object of function get_class expects object, mixed given\\.$#" count: 1 path: library/Pdfexport/ProvidedHook/Pdfexport.php - message: "#^Parameter \\#1 \\$process of function proc_get_status expects resource, resource\\|null given\\.$#" count: 1 path: library/Pdfexport/ShellCommand.php - message: "#^Property Icinga\\\\Module\\\\Pdfexport\\\\ShellCommand\\:\\:\\$resource \\(resource\\|null\\) does not accept resource\\|false\\.$#" count: 1 path: library/Pdfexport/ShellCommand.php icingaweb2-module-pdfexport-0.12.0+dfsg/phpstan.neon000066400000000000000000000010611511205031700223460ustar00rootroot00000000000000includes: - phpstan-baseline.neon parameters: level: max checkFunctionNameCase: true checkInternalClassCaseSensitivity: true treatPhpDocTypesAsCertain: false paths: - application - library ignoreErrors: - messages: - '#Unsafe usage of new static\(\)#' - '#. but return statement is missing#' reportUnmatched: false scanDirectories: - /icingaweb2 - /usr/share/icinga-php universalObjectCratesClasses: - Icinga\Web\View icingaweb2-module-pdfexport-0.12.0+dfsg/public/000077500000000000000000000000001511205031700212705ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/public/css/000077500000000000000000000000001511205031700220605ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/public/css/print.less000066400000000000000000000012731511205031700241070ustar00rootroot00000000000000// icingaweb2 @gray: #7F7F7F; @gray-semilight: #A9A9A9; @gray-light: #C9C9C9; @gray-lighter: #EEEEEE; @gray-lightest: #F7F7F7; @icinga-blue: #0095BF; @low-sat-blue: #dae3e6; @low-sat-blue-dark: #becbcf; @body-bg-color: #fff; @text-color: @black; @text-color-light: @gray; @tr-active-color: @body-bg-color; @tr-hover-color: @body-bg-color; // ipl-web @default-bg: @body-bg-color; @base-gray: @gray; @base-gray-light: @gray-light; @base-gray-lighter: @gray-lighter; @base-disabled: @disabled-gray; @base-primary-color: @icinga-blue; @base-primary-bg: @icinga-blue; @default-text-color: @text-color; @default-text-color-light: @text-color-light; @default-text-color-inverted: @text-color-inverted; icingaweb2-module-pdfexport-0.12.0+dfsg/public/js/000077500000000000000000000000001511205031700217045ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/public/js/layout-plugins/000077500000000000000000000000001511205031700247005ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/public/js/layout-plugins/page-breaker.js000066400000000000000000000030321511205031700275610ustar00rootroot00000000000000/* Icinga PDF Export | (c) 2021 Icinga GmbH | GPLv2 */ "use strict"; (() => { Layout.registerPlugin('page-breaker', () => { let pageBreaksFor = document.querySelector('[data-pdfexport-page-breaks-at]'); if (! pageBreaksFor) { return; } let pageBreaksAt = pageBreaksFor.dataset.pdfexportPageBreaksAt; if (! pageBreaksAt) { return; } let contentHeight = document.body.dataset.contentHeight; let items = Array.from(pageBreaksFor.querySelectorAll(':scope > ' + pageBreaksAt)); let remainingHeight = contentHeight; items.forEach((item, i) => { let requiredHeight; if (i < items.length - 1) { requiredHeight = items[i + 1].getBoundingClientRect().top - item.getBoundingClientRect().top; } else { requiredHeight = item.parentElement.getBoundingClientRect().bottom - item.getBoundingClientRect().top; } if (remainingHeight < requiredHeight) { if (!! item.previousElementSibling) { item.previousElementSibling.style.pageBreakAfter = 'always'; item.previousElementSibling.classList.add('page-break-follows'); } else { item.style.pageBreakAfter = 'always'; item.classList.add('page-break-follows'); } remainingHeight = contentHeight; } remainingHeight -= requiredHeight; }); }); })(); icingaweb2-module-pdfexport-0.12.0+dfsg/public/js/layout.js000066400000000000000000000013051511205031700235560ustar00rootroot00000000000000/* Icinga PDF Export | (c) 2021 Icinga GmbH | GPLv2 */ "use strict"; class Layout { static #plugins = []; static registerPlugin(name, plugin) { this.#plugins.push([name, plugin]); } apply() { for (let [name, plugin] of Layout.#plugins) { try { plugin(); } catch (error) { console.error('Layout plugin ' + name + ' failed to run: ' + error); } } this.finish(); } finish() { document.documentElement.dataset.layoutReady = 'yes'; document.dispatchEvent(new CustomEvent('layout-ready', { cancelable: false, bubbles: false })); } } icingaweb2-module-pdfexport-0.12.0+dfsg/run.php000066400000000000000000000002731511205031700213310ustar00rootroot00000000000000provideHook('Pdfexport'); require_once 'vendor/autoload.php'; icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/000077500000000000000000000000001511205031700213075ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/autoload.php000066400000000000000000000013541511205031700236330ustar00rootroot00000000000000 * Jordi Boggiano * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Autoload; /** * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * * // register classes with namespaces * $loader->add('Symfony\Component', __DIR__.'/component'); * $loader->add('Symfony', __DIR__.'/framework'); * * // activate the autoloader * $loader->register(); * * // to enable searching the include path (eg. for PEAR packages) * $loader->setUseIncludePath(true); * * In this example, if you try to use a class in the Symfony\Component * namespace or one of its children (Symfony\Component\Console for instance), * the autoloader will first look for the class under the component/ * directory, and it will then fallback to the framework/ directory if not * found before giving up. * * This class is loosely based on the Symfony UniversalClassLoader. * * @author Fabien Potencier * @author Jordi Boggiano * @see https://www.php-fig.org/psr/psr-0/ * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { /** @var \Closure(string):void */ private static $includeFile; /** @var string|null */ private $vendorDir; // PSR-4 /** * @var array> */ private $prefixLengthsPsr4 = array(); /** * @var array> */ private $prefixDirsPsr4 = array(); /** * @var list */ private $fallbackDirsPsr4 = array(); // PSR-0 /** * List of PSR-0 prefixes * * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) * * @var array>> */ private $prefixesPsr0 = array(); /** * @var list */ private $fallbackDirsPsr0 = array(); /** @var bool */ private $useIncludePath = false; /** * @var array */ private $classMap = array(); /** @var bool */ private $classMapAuthoritative = false; /** * @var array */ private $missingClasses = array(); /** @var string|null */ private $apcuPrefix; /** * @var array */ private static $registeredLoaders = array(); /** * @param string|null $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; self::initializeIncludeClosure(); } /** * @return array> */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); } /** * @return array> */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } /** * @return list */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } /** * @return list */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } /** * @return array Array of classname => path */ public function getClassMap() { return $this->classMap; } /** * @param array $classMap Class to filename map * * @return void */ public function addClassMap(array $classMap) { if ($this->classMap) { $this->classMap = array_merge($this->classMap, $classMap); } else { $this->classMap = $classMap; } } /** * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * * @param string $prefix The prefix * @param list|string $paths The PSR-0 root directories * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, $paths ); } return; } $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], $paths ); } } /** * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { // Register directories for a new namespace. $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], $paths ); } } /** * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * * @param string $prefix The prefix * @param list|string $paths The PSR-0 base directories * * @return void */ public function set($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr0 = (array) $paths; } else { $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; } } /** * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * * @return void */ public function setPsr4($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr4 = (array) $paths; } else { $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = (array) $paths; } } /** * Turns on searching the include path for class files. * * @param bool $useIncludePath * * @return void */ public function setUseIncludePath($useIncludePath) { $this->useIncludePath = $useIncludePath; } /** * Can be used to check if the autoloader uses the include path to check * for classes. * * @return bool */ public function getUseIncludePath() { return $this->useIncludePath; } /** * Turns off searching the prefix and fallback directories for classes * that have not been registered with the class map. * * @param bool $classMapAuthoritative * * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { $this->classMapAuthoritative = $classMapAuthoritative; } /** * Should class lookup fail if not found in the current class map? * * @return bool */ public function isClassMapAuthoritative() { return $this->classMapAuthoritative; } /** * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix * * @return void */ public function setApcuPrefix($apcuPrefix) { $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** * The APCu prefix in use, or null if APCu caching is not enabled. * * @return string|null */ public function getApcuPrefix() { return $this->apcuPrefix; } /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not * * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); if (null === $this->vendorDir) { return; } if ($prepend) { self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; } else { unset(self::$registeredLoaders[$this->vendorDir]); self::$registeredLoaders[$this->vendorDir] = $this; } } /** * Unregisters this instance as an autoloader. * * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); if (null !== $this->vendorDir) { unset(self::$registeredLoaders[$this->vendorDir]); } } /** * Loads the given class or interface. * * @param string $class The name of the class * @return true|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { $includeFile = self::$includeFile; $includeFile($file); return true; } return null; } /** * Finds the path to the file where the class is defined. * * @param string $class The name of the class * * @return string|false The path if found, false otherwise */ public function findFile($class) { // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } if (null !== $this->apcuPrefix) { $file = apcu_fetch($this->apcuPrefix.$class, $hit); if ($hit) { return $file; } } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } if (null !== $this->apcuPrefix) { apcu_add($this->apcuPrefix.$class, $file); } if (false === $file) { // Remember that this class does not exist. $this->missingClasses[$class] = true; } return $file; } /** * Returns the currently registered loaders keyed by their corresponding vendor directories. * * @return array */ public static function getRegisteredLoaders() { return self::$registeredLoaders; } /** * @param string $class * @param string $ext * @return string|false */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { if (file_exists($file = $dir . $pathEnd)) { return $file; } } } } } // PSR-4 fallback dirs foreach ($this->fallbackDirsPsr4 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { return $file; } } // PSR-0 lookup if (false !== $pos = strrpos($class, '\\')) { // namespaced class name $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); } else { // PEAR-like class name $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; } if (isset($this->prefixesPsr0[$first])) { foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { if (0 === strpos($class, $prefix)) { foreach ($dirs as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } } } } // PSR-0 fallback dirs foreach ($this->fallbackDirsPsr0 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } // PSR-0 include paths. if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } return false; } /** * @return void */ private static function initializeIncludeClosure() { if (self::$includeFile !== null) { return; } /** * Scope isolated include. * * Prevents access to $this/self from included files. * * @param string $file * @return void */ self::$includeFile = \Closure::bind(static function($file) { include $file; }, null, null); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/InstalledVersions.php000066400000000000000000000417631511205031700273320ustar00rootroot00000000000000 * Jordi Boggiano * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; /** * This class is copied in every Composer installed project and available to all * * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` * * @final */ class InstalledVersions { /** * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to * @internal */ private static $selfDir = null; /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; /** * @var bool */ private static $installedIsLocalDir; /** * @var bool|null */ private static $canGetVendors; /** * @var array[] * @psalm-var array}> */ private static $installedByVendor = array(); /** * Returns a list of all package names which are present, either by being installed, replaced or provided * * @return string[] * @psalm-return list */ public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); } /** * Returns a list of all package names with a specific type e.g. 'library' * * @param string $type * @return string[] * @psalm-return list */ public static function getInstalledPackagesByType($type) { $packagesByType = array(); foreach (self::getInstalled() as $installed) { foreach ($installed['versions'] as $name => $package) { if (isset($package['type']) && $package['type'] === $type) { $packagesByType[] = $name; } } } return $packagesByType; } /** * Checks whether the given package is installed * * This also returns true if the package name is provided or replaced by another package * * @param string $packageName * @param bool $includeDevRequirements * @return bool */ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } return false; } /** * Checks whether the given package satisfies a version constraint * * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: * * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') * * @param VersionParser $parser Install composer/semver to have access to this class and functionality * @param string $packageName * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package * @return bool */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } /** * Returns a version constraint representing all the range(s) which are installed for a given package * * It is easier to use this via isInstalled() with the $constraint argument if you need to check * whether a given version of a package is installed, and not just whether it exists * * @param string $packageName * @return string Version constraint usable with composer/semver */ public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference */ public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. */ public static function getInstallPath($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @return array * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } /** * Returns the raw installed.php data for custom implementations * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { self::$installed = include __DIR__ . '/installed.php'; } else { self::$installed = array(); } } return self::$installed; } /** * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] * @psalm-return list}> */ public static function getAllRawData() { return self::getInstalled(); } /** * Lets you reload the static array from another file * * This is only useful for complex integrations in which a project needs to use * this class but then also needs to execute another project's autoloader in process, * and wants to ensure both projects have access to their version of installed.php. * * A typical case would be PHPUnit, where it would need to make sure it reads all * the data it needs from this class, then call reload() with * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure * the project in which it runs can then also use this class safely, without * interference between PHPUnit's dependencies and the project's dependencies. * * @param array[] $data A vendor/composer/installed.php data set * @return void * * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); // when using reload, we disable the duplicate protection to ensure that self::$installed data is // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, // so we have to assume it does not, and that may result in duplicate data being returned when listing // all installed packages for example self::$installedIsLocalDir = false; } /** * @return string */ private static function getSelfDir() { if (self::$selfDir === null) { self::$selfDir = strtr(__DIR__, '\\', '/'); } return self::$selfDir; } /** * @return array[] * @psalm-return list}> */ private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); $copiedLocalDir = false; if (self::$canGetVendors) { $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; self::$installedByVendor[$vendorDir] = $required; $installed[] = $required; if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { self::$installed = $required; self::$installedIsLocalDir = true; } } if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { $copiedLocalDir = true; } } } if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require __DIR__ . '/installed.php'; self::$installed = $required; } else { self::$installed = array(); } } if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } return $installed; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/LICENSE000066400000000000000000000020561511205031700241460ustar00rootroot00000000000000 Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/autoload_classmap.php000066400000000000000000000026601511205031700273460ustar00rootroot00000000000000 $vendorDir . '/composer/InstalledVersions.php', 'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', 'FPDF' => $vendorDir . '/karriere/pdf-merge/tcpi/tcpdi.php', 'FPDF_TPL' => $vendorDir . '/karriere/pdf-merge/tcpi/fpdf_tpl.php', 'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php', 'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php', 'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php', 'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php', 'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php', 'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php', 'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php', 'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php', 'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php', 'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php', 'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php', 'TCPDI' => $vendorDir . '/karriere/pdf-merge/tcpi/tcpdi.php', 'tcpdi_parser' => $vendorDir . '/karriere/pdf-merge/tcpi/tcpdi_parser.php', ); icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/autoload_namespaces.php000066400000000000000000000002131511205031700276520ustar00rootroot00000000000000 array($vendorDir . '/phrity/websocket/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Phrity\\Util\\' => array($vendorDir . '/phrity/util-errorhandler/src'), 'Phrity\\Net\\' => array($vendorDir . '/phrity/net-uri/src', $vendorDir . '/phrity/net-stream/src'), 'Phrity\\Http\\' => array($vendorDir . '/phrity/http/src'), 'Phrity\\Comparison\\' => array($vendorDir . '/phrity/comparison/src'), 'Karriere\\PdfMerge\\' => array($vendorDir . '/karriere/pdf-merge/src'), ); icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/autoload_real.php000066400000000000000000000021611511205031700264620ustar00rootroot00000000000000register(true); return $loader; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/autoload_static.php000066400000000000000000000072311511205031700270310ustar00rootroot00000000000000 array ( 'WebSocket\\' => 10, ), 'P' => array ( 'Psr\\Log\\' => 8, 'Psr\\Http\\Message\\' => 17, 'Phrity\\Util\\' => 12, 'Phrity\\Net\\' => 11, 'Phrity\\Http\\' => 12, 'Phrity\\Comparison\\' => 18, ), 'K' => array ( 'Karriere\\PdfMerge\\' => 18, ), ); public static $prefixDirsPsr4 = array ( 'WebSocket\\' => array ( 0 => __DIR__ . '/..' . '/phrity/websocket/src', ), 'Psr\\Log\\' => array ( 0 => __DIR__ . '/..' . '/psr/log/src', ), 'Psr\\Http\\Message\\' => array ( 0 => __DIR__ . '/..' . '/psr/http-factory/src', 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Phrity\\Util\\' => array ( 0 => __DIR__ . '/..' . '/phrity/util-errorhandler/src', ), 'Phrity\\Net\\' => array ( 0 => __DIR__ . '/..' . '/phrity/net-uri/src', 1 => __DIR__ . '/..' . '/phrity/net-stream/src', ), 'Phrity\\Http\\' => array ( 0 => __DIR__ . '/..' . '/phrity/http/src', ), 'Phrity\\Comparison\\' => array ( 0 => __DIR__ . '/..' . '/phrity/comparison/src', ), 'Karriere\\PdfMerge\\' => array ( 0 => __DIR__ . '/..' . '/karriere/pdf-merge/src', ), ); public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', 'FPDF' => __DIR__ . '/..' . '/karriere/pdf-merge/tcpi/tcpdi.php', 'FPDF_TPL' => __DIR__ . '/..' . '/karriere/pdf-merge/tcpi/fpdf_tpl.php', 'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php', 'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php', 'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php', 'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php', 'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php', 'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php', 'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php', 'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php', 'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php', 'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php', 'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php', 'TCPDI' => __DIR__ . '/..' . '/karriere/pdf-merge/tcpi/tcpdi.php', 'tcpdi_parser' => __DIR__ . '/..' . '/karriere/pdf-merge/tcpi/tcpdi_parser.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInitff8ca5c94912b5ce3ac82b5c9f2b4776::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitff8ca5c94912b5ce3ac82b5c9f2b4776::$prefixDirsPsr4; $loader->classMap = ComposerStaticInitff8ca5c94912b5ce3ac82b5c9f2b4776::$classMap; }, null, ClassLoader::class); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/installed.json000066400000000000000000001031001511205031700260030ustar00rootroot00000000000000{ "packages": [ { "name": "karriere/pdf-merge", "version": "v3.3.1", "version_normalized": "3.3.1.0", "source": { "type": "git", "url": "https://github.com/karriereat/pdf-merge.git", "reference": "d524a9d261ea96b18bbbab685b5710a7a0fe3a6e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/karriereat/pdf-merge/zipball/d524a9d261ea96b18bbbab685b5710a7a0fe3a6e", "reference": "d524a9d261ea96b18bbbab685b5710a7a0fe3a6e", "shasum": "" }, "require": { "php": "8.1.* | 8.2.* | 8.3.* | 8.4.*", "tecnickcom/tcpdf": "^6.3" }, "require-dev": { "laravel/pint": "^1.5 | ^1.6", "pestphp/pest": "^1.22", "phpstan/phpstan": "^1.10" }, "time": "2025-02-19T11:02:10+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Karriere\\PdfMerge\\": "src/" }, "classmap": [ "tcpi/fpdf_tpl.php", "tcpi/tcpdi.php", "tcpi/tcpdi_parser.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "authors": [ { "name": "Alexander Lentner", "email": "alexander.lentner@karriere.at", "role": "Maintainer" } ], "description": "A wrapper for the TCPDF class that provides an elegant API for merging PDFs", "keywords": [ "merge", "pdf" ], "support": { "issues": "https://github.com/karriereat/pdf-merge/issues", "source": "https://github.com/karriereat/pdf-merge/tree/v3.3.1" }, "install-path": "../karriere/pdf-merge" }, { "name": "phrity/comparison", "version": "1.4.0", "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-comparison.git", "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-comparison/zipball/aedd44d59db08de7d6c31812d1490c22aab35c92", "reference": "aedd44d59db08de7d6c31812d1490c22aab35c92", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" }, "time": "2025-05-26T20:12:39+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Phrity\\Comparison\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Interfaces and helper trait for comparing objects. Comparator for sort and filter applications.", "homepage": "https://phrity.sirn.se/comparison", "keywords": [ "comparable", "comparator", "comparison", "equalable", "filter", "sort" ], "support": { "issues": "https://github.com/sirn-se/phrity-comparison/issues", "source": "https://github.com/sirn-se/phrity-comparison/tree/1.4.0" }, "install-path": "../phrity/comparison" }, { "name": "phrity/http", "version": "1.0.0", "version_normalized": "1.0.0.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-http.git", "reference": "536e3e46e6220d171a59599ed1f4da9f6b6244fc" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-http/zipball/536e3e46e6220d171a59599ed1f4da9f6b6244fc", "reference": "536e3e46e6220d171a59599ed1f4da9f6b6244fc", "shasum": "" }, "require": { "php": "^8.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "time": "2025-09-07T17:04:26+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Phrity\\Http\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Utilities and interfaces for handling HTTP.", "homepage": "https://phrity.sirn.se/http", "keywords": [ "HTTP Factories", "http", "psr-17" ], "support": { "issues": "https://github.com/sirn-se/phrity-http/issues", "source": "https://github.com/sirn-se/phrity-http/tree/1.0.0" }, "install-path": "../phrity/http" }, { "name": "phrity/net-stream", "version": "2.3.1", "version_normalized": "2.3.1.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-stream.git", "reference": "c621bb3108a5a02bba64df2e5f0cd7ada02665b5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-net-stream/zipball/c621bb3108a5a02bba64df2e5f0cd7ada02665b5", "reference": "c621bb3108a5a02bba64df2e5f0cd7ada02665b5", "shasum": "" }, "require": { "php": "^8.1", "phrity/util-errorhandler": "^1.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/net-uri": "^2.0", "squizlabs/php_codesniffer": "^3.5" }, "time": "2025-08-08T09:51:04+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Socket stream classes implementing PSR-7 Stream and PSR-17 StreamFactory", "homepage": "https://phrity.sirn.se/net-stream", "keywords": [ "Socket", "client", "psr-17", "psr-7", "server", "stream", "stream factory" ], "support": { "issues": "https://github.com/sirn-se/phrity-net-stream/issues", "source": "https://github.com/sirn-se/phrity-net-stream/tree/2.3.1" }, "install-path": "../phrity/net-stream" }, { "name": "phrity/net-uri", "version": "2.2.0", "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-uri.git", "reference": "08de4cf07e439c4708f572249659f09198ac99f0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/08de4cf07e439c4708f572249659f09198ac99f0", "reference": "08de4cf07e439c4708f572249659f09198ac99f0", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.1", "phrity/comparison": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/util-errorhandler": "^1.1", "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-intl": "Enables IDN conversion for non-ASCII domains" }, "time": "2025-05-25T13:05:13+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "PSR-7 Uri and PSR-17 UriFactory implementation", "homepage": "https://phrity.sirn.se/net-uri", "keywords": [ "psr-17", "psr-7", "uri", "uri factory" ], "support": { "issues": "https://github.com/sirn-se/phrity-net-uri/issues", "source": "https://github.com/sirn-se/phrity-net-uri/tree/2.2.0" }, "install-path": "../phrity/net-uri" }, { "name": "phrity/util-errorhandler", "version": "1.2.1", "version_normalized": "1.2.1.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-util-errorhandler.git", "reference": "9825f15ef9b4a93252ce53ca8962278832d834da" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/phrity-util-errorhandler/zipball/9825f15ef9b4a93252ce53ca8962278832d834da", "reference": "9825f15ef9b4a93252ce53ca8962278832d834da", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" }, "time": "2025-08-08T09:48:45+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "Phrity\\Util\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "Inline error handler; catch and resolve errors for code block.", "homepage": "https://phrity.sirn.se/util-errorhandler", "keywords": [ "error", "warning" ], "support": { "issues": "https://github.com/sirn-se/phrity-util-errorhandler/issues", "source": "https://github.com/sirn-se/phrity-util-errorhandler/tree/1.2.1" }, "install-path": "../phrity/util-errorhandler" }, { "name": "phrity/websocket", "version": "3.6.0", "version_normalized": "3.6.0.0", "source": { "type": "git", "url": "https://github.com/sirn-se/websocket-php.git", "reference": "3f16b2564a230bbce716cccaff2f6156a60a8798" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sirn-se/websocket-php/zipball/3f16b2564a230bbce716cccaff2f6156a60a8798", "reference": "3f16b2564a230bbce716cccaff2f6156a60a8798", "shasum": "" }, "require": { "php": "^8.1", "phrity/http": "^1.0", "phrity/net-stream": "^2.3", "phrity/net-uri": "^2.1", "psr/http-message": "^1.1 | ^2.0", "psr/log": "^1.0 | ^2.0 | ^3.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/logger-console": "^1.0", "phrity/net-mock": "^2.3", "phrity/util-errorhandler": "^1.1", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "time": "2025-09-08T16:21:41+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "WebSocket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "ISC" ], "authors": [ { "name": "Fredrik Liljegren" }, { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "description": "WebSocket client and server", "homepage": "https://phrity.sirn.se/websocket", "keywords": [ "client", "server", "websocket" ], "support": { "issues": "https://github.com/sirn-se/websocket-php/issues", "source": "https://github.com/sirn-se/websocket-php/tree/3.6.0" }, "install-path": "../phrity/websocket" }, { "name": "psr/http-factory", "version": "1.1.0", "version_normalized": "1.1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "time": "2024-04-15T12:06:14+00:00", "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", "message", "psr", "psr-17", "psr-7", "request", "response" ], "support": { "source": "https://github.com/php-fig/http-factory" }, "install-path": "../psr/http-factory" }, { "name": "psr/http-message", "version": "2.0", "version_normalized": "2.0.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "time": "2023-04-04T09:54:51+00:00", "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "support": { "source": "https://github.com/php-fig/http-message/tree/2.0" }, "install-path": "../psr/http-message" }, { "name": "psr/log", "version": "3.0.2", "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { "php": ">=8.0.0" }, "time": "2024-09-11T13:17:53+00:00", "type": "library", "extra": { "branch-alias": { "dev-master": "3.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], "support": { "source": "https://github.com/php-fig/log/tree/3.0.2" }, "install-path": "../psr/log" }, { "name": "tecnickcom/tcpdf", "version": "6.10.0", "version_normalized": "6.10.0.0", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", "reference": "ca5b6de294512145db96bcbc94e61696599c391d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/ca5b6de294512145db96bcbc94e61696599c391d", "reference": "ca5b6de294512145db96bcbc94e61696599c391d", "shasum": "" }, "require": { "ext-curl": "*", "php": ">=7.1.0" }, "time": "2025-05-27T18:02:28+00:00", "type": "library", "installation-source": "dist", "autoload": { "classmap": [ "config", "include", "tcpdf.php", "tcpdf_barcodes_1d.php", "tcpdf_barcodes_2d.php", "include/tcpdf_colors.php", "include/tcpdf_filters.php", "include/tcpdf_font_data.php", "include/tcpdf_fonts.php", "include/tcpdf_images.php", "include/tcpdf_static.php", "include/barcodes/datamatrix.php", "include/barcodes/pdf417.php", "include/barcodes/qrcode.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" ], "authors": [ { "name": "Nicola Asuni", "email": "info@tecnick.com", "role": "lead" } ], "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", "homepage": "http://www.tcpdf.org/", "keywords": [ "PDFD32000-2008", "TCPDF", "barcodes", "datamatrix", "pdf", "pdf417", "qrcode" ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", "source": "https://github.com/tecnickcom/TCPDF/tree/6.10.0" }, "funding": [ { "url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ", "type": "custom" } ], "install-path": "../tecnickcom/tcpdf" } ], "dev": true, "dev-package-names": [] } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/installed.php000066400000000000000000000111441511205031700256270ustar00rootroot00000000000000 array( 'name' => '__root__', 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => true, ), 'versions' => array( '__root__' => array( 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'karriere/pdf-merge' => array( 'pretty_version' => 'v3.3.1', 'version' => '3.3.1.0', 'reference' => 'd524a9d261ea96b18bbbab685b5710a7a0fe3a6e', 'type' => 'library', 'install_path' => __DIR__ . '/../karriere/pdf-merge', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/comparison' => array( 'pretty_version' => '1.4.0', 'version' => '1.4.0.0', 'reference' => 'aedd44d59db08de7d6c31812d1490c22aab35c92', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/comparison', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/http' => array( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => '536e3e46e6220d171a59599ed1f4da9f6b6244fc', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/http', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/net-stream' => array( 'pretty_version' => '2.3.1', 'version' => '2.3.1.0', 'reference' => 'c621bb3108a5a02bba64df2e5f0cd7ada02665b5', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/net-stream', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/net-uri' => array( 'pretty_version' => '2.2.0', 'version' => '2.2.0.0', 'reference' => '08de4cf07e439c4708f572249659f09198ac99f0', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/net-uri', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/util-errorhandler' => array( 'pretty_version' => '1.2.1', 'version' => '1.2.1.0', 'reference' => '9825f15ef9b4a93252ce53ca8962278832d834da', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/util-errorhandler', 'aliases' => array(), 'dev_requirement' => false, ), 'phrity/websocket' => array( 'pretty_version' => '3.6.0', 'version' => '3.6.0.0', 'reference' => '3f16b2564a230bbce716cccaff2f6156a60a8798', 'type' => 'library', 'install_path' => __DIR__ . '/../phrity/websocket', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-factory' => array( 'pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-message' => array( 'pretty_version' => '2.0', 'version' => '2.0.0.0', 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/log' => array( 'pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => false, ), 'tecnickcom/tcpdf' => array( 'pretty_version' => '6.10.0', 'version' => '6.10.0.0', 'reference' => 'ca5b6de294512145db96bcbc94e61696599c391d', 'type' => 'library', 'install_path' => __DIR__ . '/../tecnickcom/tcpdf', 'aliases' => array(), 'dev_requirement' => false, ), ), ); icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/composer/platform_check.php000066400000000000000000000016251511205031700266340ustar00rootroot00000000000000= 80200)) { $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } if (!ini_get('display_errors')) { if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); } elseif (!headers_sent()) { 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; } } throw new \RuntimeException( 'Composer detected issues in your platform: ' . implode(' ', $issues) ); } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/000077500000000000000000000000001511205031700231135ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/000077500000000000000000000000001511205031700247615ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/.github/000077500000000000000000000000001511205031700263215ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/.github/workflows/000077500000000000000000000000001511205031700303565ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/.github/workflows/ci.yml000066400000000000000000000014261511205031700314770ustar00rootroot00000000000000name: CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: strategy: fail-fast: true matrix: php: [ "8.1", "8.2", "8.3", "8.4" ] runs-on: ubuntu-latest name: PHP@${{ matrix.php }} steps: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - uses: actions/checkout@v4 - name: Validate composer.json and composer.lock run: composer validate - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest - name: Lint code run: composer run-script lint - name: Analyse code run: composer run-script analyse - name: Test code run: composer run-script test icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/.gitignore000066400000000000000000000001361511205031700267510ustar00rootroot00000000000000vendor/ coverage/ tests/output.pdf .phpunit.result.cache composer.lock coverage.xml junit.xml icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/CHANGELOG.md000066400000000000000000000033051511205031700265730ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [3.3.1] - 2025-02-19 ### Added - `@throws` to PHPDoc for better IDE support ## [3.3.0] - 2025-02-19 ### Added - Method `getFiles()` ## [3.2.0] - 2024-12-05 ### Added - Support for PHP 8.4 ### Removed - Support for PHP 8.0 ## [3.1.0] - 2024-02-05 ### Added - Support for PHP 8.3 ## [3.0.0] - 2023-03-01 ### Added - Support for PHP 8.2 ### Changed - [BREAKING] Header and footer config with dedicated classes instead of arrays - Linting to `pint` - Unit tests to `pest` ### Removed - Support for PHP 7.4 ## [2.1.0] - 2022-12-07 ### Added - Support for merging PDFs with mixed orientations (portrait and landscape) ### Changed - Default header and footer are removed if header/footer-data is empty ## [2.0.0] - 2022-08-10 ### Added - Support for PHP 8.1 - Ability to get `TCPDF`-instance by calling `(new PdfMerge())->getPdf()` ### Changed - [BREAKING] `PdfMerge::merge()` now returns `string` instead of `bool` - `PdfMerge::merge()` now accepts `string $destination` as second parameter ### Removed - Dropped support for PHP < 7.4 ## [1.3.0] - 2021-10-20 ### Added - Support for PHP 8 ## [1.2.0] - 2021-09-06 ### Added - Ability to set `tcpdf` footer and header data via PdfMerge constructor ## [1.1.1] - 2020-04-03 ### Fixed - removed unused imagick options ## [1.1.0] - 2020-03-30 ### Added - tcpdf dependency - tcpdi implementation ### Removed - fpdf and fpdi dependencies ## [1.0.0] - 2020-03-30 ### Added - Pdf merging implementation based on fpdf & fpdi icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/LICENSE000066400000000000000000000246541511205031700260010ustar00rootroot00000000000000 Copyright 2017 karriere.at GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/README.md000066400000000000000000000035161511205031700262450ustar00rootroot00000000000000     ![](https://github.com/karriereat/pdf-merge/workflows/CI/badge.svg) [![Packagist Downloads](https://img.shields.io/packagist/dt/karriere/pdf-merge.svg?style=flat-square)](https://packagist.org/packages/karriere/pdf-merge) # Pdf Merge Solution for PHP This package is a wrapper for the `TCPDF` class that provides an elegant API for merging PDF files. ## Installation You can install the package via composer: ```bash composer require karriere/pdf-merge ``` ## Usage ```php use Karriere\PdfMerge\PdfMerge; $pdfMerge = new PdfMerge(); $pdfMerge->add('/path/to/file1.pdf'); $pdfMerge->add('/path/to/file2.pdf'); $pdfMerge->merge('/path/to/output.pdf'); ``` Please note, that the `merge()`-method will throw a `NoFilesDefinedException` if no files where added. ### Check for file existence You can check if a file was already added for merging by calling: ```php $pdfMerge->contains('/path/to/file.pdf'); ``` ### Configuring header and footer You can also configure the header of footer of all pages like this: ```php use Karriere\PdfMerge\PdfMerge; $pdfMerge = new PdfMerge( new HeaderConfig( imagePath: 'header_logo.png', logoWidthMM: 20, title: 'Header', text: 'This is a header text', textColor: new RGB(200, 200, 200), lineColor: new RGB(0, 0, 255), ), new FooterConfig( textColor: new RGB(100, 100, 100), lineColor: new RGB(255, 0, 0), margin: 20, ), ); ``` All config properties have default values, so you don't have to pass them all. ## License Apache License 2.0 Please see [LICENSE](LICENSE) for more information. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/UPGRADE.md000066400000000000000000000033131511205031700263720ustar00rootroot00000000000000# Upgrade Guide ## v2 to v3 The only breaking chance in this release is the way a header and/or footer configuration is done. In version 2 this was done with simple arrays, in v3 dedicated classes were introduced to make the configuration type safe and bullet proof. ### Header/Footer Configuration ```php // Before use Karriere\PdfMerge\PdfMerge; new PdfMerge([ 'ln' => 'header_logo.png', 'lw' => 20, 'ht' => 'title', 'hs' => 'more text', 'tc' => [255, 255, 255], 'lc' => [0, 0, 0]. ], [ 'tc' => [255, 255, 255], 'lc' => [0, 0, 0]. ]); // After use Karriere\PdfMerge\Config\FooterConfig; use Karriere\PdfMerge\Config\HeaderConfig; use Karriere\PdfMerge\Config\RGB; use Karriere\PdfMerge\PdfMerge; new PdfMerge( new HeaderConfig( imagePath: 'header_logo.png', logoWidthMM: 20, title: 'Header', text: 'This is a header text', textColor: new RGB(200, 200, 200), lineColor: new RGB(0, 0, 255), ), new FooterConfig( textColor: new RGB(100, 100, 100), lineColor: new RGB(255, 0, 0), margin: 20, ), ); ``` The above example shows the full feature set of header/footer configuration, but when using named arguments you can choose a subset of configuration values as well because all other values have defaults in place: ```php use Karriere\PdfMerge\Config\FooterConfig; use Karriere\PdfMerge\Config\HeaderConfig; use Karriere\PdfMerge\Config\RGB; use Karriere\PdfMerge\PdfMerge; new PdfMerge( new HeaderConfig( imagePath: 'header_logo.png', text: 'This is a header text', textColor: new RGB(200, 200, 200), ), new FooterConfig( lineColor: new RGB(255, 0, 0), ), ); ``` icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/composer.json000066400000000000000000000030121511205031700274770ustar00rootroot00000000000000{ "name": "karriere/pdf-merge", "description": "A wrapper for the TCPDF class that provides an elegant API for merging PDFs", "keywords": ["pdf", "merge"], "license": "Apache-2.0", "authors": [ { "name": "Alexander Lentner", "email": "alexander.lentner@karriere.at", "role": "Maintainer" } ], "require": { "php": "8.1.* | 8.2.* | 8.3.* | 8.4.*", "tecnickcom/tcpdf": "^6.3" }, "require-dev": { "laravel/pint": "^1.5 | ^1.6", "pestphp/pest": "^1.22", "phpstan/phpstan": "^1.10" }, "autoload": { "psr-4": { "Karriere\\PdfMerge\\": "src/" }, "classmap": [ "tcpi/fpdf_tpl.php", "tcpi/tcpdi.php", "tcpi/tcpdi_parser.php" ] }, "autoload-dev": { "psr-4": { "Karriere\\PdfMerge\\Tests\\": "tests" } }, "scripts": { "analyse": "phpstan analyse --memory-limit 512M", "lint": "pint --test", "lint:verbose": "pint -v --test", "fix": "pint", "test": "vendor/bin/pest", "coverage": "vendor/bin/pest --coverage --ci --coverage-html coverage --coverage-clover coverage.xml --log-junit junit.xml", "report": "vendor/bin/pest --coverage", "report:html": "vendor/bin/pest --coverage --coverage-html coverage" }, "config": { "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/phpstan.neon000066400000000000000000000001301511205031700273110ustar00rootroot00000000000000parameters: paths: - src level: max treatPhpDocTypesAsCertain: true icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/phpunit.xml000066400000000000000000000010331511205031700271670ustar00rootroot00000000000000 ./tests ./src icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/pint.json000066400000000000000000000001351511205031700266250ustar00rootroot00000000000000{ "preset": "psr12", "rules": { "concat_space": { "spacing": "one" } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/000077500000000000000000000000001511205031700255505ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Config/000077500000000000000000000000001511205031700267555ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Config/FooterConfig.php000066400000000000000000000013211511205031700320470ustar00rootroot00000000000000textColor ?: new RGB(); } public function lineColor(): RGB { return $this->lineColor ?: new RGB(); } public function margin(): int { return $this->margin; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Config/HeaderConfig.php000066400000000000000000000023211511205031700320020ustar00rootroot00000000000000imagePath; } public function logoWidthMM(): int { return $this->logoWidthMM; } public function title(): string { return $this->title; } public function text(): string { return $this->text; } public function textColor(): RGB { return $this->textColor ?: new RGB(); } public function lineColor(): RGB { return $this->lineColor ?: new RGB(); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Config/RGB.php000066400000000000000000000004771511205031700301100ustar00rootroot00000000000000 */ public function toArray(): array { return [$this->red, $this->green, $this->blue]; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Exceptions/000077500000000000000000000000001511205031700276715ustar00rootroot00000000000000FileNotFoundException.php000066400000000000000000000003601511205031700345350ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/src/Exceptions */ private array $files = []; private TCPDI $pdf; /** * Passed parameters overrides settings for header and footer by calling tcpdf.php methods: * setHeaderData($ln='', $lw=0, $ht='', $hs='', $tc=array(0,0,0), $lc=array(0,0,0)) * setFooterData($tc=array(0,0,0), $lc=array(0,0,0)) * For more info about tcpdf, please read https://tcpdf.org/docs/ */ public function __construct(?HeaderConfig $headerConfig = null, ?FooterConfig $footerConfig = null) { $this->pdf = new TCPDI(); $this->configureHeaderAndFooter($headerConfig, $footerConfig); } public function getPdf(): TCPDI { return $this->pdf; } /** * Adds a file to merge * * @throws FileNotFoundException */ public function add(string $file): void { if (!file_exists($file)) { throw new FileNotFoundException($file); } $this->files[] = $file; } /** * Checks if the given file is already registered for merging */ public function contains(string $file): bool { return in_array($file, $this->files); } /** * Resets the stored files */ public function reset(): void { $this->files = []; } /** * Generates a merged PDF file from the already stored PDF files * * @throws NoFilesDefinedException */ public function merge(string $outputFilename, string $destination = 'F'): string { if (count($this->files) === 0) { throw new NoFilesDefinedException(); } foreach ($this->files as $file) { $pageCount = $this->pdf->setSourceFile($file); for ($i = 1; $i <= $pageCount; $i++) { $pageId = $this->pdf->ImportPage($i); $size = $this->pdf->getTemplateSize($pageId); $this->pdf->AddPage('', $size); $this->pdf->useTemplate($pageId, null, null, 0, 0, true); } } return $this->pdf->Output($outputFilename, $destination); } /** * @return array */ public function getFiles(): array { return $this->files; } private function configureHeaderAndFooter(?HeaderConfig $headerConfig, ?FooterConfig $footerConfig): void { if ($headerConfig) { $this->pdf->setHeaderData( $headerConfig->imagePath(), $headerConfig->logoWidthMM(), $headerConfig->title(), $headerConfig->text(), $headerConfig->textColor()->toArray(), $headerConfig->lineColor()->toArray(), ); } else { $this->pdf->setPrintHeader(false); } if ($footerConfig) { $this->pdf->setFooterData($footerConfig->textColor()->toArray(), $footerConfig->lineColor()->toArray()); $this->pdf->setFooterMargin($footerConfig->margin()); } else { $this->pdf->setPrintFooter(false); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tcpi/000077500000000000000000000000001511205031700257205ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tcpi/fpdf_tpl.php000066400000000000000000000370401511205031700302330ustar00rootroot00000000000000Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.'); return; } if ($this->page <= 0) { $this->error("You have to add a page to fpdf first!"); } if ($x == null) { $x = 0; } if ($y == null) { $y = 0; } if ($w == null) { $w = $this->w; } if ($h == null) { $h = $this->h; } // Save settings $this->tpl++; $tpl = & $this->tpls[$this->tpl]; $tpl = array( 'o_x' => $this->x, 'o_y' => $this->y, 'o_AutoPageBreak' => $this->AutoPageBreak, 'o_bMargin' => $this->bMargin, 'o_tMargin' => $this->tMargin, 'o_lMargin' => $this->lMargin, 'o_rMargin' => $this->rMargin, 'o_h' => $this->h, 'o_w' => $this->w, 'o_FontFamily' => $this->FontFamily, 'o_FontStyle' => $this->FontStyle, 'o_FontSizePt' => $this->FontSizePt, 'o_FontSize' => $this->FontSize, 'buffer' => '', 'x' => $x, 'y' => $y, 'w' => $w, 'h' => $h ); $this->SetAutoPageBreak(false); // Define own high and width to calculate possitions correct $this->h = $h; $this->w = $w; $this->_intpl = true; $this->SetXY($x + $this->lMargin, $y + $this->tMargin); $this->SetRightMargin($this->w - $w + $this->rMargin); if ($this->CurrentFont) { $fontkey = $this->FontFamily . $this->FontStyle; $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] = & $this->fonts[$fontkey]; $this->_out(sprintf('BT /F%d %.2f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); } return $this->tpl; } /** * End Template * * This method ends a template and reset initiated variables on beginTemplate. * * @return mixed If a template is opened, the ID is returned. If not a false is returned. */ public function endTemplate() { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'endTemplate'], $args); } if ($this->_intpl) { $this->_intpl = false; $tpl = & $this->tpls[$this->tpl]; $this->SetXY($tpl['o_x'], $tpl['o_y']); $this->tMargin = $tpl['o_tMargin']; $this->lMargin = $tpl['o_lMargin']; $this->rMargin = $tpl['o_rMargin']; $this->h = $tpl['o_h']; $this->w = $tpl['o_w']; $this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']); $this->FontFamily = $tpl['o_FontFamily']; $this->FontStyle = $tpl['o_FontStyle']; $this->FontSizePt = $tpl['o_FontSizePt']; $this->FontSize = $tpl['o_FontSize']; $fontkey = $this->FontFamily . $this->FontStyle; if ($fontkey) { $this->CurrentFont = & $this->fonts[$fontkey]; } return $this->tpl; } else { return false; } } /** * Use a Template in current Page or other Template * * You can use a template in a page or in another template. * You can give the used template a new size like you use the Image()-method. * All parameters are optional. The width or height is calculated automaticaly * if one is given. If no parameter is given the origin size as defined in * beginTemplate() is used. * The calculated or used width and height are returned as an array. * * @param int $tplidx A valid template-Id * @param int $_x The x-position * @param int $_y The y-position * @param int $_w The new width of the template * @param int $_h The new height of the template * @retrun array The height and width of the template */ public function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0) { if ($this->page <= 0) { $this->error('You have to add a page first!'); } if (!isset($this->tpls[$tplidx])) { $this->error('Template does not exist!'); } if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] = & $this->tpls[$tplidx]; } $tpl = & $this->tpls[$tplidx]; $w = $tpl['w']; $h = $tpl['h']; if ($_x == null) { $_x = 0; } if ($_y == null) { $_y = 0; } $_x += $tpl['x']; $_y += $tpl['y']; $wh = $this->getTemplateSize($tplidx, $_w, $_h); $_w = $wh['w']; $_h = $wh['h']; $tData = array( 'x' => $this->x, 'y' => $this->y, 'w' => $_w, 'h' => $_h, 'scaleX' => ($_w / $w), 'scaleY' => ($_h / $h), 'tx' => $_x, 'ty' => ($this->h - $_y - $_h), 'lty' => ($this->h - $_y - $_h) - ($this->h - $h) * ($_h / $h) ); $this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate $this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx)); $this->lastUsedTemplateData = $tData; return array('w' => $_w, 'h' => $_h); } /** * Get The calculated Size of a Template * * If one size is given, this method calculates the other one. * * @param int $tplidx A valid template-Id * @param int $_w The width of the template * @param int $_h The height of the template * @return array The height and width of the template */ public function getTemplateSize($tplidx, $_w = 0, $_h = 0) { if (!isset($this->tpls[$tplidx])) { return false; } $tpl = & $this->tpls[$tplidx]; $w = $tpl['w']; $h = $tpl['h']; if ($_w == 0 and $_h == 0) { $_w = $w; $_h = $h; } if ($_w == 0) { $_w = $_h * $w / $h; } if ($_h == 0) { $_h = $_w * $h / $w; } return array("w" => $_w, "h" => $_h); } /** * See FPDF/TCPDF-Documentation ;-) */ public function SetFont($family, $style = '', $size = 0, $fontfile = '', $subset = 'default', $out = true) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'SetFont'], $args); } parent::SetFont($family, $style, $size); $fontkey = $this->FontFamily . $this->FontStyle; if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] = & $this->fonts[$fontkey]; } else { $this->_res['page'][$this->page]['fonts'][$fontkey] = & $this->fonts[$fontkey]; } } /** * See FPDF/TCPDF-Documentation ;-) */ public function Image( $file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = [] ) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'Image'], $args); } $ret = parent::Image($file, $x, $y, $w, $h, $type, $link); if ($this->_intpl) { $this->_res['tpl'][$this->tpl]['images'][$file] = & $this->images[$file]; } else { $this->_res['page'][$this->page]['images'][$file] = & $this->images[$file]; } return $ret; } /** * See FPDF-Documentation ;-) * * AddPage is not available when you're "in" a template. */ public function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'AddPage'], $args); } if ($this->_intpl) { $this->Error('Adding pages in templates isn\'t possible!'); } parent::AddPage($orientation, $format); } /** * Preserve adding Links in Templates ...won't work */ public function Link($x, $y, $w, $h, $link, $spaces = 0) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'Link'], $args); } if ($this->_intpl) { $this->Error('Using links in templates aren\'t possible!'); } parent::Link($x, $y, $w, $h, $link); } public function AddLink() { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'AddLink'], $args); } if ($this->_intpl) { $this->Error('Adding links in templates aren\'t possible!'); } return parent::AddLink(); } public function SetLink($link, $y = 0, $page = -1) { if (is_subclass_of($this, 'TCPDF')) { $args = func_get_args(); return call_user_func_array([TCPDF::class, 'SetLink'], $args); } if ($this->_intpl) { $this->Error('Setting links in templates aren\'t possible!'); } parent::SetLink($link, $y, $page); } /** * Private Method that writes the form xobjects */ public function _putformxobjects() { $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; reset($this->tpls); foreach ($this->tpls as $tplidx => $tpl) { $p = ($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; $this->_newobj(); $this->tpls[$tplidx]['n'] = $this->n; $this->_out('<<' . $filter . '/Type /XObject'); $this->_out('/Subtype /Form'); $this->_out('/FormType 1'); $this->_out(sprintf( '/BBox [%.2F %.2F %.2F %.2F]', // llx $tpl['x'] * $this->k, // lly -$tpl['y'] * $this->k, // urx ($tpl['w'] + $tpl['x']) * $this->k, // ury ($tpl['h'] - $tpl['y']) * $this->k )); if ($tpl['x'] != 0 || $tpl['y'] != 0) { $this->_out(sprintf( '/Matrix [1 0 0 1 %.5F %.5F]', -$tpl['x'] * $this->k * 2, $tpl['y'] * $this->k * 2 )); } $this->_out('/Resources '); $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { $this->_out('/Font <<'); foreach ($this->_res['tpl'][$tplidx]['fonts'] as $font) { $this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R'); } $this->_out('>>'); } if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { $this->_out('/XObject <<'); if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { foreach ($this->_res['tpl'][$tplidx]['images'] as $image) { $this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R'); } } if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { foreach ($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) { $this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R'); } } $this->_out('>>'); } $this->_out('>>'); $this->_out('/Length ' . strlen($p) . ' >>'); $this->_putstream($p); $this->_out('endobj'); } } /** * Overwritten to add _putformxobjects() after _putimages() * */ public function _putimages() { parent::_putimages(); $this->_putformxobjects(); } public function _putxobjectdict() { parent::_putxobjectdict(); if (count($this->tpls)) { foreach ($this->tpls as $tplidx => $tpl) { $this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n'])); } } } /** * Private Method */ public function _out($s) { if ($this->state == 2 && $this->_intpl) { $this->tpls[$this->tpl]['buffer'] .= $s . "\n"; } else { parent::_out($s); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tcpi/tcpdi.php000066400000000000000000000674301511205031700275460ustar00rootroot00000000000000current_filename = $filename; if (!isset($this->parsers[$filename])) { $this->parsers[$filename] = $this->_getPdfParser($filename); } $this->current_parser = & $this->parsers[$filename]; $this->setPDFVersion(max($this->getPDFVersion(), $this->current_parser->getPDFVersion())); return $this->parsers[$filename]->getPageCount(); } /** * Set a source-file PDF data * * @param string $pdfdata The PDF file content * @return int number of available pages */ public function setSourceData($pdfdata) { $filename = uniqid('tcpdi-'); $this->current_filename = $filename; if (!isset($this->parsers[$filename])) { $this->parsers[$filename] = new tcpdi_parser($pdfdata, $filename); } $this->current_parser = & $this->parsers[$filename]; $this->setPDFVersion(max($this->getPDFVersion(), $this->current_parser->getPDFVersion())); return $this->parsers[$filename]->getPageCount(); } /** * Returns a PDF parser object * * @param string $filename * @return fpdi_pdf_parser */ public function _getPdfParser($filename) { $data = file_get_contents($filename); return new tcpdi_parser($data, $filename); } /** * Get the current PDF version * * @return string */ public function getPDFVersion() { return $this->PDFVersion; } /** * Set the PDF version * * @return string */ public function setPDFVersion($version = '1.3') { $this->PDFVersion = $version; } /** * Import a page * * @param int $pageno pagenumber * @return int Index of imported page - to use with fpdf_tpl::useTemplate() */ public function importPage($pageno, $boxName = '/CropBox') { if ($this->_intpl) { return $this->error('Please import the desired pages before creating a new template.'); } $fn = $this->current_filename; // check if page already imported $pageKey = $fn . '-' . ((int)$pageno) . $boxName; if (isset($this->_importedPages[$pageKey])) { return $this->_importedPages[$pageKey]; } $parser = & $this->parsers[$fn]; $parser->setPageno($pageno); if (!in_array($boxName, $parser->availableBoxes)) { return $this->Error(sprintf('Unknown box: %s', $boxName)); } $pageboxes = $parser->getPageBoxes($pageno, $this->k); /** * MediaBox * CropBox: Default -> MediaBox * BleedBox: Default -> CropBox * TrimBox: Default -> CropBox * ArtBox: Default -> CropBox */ if (!isset($pageboxes[$boxName]) && ($boxName == '/BleedBox' || $boxName == '/TrimBox' || $boxName == '/ArtBox')) { $boxName = '/CropBox'; } if (!isset($pageboxes[$boxName]) && $boxName == '/CropBox') { $boxName = '/MediaBox'; } if (!isset($pageboxes[$boxName])) { return false; } $this->lastUsedPageBox = $boxName; $box = $pageboxes[$boxName]; $this->tpl++; $this->tpls[$this->tpl] = array(); $tpl = & $this->tpls[$this->tpl]; $tpl['parser'] = & $parser; $tpl['resources'] = $parser->getPageResources(); $tpl['buffer'] = $parser->getContent(); $tpl['box'] = $box; // To build an array that can be used by PDF_TPL::useTemplate() $this->tpls[$this->tpl] = array_merge($this->tpls[$this->tpl], $box); // An imported page will start at 0,0 everytime. Translation will be set in _putformxobjects() $tpl['x'] = 0; $tpl['y'] = 0; // handle rotated pages $rotation = $parser->getPageRotation($pageno); $tpl['_rotationAngle'] = 0; if (isset($rotation[1]) && ($angle = $rotation[1] % 360) != 0) { $steps = $angle / 90; $_w = $tpl['w']; $_h = $tpl['h']; $tpl['w'] = $steps % 2 == 0 ? $_w : $_h; $tpl['h'] = $steps % 2 == 0 ? $_h : $_w; if ($angle < 0) { $angle += 360; } $tpl['_rotationAngle'] = $angle * -1; } $this->_importedPages[$pageKey] = $this->tpl; return $this->tpl; } public function setPageFormatFromTemplatePage($pageno, $orientation) { $fn = $this->current_filename; $parser = & $this->parsers[$fn]; $parser->setPageno($pageno); $boxes = $parser->getPageBoxes($pageno, $this->k); foreach ($boxes as $name => $box) { if ($name[0] == '/') { $boxes[substr($name, 1)] = $box; unset($boxes[$name]); } } $this->setPageFormat($boxes, $orientation); } /* Wrapper for AddPage() which tracks TOC pages to offset annotations later */ public function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) { if ($this->inxobj) { // we are inside an XObject template return; } parent::AddPage($orientation, $format, $keepmargins, $tocpage); if ($this->tocpage) { $this->_numTOCpages++; } } /* Wrapper for AddTOC() which tracks TOC position to offset annotations later */ public function AddTOC($page = '', $numbersfont = '', $filler = '.', $toc_name = 'TOC', $style = '', $color = array(0,0,0)) { if (!TCPDF_STATIC::empty_string($page)) { $this->_TOCpagenum = $page; } else { $this->_TOCpagenum = $this->page; } parent::AddTOC($page, $numbersfont, $filler, $toc_name, $style, $color); } public function importAnnotations($pageno) { $fn = $this->current_filename; $parser = & $this->parsers[$fn]; $parser->setPageno($pageno); $annots = $parser->getPageAnnotations(); if (is_array($annots) && $annots[0] == PDF_TYPE_OBJECT // We got an object && is_array($annots[1]) && $annots[1][0] == PDF_TYPE_ARRAY // It's an array && is_array($annots[1][1]) && count($annots[1][1] > 1) // It's not empty - there are annotations for this page ) { if (!isset($this->_obj_stack[$fn])) { $this->_obj_stack[$fn] = array(); } $this->_importedAnnots[$this->page] = array(); foreach ($annots[1][1] as $annot) { $this->importAnnotation($annot); } } } public function importAnnotation($annotation) { $fn = $this->current_filename; $old_id = $annotation[1]; $value = array(PDF_TYPE_OBJREF, $old_id, 0); if (!isset($this->_don_obj_stack[$fn][$old_id])) { $this->_newobj(false, true); $this->_obj_stack[$fn][$old_id] = array($this->n, $value); $this->_don_obj_stack[$fn][$old_id] = array($this->n, $value); } $objid = $this->_don_obj_stack[$fn][$old_id][0]; $this->_importedAnnots[$this->page][] = $objid; } /** * Get references to page annotations. * @param $n (int) page number * @return string * @protected * @author Nicola Asuni * @since 5.0.010 (2010-05-17) */ protected function _getannotsrefs($n) { if (!empty($this->_numTOCpages) && $n >= $this->_TOCpagenum) { // Offset page number to account for TOC being inserted before page containing annotations. $n -= $this->_numTOCpages; } if (!(isset($this->_importedAnnots[$n]) or isset($this->PageAnnots[$n]) or ($this->sign and isset($this->signature_data['cert_type'])))) { return ''; } $out = ' /Annots ['; if (isset($this->_importedAnnots[$n])) { foreach ($this->_importedAnnots[$n] as $key => $val) { $out .= ' ' . $val . ' 0 R'; } } if (isset($this->PageAnnots[$n])) { foreach ($this->PageAnnots[$n] as $key => $val) { if (!in_array($val['n'], $this->radio_groups)) { $out .= ' ' . $val['n'] . ' 0 R'; } } // add radiobutton groups if (isset($this->radiobutton_groups[$n])) { foreach ($this->radiobutton_groups[$n] as $key => $data) { if (isset($data['n'])) { $out .= ' ' . $data['n'] . ' 0 R'; } } } } if ($this->sign and ($n == $this->signature_appearance['page']) and isset($this->signature_data['cert_type'])) { // set reference for signature object $out .= ' ' . $this->sig_obj_id . ' 0 R'; } if (!empty($this->empty_signature_appearance)) { foreach ($this->empty_signature_appearance as $esa) { if ($esa['page'] == $n) { // set reference for empty signature objects $out .= ' ' . $esa['objid'] . ' 0 R'; } } } $out .= ' ]'; return $out; } /** * Returns the last used page box * * @return string */ public function getLastUsedPageBox() { return $this->lastUsedPageBox; } public function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0, $adjustPageSize = false) { if ($adjustPageSize == true && is_null($_x) && is_null($_y)) { $size = $this->getTemplateSize($tplidx, $_w, $_h); $orientation = $size['w'] > $size['h'] ? 'L' : 'P'; $size = array($size['w'], $size['h']); $this->setPageFormat($size, $orientation); } $this->_out('q 0 J 1 w 0 j 0 G 0 g'); // reset standard values $s = parent::useTemplate($tplidx, $_x, $_y, $_w, $_h); $this->_out('Q'); return $s; } /** * Private method, that rebuilds all needed objects of source files */ public function _putimportedobjects() { if (is_array($this->parsers) && count($this->parsers) > 0) { foreach ($this->parsers as $filename => $p) { $this->current_parser = & $this->parsers[$filename]; if (isset($this->_obj_stack[$filename]) && is_array($this->_obj_stack[$filename])) { while (($n = key($this->_obj_stack[$filename])) !== null) { $nObj = $this->current_parser->getObjectVal($this->_obj_stack[$filename][$n][1]); $this->_newobj($this->_obj_stack[$filename][$n][0]); if ($nObj[0] == PDF_TYPE_STREAM) { $this->pdf_write_value($nObj); } else { $this->pdf_write_value($nObj[1]); } $this->_out('endobj'); $this->_obj_stack[$filename][$n] = null; // free memory unset($this->_obj_stack[$filename][$n]); reset($this->_obj_stack[$filename]); } } // We're done with this parser. Clean it up to free a bit of RAM. $this->current_parser->cleanUp(); unset($this->parsers[$filename]); } } } /** * Private Method that writes the form xobjects */ public function _putformxobjects() { $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; reset($this->tpls); foreach ($this->tpls as $tplidx => $tpl) { $p = ($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; $this->_newobj(); $cN = $this->n; // TCPDF/Protection: rem current "n" $this->tpls[$tplidx]['n'] = $this->n; $this->_out('<<' . $filter . '/Type /XObject'); $this->_out('/Subtype /Form'); $this->_out('/FormType 1'); $this->_out(sprintf( '/BBox [%.2F %.2F %.2F %.2F]', (isset($tpl['box']['llx']) ? $tpl['box']['llx'] : $tpl['x']) * $this->k, (isset($tpl['box']['lly']) ? $tpl['box']['lly'] : -$tpl['y']) * $this->k, (isset($tpl['box']['urx']) ? $tpl['box']['urx'] : $tpl['w'] + $tpl['x']) * $this->k, (isset($tpl['box']['ury']) ? $tpl['box']['ury'] : $tpl['h'] - $tpl['y']) * $this->k )); $c = 1; $s = 0; $tx = 0; $ty = 0; if (isset($tpl['box'])) { $tx = -$tpl['box']['llx']; $ty = -$tpl['box']['lly']; if ($tpl['_rotationAngle'] <> 0) { $angle = $tpl['_rotationAngle'] * M_PI / 180; $c = cos($angle); $s = sin($angle); switch ($tpl['_rotationAngle']) { case -90: $tx = -$tpl['box']['lly']; $ty = $tpl['box']['urx']; break; case -180: $tx = $tpl['box']['urx']; $ty = $tpl['box']['ury']; break; case -270: $tx = $tpl['box']['ury']; $ty = -$tpl['box']['llx']; break; } } } elseif ($tpl['x'] != 0 || $tpl['y'] != 0) { $tx = -$tpl['x'] * 2; $ty = $tpl['y'] * 2; } $tx *= $this->k; $ty *= $this->k; if ($c != 1 || $s != 0 || $tx != 0 || $ty != 0) { $this->_out(sprintf( '/Matrix [%.5F %.5F %.5F %.5F %.5F %.5F]', $c, $s, -$s, $c, $tx, $ty )); } $this->_out('/Resources '); if (isset($tpl['resources'])) { $this->current_parser = & $tpl['parser']; $this->pdf_write_value($tpl['resources']); // "n" will be changed } else { $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { $this->_out('/Font <<'); foreach ($this->_res['tpl'][$tplidx]['fonts'] as $font) { $this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R'); } $this->_out('>>'); } if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { $this->_out('/XObject <<'); if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { foreach ($this->_res['tpl'][$tplidx]['images'] as $image) { $this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R'); } } if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { foreach ($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) { $this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R'); } } $this->_out('>>'); } $this->_out('>>'); } $this->_out('/Group <>'); $nN = $this->n; // TCPDF: rem new "n" $this->n = $cN; // TCPDF: reset to current "n" $p = $this->_getrawstream($p); $this->_out('/Length ' . strlen($p) . ' >>'); $this->_out("stream\n" . $p . "\nendstream"); $this->_out('endobj'); $this->n = $nN; // TCPDF: reset to new "n" } $this->_putimportedobjects(); } /** * Rewritten to handle existing own defined objects */ public function _newobj($obj_id = false, $onlynewobj = false) { if (!$obj_id) { $obj_id = ++$this->n; } //Begin a new object if (!$onlynewobj) { $this->offsets[$obj_id] = $this->bufferlen; $this->_out($obj_id . ' 0 obj'); $this->_current_obj_id = $obj_id; // for later use with encryption } return $obj_id; } /** * Writes a value * Needed to rebuild the source document * * @param mixed $value A PDF-Value. Structure of values see cases in this method */ public function pdf_write_value(&$value) { switch ($value[0]) { case PDF_TYPE_STRING: if ($this->encrypted) { $value[1] = $this->_unescape($value[1]); $value[1] = $this->_encrypt_data($this->_current_obj_id, $value[1]); $value[1] = TCPDF_STATIC::_escape($value[1]); } break; case PDF_TYPE_STREAM: if ($this->encrypted) { $value[2][1] = $this->_encrypt_data($this->_current_obj_id, $value[2][1]); $value[1][1]['/Length'] = array( PDF_TYPE_NUMERIC, strlen($value[2][1]) ); } break; case PDF_TYPE_HEX: if ($this->encrypted) { $value[1] = $this->hex2str($value[1]); $value[1] = $this->_encrypt_data($this->_current_obj_id, $value[1]); // remake hexstring of encrypted string $value[1] = $this->str2hex($value[1]); } break; } switch ($value[0]) { case PDF_TYPE_TOKEN: $this->_straightOut('/' . $value[1] . ' '); break; case PDF_TYPE_NUMERIC: case PDF_TYPE_REAL: if (is_float($value[1]) && $value[1] != 0) { $this->_straightOut(rtrim(rtrim(sprintf('%F', $value[1]), '0'), '.') . ' '); } else { $this->_straightOut($value[1] . ' '); } break; case PDF_TYPE_ARRAY: // An array. Output the proper // structure and move on. $this->_straightOut('['); for ($i = 0; $i < count($value[1]); $i++) { $this->pdf_write_value($value[1][$i]); } $this->_out(']'); break; case PDF_TYPE_DICTIONARY: // A dictionary. $this->_straightOut('<<'); reset($value[1]); foreach ($value[1] as $k => $v) { $this->_straightOut($k . ' '); $this->pdf_write_value($v); } $this->_straightOut('>>'); break; case PDF_TYPE_OBJREF: // An indirect object reference // Fill the object stack if needed $cpfn = & $this->current_parser->uniqueid; if (!isset($this->_don_obj_stack[$cpfn][$value[1]])) { $this->_newobj(false, true); $this->_obj_stack[$cpfn][$value[1]] = array($this->n, $value); $this->_don_obj_stack[$cpfn][$value[1]] = array($this->n, $value); // Value is maybee obsolete!!! } $objid = $this->_don_obj_stack[$cpfn][$value[1]][0]; $this->_out($objid . ' 0 R'); break; case PDF_TYPE_STRING: // A string. $this->_straightOut('(' . $value[1] . ')'); break; case PDF_TYPE_STREAM: // A stream. First, output the // stream dictionary, then the // stream data itself. $this->pdf_write_value($value[1]); $this->_out('stream'); $this->_out($value[2][1]); $this->_out('endstream'); break; case PDF_TYPE_HEX: $this->_straightOut('<' . $value[1] . '>'); break; case PDF_TYPE_BOOLEAN: $this->_straightOut($value[1] ? 'true ' : 'false '); break; case PDF_TYPE_NULL: // The null object. $this->_straightOut('null '); break; } } /** * Modified so not each call will add a newline to the output. */ public function _straightOut($s) { if ($this->state == 2) { if ($this->inxobj) { // we are inside an XObject template $this->xobjects[$this->xobjid]['outdata'] .= $s; } elseif ((!$this->InFooter) and isset($this->footerlen[$this->page]) and ($this->footerlen[$this->page] > 0)) { // puts data before page footer $pagebuff = $this->getPageBuffer($this->page); $page = substr($pagebuff, 0, -$this->footerlen[$this->page]); $footer = substr($pagebuff, -$this->footerlen[$this->page]); $this->setPageBuffer($this->page, $page . $s . $footer); // update footer position $this->footerpos[$this->page] += strlen($s); } else { // set page data $this->setPageBuffer($this->page, $s, true); } } elseif ($this->state > 0) { // set general data $this->setBuffer($s); } } /** * rewritten to close opened parsers * */ public function _enddoc() { parent::_enddoc(); $this->_closeParsers(); } /** * close all files opened by parsers */ public function _closeParsers() { if ($this->state > 2 && is_array($this->parsers) && count($this->parsers) > 0) { $this->cleanUp(); return true; } return false; } /** * Removes cylced references and closes the file handles of the parser objects */ public function cleanUp() { foreach ($this->parsers as $k => $_) { $this->parsers[$k]->cleanUp(); $this->parsers[$k] = null; unset($this->parsers[$k]); } } // Functions from here on are taken from FPDI's fpdi2tcpdf_bridge.php to remove dependence on it public function _putstream($s, $n = 0) { $this->_out($this->_getstream($s, $n)); } public function _getxobjectdict() { $out = parent::_getxobjectdict(); if (count($this->tpls)) { foreach ($this->tpls as $tplidx => $tpl) { $out .= sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n']); } } return $out; } /** * Unescapes a PDF string * * @param string $s * @return string */ public function _unescape($s) { $out = ''; for ($count = 0, $n = strlen($s); $count < $n; $count++) { if ($s[$count] != '\\' || $count == $n - 1) { $out .= $s[$count]; } else { switch ($s[++$count]) { case ')': case '(': case '\\': $out .= $s[$count]; break; case 'f': $out .= chr(0x0C); break; case 'b': $out .= chr(0x08); break; case 't': $out .= chr(0x09); break; case 'r': $out .= chr(0x0D); break; case 'n': $out .= chr(0x0A); break; case "\r": if ($count != $n - 1 && $s[$count + 1] == "\n") { $count++; } break; case "\n": break; default: // Octal-Values if (ord($s[$count]) >= ord('0') && ord($s[$count]) <= ord('9')) { $oct = '' . $s[$count]; if (ord($s[$count + 1]) >= ord('0') && ord($s[$count + 1]) <= ord('9')) { $oct .= $s[++$count]; if (ord($s[$count + 1]) >= ord('0') && ord($s[$count + 1]) <= ord('9')) { $oct .= $s[++$count]; } } $out .= chr(octdec($oct)); } else { $out .= $s[$count]; } } } } return $out; } /** * Hexadecimal to string * * @param string $hex * @return string */ public function hex2str($hex) { return pack('H*', str_replace(array("\r", "\n", ' '), '', $hex)); } /** * String to hexadecimal * * @param string $str * @return string */ public function str2hex($str) { return current(unpack('H*', $str)); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tcpi/tcpdi_parser.php000066400000000000000000001505241511205031700311170ustar00rootroot00000000000000. // // See LICENSE file for more information. // ------------------------------------------------------------------- // // Description : This is a PHP class for parsing PDF documents. // //============================================================+ /** * @file * This is a PHP class for parsing PDF documents.
* @author Paul Nicholls * @author Nicola Asuni * @version 1.1 */ if (!defined('PDF_TYPE_NULL')) { define('PDF_TYPE_NULL', 0); } if (!defined('PDF_TYPE_NUMERIC')) { define('PDF_TYPE_NUMERIC', 1); } if (!defined('PDF_TYPE_TOKEN')) { define('PDF_TYPE_TOKEN', 2); } if (!defined('PDF_TYPE_HEX')) { define('PDF_TYPE_HEX', 3); } if (!defined('PDF_TYPE_STRING')) { define('PDF_TYPE_STRING', 4); } if (!defined('PDF_TYPE_DICTIONARY')) { define('PDF_TYPE_DICTIONARY', 5); } if (!defined('PDF_TYPE_ARRAY')) { define('PDF_TYPE_ARRAY', 6); } if (!defined('PDF_TYPE_OBJDEC')) { define('PDF_TYPE_OBJDEC', 7); } if (!defined('PDF_TYPE_OBJREF')) { define('PDF_TYPE_OBJREF', 8); } if (!defined('PDF_TYPE_OBJECT')) { define('PDF_TYPE_OBJECT', 9); } if (!defined('PDF_TYPE_STREAM')) { define('PDF_TYPE_STREAM', 10); } if (!defined('PDF_TYPE_BOOLEAN')) { define('PDF_TYPE_BOOLEAN', 11); } if (!defined('PDF_TYPE_REAL')) { define('PDF_TYPE_REAL', 12); } /** * @class tcpdi_parser * This is a PHP class for parsing PDF documents.
* Based on TCPDF_PARSER, part of the TCPDF project by Nicola Asuni. * @brief This is a PHP class for parsing PDF documents.. * @version 1.1 * @author Paul Nicholls - github.com/pauln * @author Nicola Asuni - info@tecnick.com */ class tcpdi_parser { /** * Unique parser ID * @public */ public $uniqueid = ''; /** * Raw content of the PDF document. * @private */ private $pdfdata = ''; /** * XREF data. * @protected */ protected $xref = array(); /** * Object streams. * @protected */ protected $objstreams = array(); /** * Objects in objstreams. * @protected */ protected $objstreamobjs = array(); /** * List of seen XREF data locations. * @protected */ protected $xref_seen_offsets = array(); /** * Array of PDF objects. * @protected */ protected $objects = array(); /** * Array of object offsets. * @private */ private $objoffsets = array(); /** * Class object for decoding filters. * @private */ private $FilterDecoders; /** * Pages * * @private array */ private $pages; /** * Page count * @private integer */ private $page_count; /** * actual page number * @private integer */ private $pageno; /** * PDF version of the loaded document * @private string */ private $pdfVersion; /** * Available BoxTypes * * @public array */ public $availableBoxes = array('/MediaBox', '/CropBox', '/BleedBox', '/TrimBox', '/ArtBox'); // ----------------------------------------------------------------------------- /** * Parse a PDF document an return an array of objects. * @param $data (string) PDF data to parse. * @public * @since 1.0.000 (2011-05-24) */ public function __construct($data, $uniqueid) { if (empty($data)) { $this->Error('Empty PDF data.'); } $this->uniqueid = $uniqueid; $this->pdfdata = $data; // get length $pdflen = strlen($this->pdfdata); // initialize class for decoding filters $this->FilterDecoders = new TCPDF_FILTERS(); // get xref and trailer data $this->xref = $this->getXrefData(); $this->findObjectOffsets(); // parse all document objects $this->objects = array(); /*foreach ($this->xref['xref'] as $obj => $offset) { if (!isset($this->objects[$obj]) AND ($offset > 0)) { // decode only objects with positive offset //$this->objects[$obj] = $this->getIndirectObject($obj, $offset, true); } }*/ $this->getPDFVersion(); $this->readPages(); } /** * Clean up when done, to free memory etc */ public function cleanUp() { unset($this->pdfdata); $this->pdfdata = ''; unset($this->objstreams); $this->objstreams = array(); unset($this->objects); $this->objects = array(); unset($this->objstreamobjs); $this->objstreamobjs = array(); unset($this->xref); $this->xref = array(); unset($this->objoffsets); $this->objoffsets = array(); unset($this->pages); $this->pages = array(); } /** * Return an array of parsed PDF document objects. * @return (array) Array of parsed PDF document objects. * @public * @since 1.0.000 (2011-06-26) */ public function getParsedData() { return array($this->xref, $this->objects, $this->pages); } /** * Get PDF-Version * * And reset the PDF Version used in FPDI if needed * @public */ public function getPDFVersion() { preg_match('/\d\.\d/', substr($this->pdfdata, 0, 16), $m); if (isset($m[0])) { $this->pdfVersion = $m[0]; } return $this->pdfVersion; } /** * Read all /Page(es) * */ public function readPages() { $params = $this->getObjectVal($this->xref['trailer'][1]['/Root']); $objref = null; foreach ($params[1][1] as $k => $v) { if ($k == '/Pages') { $objref = $v; break; } } if ($objref == null || $objref[0] !== PDF_TYPE_OBJREF) { // Offset not found. return; } $dict = $this->getObjectVal($objref); if ($dict[0] == PDF_TYPE_OBJECT && $dict[1][0] == PDF_TYPE_DICTIONARY) { // Dict wrapped in an object $dict = $dict[1]; } if ($dict[0] !== PDF_TYPE_DICTIONARY) { return; } $this->pages = array(); if (isset($dict[1]['/Kids'])) { $v = $dict[1]['/Kids']; if ($v[0] == PDF_TYPE_ARRAY) { foreach ($v[1] as $ref) { $page = $this->getObjectVal($ref); $this->readPage($page); } } } $this->page_count = count($this->pages); } /** * Read a single /Page element, recursing through /Kids if necessary * */ private function readPage($page) { if (isset($page[1][1]['/Kids'])) { // Nested pages! foreach ($page[1][1]['/Kids'][1] as $subref) { $subpage = $this->getObjectVal($subref); $this->readPage($subpage); } } else { $this->pages[] = $page; } } /** * Get pagecount from sourcefile * * @return int */ public function getPageCount() { return $this->page_count; } /** * Get Cross-Reference (xref) table and trailer data from PDF document data. * @param $offset (int) xref offset (if know). * @param $xref (array) previous xref array (if any). * @return Array containing xref and trailer data. * @protected * @since 1.0.000 (2011-05-24) */ protected function getXrefData($offset = 0, $xref = array()) { if ($offset == 0) { // find last startxref if (preg_match('/.*[\r\n]startxref[\s\r\n]+([0-9]+)[\s\r\n]+%%EOF/is', $this->pdfdata, $matches) == 0) { $this->Error('Unable to find startxref'); } $startxref = $matches[1]; } else { if (preg_match('/([0-9]+[\s][0-9]+[\s]obj)/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { // Cross-Reference Stream object $startxref = $offset; } elseif (preg_match('/[\r\n]startxref[\s\r\n]+([0-9]+)[\s\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { // startxref found $startxref = $matches[1][0]; } else { $this->Error('Unable to find startxref'); } } unset($matches); // DOMPDF gets the startxref wrong, giving us the linebreak before the xref starts. $startxref += strspn($this->pdfdata, "\r\n", $startxref); // check xref position if (strpos($this->pdfdata, 'xref', $startxref) == $startxref) { // Cross-Reference $xref = $this->decodeXref($startxref, $xref); } else { // Cross-Reference Stream $xref = $this->decodeXrefStream($startxref, $xref); } if (empty($xref)) { $this->Error('Unable to find xref'); } return $xref; } /** * Decode the Cross-Reference section * @param $startxref (int) Offset at which the xref section starts. * @param $xref (array) Previous xref array (if any). * @return Array containing xref and trailer data. * @protected * @since 1.0.000 (2011-06-20) */ protected function decodeXref($startxref, $xref = array()) { $this->xref_seen_offsets[] = $startxref; if (!isset($xref['xref_location'])) { $xref['xref_location'] = $startxref; $xref['max_object'] = 0; } // extract xref data (object indexes and offsets) $xoffset = $startxref + 5; // initialize object number $obj_num = 0; $offset = $xoffset; while (preg_match('/^([0-9]+)[\s]([0-9]+)[\s]?([nf]?)/im', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { $offset = (strlen($matches[0][0]) + $matches[0][1]); if ($matches[3][0] == 'n') { // create unique object index: [object number]_[generation number] $gen_num = intval($matches[2][0]); $index = $obj_num . '_' . $gen_num; // check if object already exist if (!isset($xref['xref'][$obj_num][$gen_num])) { // store object offset position $xref['xref'][$obj_num][$gen_num] = intval($matches[1][0]); } ++$obj_num; $offset += 2; } elseif ($matches[3][0] == 'f') { ++$obj_num; $offset += 2; } else { // object number (index) $obj_num = intval($matches[1][0]); } } unset($matches); $xref['max_object'] = max($xref['max_object'], $obj_num); // get trailer data if (preg_match('/trailer[\s]*<<(.*)>>[\s\r\n]+(?:[%].*[\r\n]+)*startxref[\s\r\n]+/isU', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $xoffset) > 0) { $trailer_data = $matches[1][0]; if (!isset($xref['trailer']) or empty($xref['trailer'])) { // get only the last updated version $xref['trailer'] = array(); $xref['trailer'][0] = PDF_TYPE_DICTIONARY; $xref['trailer'][1] = array(); // parse trailer_data if (preg_match('/Size[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { $xref['trailer'][1]['/Size'] = array(PDF_TYPE_NUMERIC, intval($matches[1])); } if (preg_match('/Root[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { $xref['trailer'][1]['/Root'] = array(PDF_TYPE_OBJREF, intval($matches[1]), intval($matches[2])); } if (preg_match('/Encrypt[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { $xref['trailer'][1]['/Encrypt'] = array(PDF_TYPE_OBJREF, intval($matches[1]), intval($matches[2])); } if (preg_match('/Info[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { $xref['trailer'][1]['/Info'] = array(PDF_TYPE_OBJREF, intval($matches[1]), intval($matches[2])); } if (preg_match('/ID[\s]*[\[][\s]*[<]([^>]*)[>][\s]*[<]([^>]*)[>]/i', $trailer_data, $matches) > 0) { $xref['trailer'][1]['/ID'] = array(PDF_TYPE_ARRAY, array()); $xref['trailer'][1]['/ID'][1][0] = array(PDF_TYPE_HEX, $matches[1]); $xref['trailer'][1]['/ID'][1][1] = array(PDF_TYPE_HEX, $matches[2]); } } if (preg_match('/Prev[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { // get previous xref $prevoffset = intval($matches[1]); if (!in_array($prevoffset, $this->xref_seen_offsets)) { $this->xref_seen_offsets[] = $prevoffset; $xref = $this->getXrefData($prevoffset, $xref); } } unset($matches); } else { $this->Error('Unable to find trailer'); } return $xref; } /** * Decode the Cross-Reference Stream section * @param $startxref (int) Offset at which the xref section starts. * @param $xref (array) Previous xref array (if any). * @return Array containing xref and trailer data. * @protected * @since 1.0.003 (2013-03-16) */ protected function decodeXrefStream($startxref, $xref = array()) { // try to read Cross-Reference Stream list($xrefobj, $unused) = $this->getRawObject($startxref); $xrefcrs = $this->getIndirectObject($xrefobj[1], $startxref, true); if (!isset($xref['xref_location'])) { $xref['xref_location'] = $startxref; $xref['max_object'] = 0; } if (!isset($xref['xref'])) { $xref['xref'] = array(); } if (!isset($xref['trailer']) or empty($xref['trailer'])) { // get only the last updated version $xref['trailer'] = array(); $xref['trailer'][0] = PDF_TYPE_DICTIONARY; $xref['trailer'][1] = array(); $filltrailer = true; } else { $filltrailer = false; } $valid_crs = false; $sarr = $xrefcrs[0][1]; $keys = array_keys($sarr); $columns = 1; // Default as per PDF 32000-1:2008. $predictor = 1; // Default as per PDF 32000-1:2008. foreach ($keys as $k => $key) { $v = $sarr[$key]; if (($key == '/Type') and ($v[0] == PDF_TYPE_TOKEN and ($v[1] == 'XRef'))) { $valid_crs = true; } elseif (($key == '/Index') and ($v[0] == PDF_TYPE_ARRAY and count($v[1]) >= 2)) { // first object number in the subsection $index_first = intval($v[1][0][1]); // number of entries in the subsection $index_entries = intval($v[1][1][1]); } elseif (($key == '/Prev') and ($v[0] == PDF_TYPE_NUMERIC)) { // get previous xref offset $prevxref = intval($v[1]); } elseif (($key == '/W') and ($v[0] == PDF_TYPE_ARRAY)) { // number of bytes (in the decoded stream) of the corresponding field $wb = array(); $wb[0] = intval($v[1][0][1]); $wb[1] = intval($v[1][1][1]); $wb[2] = intval($v[1][2][1]); } elseif (($key == '/DecodeParms') and ($v[0] == PDF_TYPE_DICTIONARY)) { $decpar = $v[1]; foreach ($decpar as $kdc => $vdc) { if (($kdc == '/Columns') and ($vdc[0] == PDF_TYPE_NUMERIC)) { $columns = intval($vdc[1]); } elseif (($kdc == '/Predictor') and ($vdc[0] == PDF_TYPE_NUMERIC)) { $predictor = intval($vdc[1]); } } } elseif ($filltrailer) { switch ($key) { case '/Size': case '/Root': case '/Info': case '/ID': $xref['trailer'][1][$key] = $v; break; default: break; } } } // decode data $obj_num = 0; if ($valid_crs and isset($xrefcrs[1][3][0])) { // number of bytes in a row $rowlen = ($columns + 1); // convert the stream into an array of integers $sdata = unpack('C*', $xrefcrs[1][3][0]); // split the rows $sdata = array_chunk($sdata, $rowlen); // initialize decoded array $ddata = array(); // initialize first row with zeros $prev_row = array_fill(0, $rowlen, 0); // for each row apply PNG unpredictor foreach ($sdata as $k => $row) { // initialize new row $ddata[$k] = array(); // get PNG predictor value if (empty($predictor)) { $predictor = (10 + $row[0]); } // for each byte on the row for ($i = 1; $i <= $columns; ++$i) { if (!isset($row[$i])) { // No more data in this row - we're done here. break; } // new index $j = ($i - 1); $row_up = $prev_row[$j]; if ($i == 1) { $row_left = 0; $row_upleft = 0; } else { $row_left = $row[($i - 1)]; $row_upleft = $prev_row[($j - 1)]; } switch ($predictor) { case 1: // No prediction (equivalent to PNG None) case 10: { // PNG prediction (on encoding, PNG None on all rows) $ddata[$k][$j] = $row[$i]; break; } case 11: { // PNG prediction (on encoding, PNG Sub on all rows) $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); break; } case 12: { // PNG prediction (on encoding, PNG Up on all rows) $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); break; } case 13: { // PNG prediction (on encoding, PNG Average on all rows) $ddata[$k][$j] = (($row[$i] + (($row_left + $row_up) / 2)) & 0xff); break; } case 14: { // PNG prediction (on encoding, PNG Paeth on all rows) // initial estimate $p = ($row_left + $row_up - $row_upleft); // distances $pa = abs($p - $row_left); $pb = abs($p - $row_up); $pc = abs($p - $row_upleft); $pmin = min($pa, $pb, $pc); // return minumum distance switch ($pmin) { case $pa: { $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); break; } case $pb: { $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); break; } case $pc: { $ddata[$k][$j] = (($row[$i] + $row_upleft) & 0xff); break; } } break; } default: { // PNG prediction (on encoding, PNG optimum) $this->Error("Unknown PNG predictor $predictor"); break; } } } $prev_row = $ddata[$k]; } // end for each row // complete decoding unset($sdata); $sdata = array(); // for every row foreach ($ddata as $k => $row) { // initialize new row $sdata[$k] = array(0, 0, 0); if ($wb[0] == 0) { // default type field $sdata[$k][0] = 1; } $i = 0; // count bytes on the row // for every column for ($c = 0; $c < 3; ++$c) { // for every byte on the column for ($b = 0; $b < $wb[$c]; ++$b) { if (isset($row[$i])) { $sdata[$k][$c] += ($row[$i] << (($wb[$c] - 1 - $b) * 8)); } ++$i; } } } unset($ddata); // fill xref if (isset($index_first)) { $obj_num = $index_first; } else { $obj_num = 0; } foreach ($sdata as $k => $row) { switch ($row[0]) { case 0: { // (f) linked list of free objects ++$obj_num; break; } case 1: { // (n) objects that are in use but are not compressed // create unique object index: [object number]_[generation number] $index = $obj_num . '_' . $row[2]; // check if object already exist if (!isset($xref['xref'][$obj_num][$row[2]])) { // store object offset position $xref['xref'][$obj_num][$row[2]] = $row[1]; } ++$obj_num; break; } case 2: { // compressed objects // $row[1] = object number of the object stream in which this object is stored // $row[2] = index of this object within the object stream /*$index = $row[1].'_0_'.$row[2]; $xref['xref'][$row[1]][0][$row[2]] = -1;*/ break; } default: { // null objects break; } } } } // end decoding data $xref['max_object'] = max($xref['max_object'], $obj_num); if (isset($prevxref)) { // get previous xref $xref = $this->getXrefData($prevxref, $xref); } return $xref; } /** * Get raw stream data * @param $offset (int) Stream offset. * @param $length (int) Stream length. * @return string Steam content * @protected */ protected function getRawStream($offset, $length) { $offset += strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $offset); $offset += 6; // "stream" $offset += strspn($this->pdfdata, "\x20", $offset); $offset += strspn($this->pdfdata, "\r\n", $offset); $obj = array(); $obj[] = PDF_TYPE_STREAM; $obj[] = substr($this->pdfdata, $offset, $length); return array($obj, $offset + $length); } /** * Get object type, raw value and offset to next object * @param $offset (int) Object offset. * @return array containing object type, raw value and offset to next object * @protected * @since 1.0.000 (2011-06-20) */ protected function getRawObject($offset = 0, $data = null) { if ($data == null) { $data = & $this->pdfdata; } $objtype = ''; // object type to be returned $objval = ''; // object value to be returned // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) while (strspn($data[$offset], "\x00\x09\x0a\x0c\x0d\x20") == 1) { $offset++; } // get first char $char = $data[$offset]; // get object type switch ($char) { case '%': { // \x25 PERCENT SIGN // skip comment and search for next token $next = strcspn($data, "\r\n", $offset); if ($next > 0) { $offset += $next; list($obj, $unused) = $this->getRawObject($offset, $data); return $obj; } break; } case '/': { // \x2F SOLIDUS // name object $objtype = PDF_TYPE_TOKEN; ++$offset; $length = strcspn($data, "\x00\x09\x0a\x0c\x0d\x20\x28\x29\x3c\x3e\x5b\x5d\x7b\x7d\x2f\x25", $offset); $objval = substr($data, $offset, $length); $offset += $length; break; } case '(': // \x28 LEFT PARENTHESIS case ')': { // \x29 RIGHT PARENTHESIS // literal string object $objtype = PDF_TYPE_STRING; ++$offset; $strpos = $offset; if ($char == '(') { $open_bracket = 1; while ($open_bracket > 0) { if (!isset($data[$strpos])) { break; } $ch = $data[$strpos]; switch ($ch) { case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) // skip next character ++$strpos; break; } case '(': { // LEFT PARENHESIS (28h) ++$open_bracket; break; } case ')': { // RIGHT PARENTHESIS (29h) --$open_bracket; break; } } ++$strpos; } $objval = substr($data, $offset, ($strpos - $offset - 1)); $offset = $strpos; } break; } case '[': // \x5B LEFT SQUARE BRACKET case ']': { // \x5D RIGHT SQUARE BRACKET // array object $objtype = PDF_TYPE_ARRAY; ++$offset; if ($char == '[') { // get array content $objval = array(); do { // get element list($element, $offset) = $this->getRawObject($offset, $data); $objval[] = $element; } while ($element[0] !== ']'); // remove closing delimiter array_pop($objval); } else { $objtype = ']'; } break; } case '<': // \x3C LESS-THAN SIGN case '>': { // \x3E GREATER-THAN SIGN if (isset($data[($offset + 1)]) and ($data[($offset + 1)] == $char)) { // dictionary object $objtype = PDF_TYPE_DICTIONARY; if ($char == '<') { list($objval, $offset) = $this->getDictValue($offset, $data); } else { $objtype = '>>'; $offset += 2; } } else { // hexadecimal string object $objtype = PDF_TYPE_HEX; ++$offset; // The "Panose" entry in the FontDescriptor Style dict seems to have hex bytes separated by spaces. if (($char == '<') and (preg_match('/^([0-9A-Fa-f ]+)[>]/iU', substr($data, $offset), $matches) == 1)) { $objval = $matches[1]; $offset += strlen($matches[0]); unset($matches); } } break; } default: { $frag = $data[$offset] . @$data[$offset + 1] . @$data[$offset + 2] . @$data[$offset + 3]; switch ($frag) { case 'endo': // indirect object $objtype = 'endobj'; $offset += 6; break; case 'stre': // Streams should always be indirect objects, and thus processed by getRawStream(). // If we get here, treat it as a null object as something has gone wrong. case 'null': // null object $objtype = PDF_TYPE_NULL; $offset += 4; $objval = 'null'; break; case 'true': // boolean true object $objtype = PDF_TYPE_BOOLEAN; $offset += 4; $objval = true; break; case 'fals': // boolean false object $objtype = PDF_TYPE_BOOLEAN; $offset += 5; $objval = false; break; case 'ends': // end stream object $objtype = 'endstream'; $offset += 9; break; default: if (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+([Robj]{1,3})/i', substr($data, $offset, 33), $matches) == 1) { if ($matches[3] == 'R') { // indirect object reference $objtype = PDF_TYPE_OBJREF; $offset += strlen($matches[0]); $objval = array(intval($matches[1]), intval($matches[2])); } elseif ($matches[3] == 'obj') { // object start $objtype = PDF_TYPE_OBJECT; $objval = intval($matches[1]) . '_' . intval($matches[2]); $offset += strlen($matches[0]); } } elseif (($numlen = strspn($data, '+-.0123456789', $offset)) > 0) { // numeric object $objval = substr($data, $offset, $numlen); $objtype = (intval($objval) != $objval) ? PDF_TYPE_REAL : PDF_TYPE_NUMERIC; $offset += $numlen; } unset($matches); break; } break; } } $obj = array(); $obj[] = $objtype; if ($objtype == PDF_TYPE_OBJREF && is_array($objval)) { foreach ($objval as $val) { $obj[] = $val; } } else { $obj[] = $objval; } return array($obj, $offset); } private function getDictValue($offset, &$data) { $objval = array(); // Extract dict from data. $i = 1; $dict = ''; $offset += 2; do { if ($data[$offset] == '>' && $data[$offset + 1] == '>') { $i--; $dict .= '>>'; $offset += 2; } elseif ($data[$offset] == '<' && $data[$offset + 1] == '<') { $i++; $dict .= '<<'; $offset += 2; } else { $dict .= $data[$offset]; $offset++; } } while ($i > 0); // Now that we have just the dict, parse it. $dictoffset = 0; do { // Get dict element. list($key, $eloffset) = $this->getRawObject($dictoffset, $dict); if ($key[0] == '>>') { break; } list($element, $dictoffset) = $this->getRawObject($eloffset, $dict); $objval['/' . $key[1]] = $element; unset($key); unset($element); } while (true); return array($objval, $offset); } /** * Get content of indirect object. * @param $obj_ref (string) Object number and generation number separated by underscore character. * @param $offset (int) Object offset. * @param $decoding (boolean) If true decode streams. * @return array containing object data. * @protected * @since 1.0.000 (2011-05-24) */ protected function getIndirectObject($obj_ref, $offset = 0, $decoding = true) { $obj = explode('_', $obj_ref); if (($obj === false) or (count($obj) != 2)) { $this->Error('Invalid object reference: ' . $obj); return; } $objref = $obj[0] . ' ' . $obj[1] . ' obj'; if (strpos($this->pdfdata, $objref, $offset) != $offset) { // an indirect reference to an undefined object shall be considered a reference to the null object return array('null', 'null', $offset); } // starting position of object content $offset += strlen($objref); // get array of object content $objdata = array(); $i = 0; // object main index do { if (($i > 0) and (isset($objdata[($i - 1)][0])) and ($objdata[($i - 1)][0] == PDF_TYPE_DICTIONARY) and array_key_exists('/Length', $objdata[($i - 1)][1])) { // Stream - get using /Length in stream's dict $lengthobj = $objdata[($i - 1)][1]['/Length']; if ($lengthobj[0] === PDF_TYPE_OBJREF) { $lengthobj = $this->getObjectVal($lengthobj); if ($lengthobj[0] === PDF_TYPE_OBJECT) { $lengthobj = $lengthobj[1]; } } $streamlength = $lengthobj[1]; list($element, $offset) = $this->getRawStream($offset, $streamlength); } else { // get element list($element, $offset) = $this->getRawObject($offset); } // decode stream using stream's dictionary information if ($decoding and ($element[0] == PDF_TYPE_STREAM) and (isset($objdata[($i - 1)][0])) and ($objdata[($i - 1)][0] == PDF_TYPE_DICTIONARY)) { $element[3] = $this->decodeStream($objdata[($i - 1)][1], $element[1]); } $objdata[$i] = $element; ++$i; } while ($element[0] != 'endobj'); // remove closing delimiter array_pop($objdata); // return raw object content return $objdata; } /** * Get the content of object, resolving indect object reference if necessary. * @param $obj (string) Object value. * @return array containing object data. * @public * @since 1.0.000 (2011-06-26) */ public function getObjectVal($obj) { if ($obj[0] == PDF_TYPE_OBJREF) { if (strpos($obj[1], '_') !== false) { $key = explode('_', $obj[1]); } else { $key = array($obj[1], $obj[2]); } $ret = array(0 => PDF_TYPE_OBJECT, 'obj' => $key[0], 'gen' => $key[1]); // reference to indirect object $object = null; if (isset($this->objects[$key[0]][$key[1]])) { // this object has been already parsed $object = $this->objects[$key[0]][$key[1]]; } elseif (($offset = $this->findObjectOffset($key)) !== false) { // parse new object $this->objects[$key[0]][$key[1]] = $this->getIndirectObject($key[0] . '_' . $key[1], $offset, false); $object = $this->objects[$key[0]][$key[1]]; } elseif (($key[1] == 0) && isset($this->objstreamobjs[$key[0]])) { // Object is in an object stream $streaminfo = $this->objstreamobjs[$key[0]]; $objs = $streaminfo[0]; if (!isset($this->objstreams[$objs[0]][$objs[1]])) { // Fetch and decode object stream $offset = $this->findObjectOffset($objs); ; $objstream = $this->getObjectVal(array(PDF_TYPE_OBJREF, $objs[0], $objs[1])); $decoded = $this->decodeStream($objstream[1][1], $objstream[2][1]); $this->objstreams[$objs[0]][$objs[1]] = $decoded[0]; // Store just the data, in case we need more from this objstream // Free memory unset($objstream); unset($decoded); } $this->objects[$key[0]][$key[1]] = $this->getRawObject($streaminfo[1], $this->objstreams[$objs[0]][$objs[1]]); $object = $this->objects[$key[0]][$key[1]]; } if (!is_null($object)) { $ret[1] = $object[0]; if (isset($object[1][0]) && $object[1][0] == PDF_TYPE_STREAM) { $ret[0] = PDF_TYPE_STREAM; $ret[2] = $object[1]; } return $ret; } } return $obj; } /** * Extract object stream to find out what it contains. * */ public function extractObjectStream($key) { $objref = array(PDF_TYPE_OBJREF, $key[0], $key[1]); $obj = $this->getObjectVal($objref); if ($obj[0] !== PDF_TYPE_STREAM || !isset($obj[1][1]['/First'][1])) { // Not a valid object stream dictionary - skip it. return; } $stream = $this->decodeStream($obj[1][1], $obj[2][1]);// Decode object stream, as we need the first bit $first = intval($obj[1][1]['/First'][1]); $ints = preg_split('/\s/', substr($stream[0], 0, $first)); // Get list of object / offset pairs for ($j = 1; $j < count($ints); $j++) { if (($j % 2) == 1) { $this->objstreamobjs[$ints[$j - 1]] = array($key, $ints[$j] + $first); } } // Free memory - we may not need this at all. unset($obj); unset($stream); } /** * Find all object offsets. Saves having to scour the file multiple times. * @private */ private function findObjectOffsets() { $this->objoffsets = array(); if (preg_match_all('/(*ANYCRLF)^[\s]*([0-9]+)[\s]+([0-9]+)[\s]+obj/im', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE) >= 1) { $i = 0; $laststreamend = 0; foreach ($matches[0] as $match) { $offset = $match[1] + strspn($match[0], "\x00\x09\x0a\x0c\x0d\x20"); if ($offset < $laststreamend) { // Contained within another stream, skip it. continue; } $this->objoffsets[trim($match[0])] = $offset; $dictoffset = $match[1] + strlen($match[0]); $dictfrag = substr($this->pdfdata, $dictoffset, 256); if (preg_match('|^\s+<<[^>]+/Length\s+(\d+)|', $dictfrag, $lengthmatch, PREG_OFFSET_CAPTURE) == 1) { $laststreamend += intval($lengthmatch[1][0]); } if (preg_match('|^\s+<<[^>]+/ObjStm|', $dictfrag, $objstm) == 1) { $this->extractObjectStream(array($matches[1][$i][0], $matches[2][$i][0])); } $i++; } } unset($lengthmatch); unset($dictfrag); unset($matches); } /** * Get offset of an object. Checks xref first, then offsets found by scouring the file. * @param $key (array) Object key to find (obj, gen). * @return int Offset of the object in $this->pdfdata. * @private */ private function findObjectOffset($key) { $objref = $key[0] . ' ' . $key[1] . ' obj'; if (isset($this->xref['xref'][$key[0]][$key[1]])) { $offset = $this->xref['xref'][$key[0]][$key[1]]; if (strpos($this->pdfdata, $objref, $offset) === $offset) { // Offset is in xref table and matches actual position in file //echo "Offset in XREF is correct, returning
"; return $this->xref['xref'][$key[0]][$key[1]]; } } if (array_key_exists($objref, $this->objoffsets)) { //echo "Offset found in internal reftable
"; return $this->objoffsets[$objref]; } return false; } /** * Decode the specified stream. * @param $sdic (array) Stream's dictionary array. * @param $stream (string) Stream to decode. * @return array containing decoded stream data and remaining filters. * @protected * @since 1.0.000 (2011-06-22) */ protected function decodeStream($sdic, $stream) { // get stream lenght and filters $slength = strlen($stream); if ($slength <= 0) { return array('', array()); } $filters = array(); foreach ($sdic as $k => $v) { if ($v[0] == PDF_TYPE_TOKEN) { if (($k == '/Length') and ($v[0] == PDF_TYPE_NUMERIC)) { // get declared stream lenght $declength = intval($v[1]); if ($declength < $slength) { $stream = substr($stream, 0, $declength); $slength = $declength; } } elseif ($k == '/Filter') { if ($v[0] == PDF_TYPE_TOKEN) { // single filter $filters[] = $v[1]; } elseif ($v[0] == PDF_TYPE_ARRAY) { // array of filters foreach ($v[1] as $flt) { if ($flt[0] == PDF_TYPE_TOKEN) { $filters[] = $flt[1]; } } } } } } // decode the stream $remaining_filters = array(); foreach ($filters as $filter) { if (in_array($filter, $this->FilterDecoders->getAvailableFilters())) { $stream = $this->FilterDecoders->decodeFilter($filter, $stream); } else { // add missing filter to array $remaining_filters[] = $filter; } } return array($stream, $remaining_filters); } /** * Set pageno * * @param int $pageno Pagenumber to use */ public function setPageno($pageno) { $pageno = ((int) $pageno) - 1; if ($pageno < 0 || $pageno >= $this->getPageCount()) { $this->error("Pagenumber is wrong! (Requested $pageno, max " . $this->getPageCount() . ")"); } $this->pageno = $pageno; } /** * Get page-resources from current page * * @return array */ public function getPageResources() { return $this->_getPageResources($this->pages[$this->pageno]); } /** * Get page-resources from /Page * * @param array $obj Array of pdf-data */ private function _getPageResources($obj) // $obj = /Page { $obj = $this->getObjectVal($obj); // If the current object has a resources // dictionary associated with it, we use // it. Otherwise, we move back to its // parent object. if (isset($obj[1][1]['/Resources'])) { $res = $obj[1][1]['/Resources']; if ($res[0] == PDF_TYPE_OBJECT) { return $res[1]; } return $res; } else { if (!isset($obj[1][1]['/Parent'])) { return false; } else { $res = $this->_getPageResources($obj[1][1]['/Parent']); if ($res[0] == PDF_TYPE_OBJECT) { return $res[1]; } return $res; } } } /** * Get annotations from current page * * @return array */ public function getPageAnnotations() { return $this->_getPageAnnotations($this->pages[$this->pageno]); } /** * Get annotations from /Page * * @param array $obj Array of pdf-data */ private function _getPageAnnotations($obj) // $obj = /Page { $obj = $this->getObjectVal($obj); // If the current object has an annotations // dictionary associated with it, we use // it. Otherwise, we move back to its // parent object. if (isset($obj[1][1]['/Annots'])) { $annots = $obj[1][1]['/Annots']; } else { if (!isset($obj[1][1]['/Parent'])) { return false; } else { $annots = $this->_getPageAnnotations($obj[1][1]['/Parent']); } } if ($annots[0] == PDF_TYPE_OBJREF) { return $this->getObjectVal($annots); } return $annots; } /** * Get content of current page * * If more /Contents is an array, the streams are concated * * @return string */ public function getContent() { $buffer = ''; if (isset($this->pages[$this->pageno][1][1]['/Contents'])) { $contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']); foreach ($contents as $tmp_content) { $buffer .= $this->_rebuildContentStream($tmp_content) . ' '; } } return $buffer; } /** * Resolve all content-objects * * @param array $content_ref * @return array */ private function _getPageContent($content_ref) { $contents = array(); if ($content_ref[0] == PDF_TYPE_OBJREF) { $content = $this->getObjectVal($content_ref); if ($content[1][0] == PDF_TYPE_ARRAY) { $contents = $this->_getPageContent($content[1]); } else { $contents[] = $content; } } elseif ($content_ref[0] == PDF_TYPE_ARRAY) { foreach ($content_ref[1] as $tmp_content_ref) { $contents = array_merge($contents, $this->_getPageContent($tmp_content_ref)); } } return $contents; } /** * Rebuild content-streams * * @param array $obj * @return string */ private function _rebuildContentStream($obj) { $filters = array(); if (isset($obj[1][1]['/Filter'])) { $_filter = $obj[1][1]['/Filter']; if ($_filter[0] == PDF_TYPE_OBJREF) { $tmpFilter = $this->getObjectVal($_filter); $_filter = $tmpFilter[1]; } if ($_filter[0] == PDF_TYPE_TOKEN) { $filters[] = $_filter; } elseif ($_filter[0] == PDF_TYPE_ARRAY) { $filters = $_filter[1]; } } $stream = $obj[2][1]; foreach ($filters as $_filter) { $stream = $this->FilterDecoders->decodeFilter($_filter[1], $stream); } return $stream; } /** * Get a Box from a page * Arrayformat is same as used by fpdf_tpl * * @param array $page a /Page * @param string $box_index Type of Box @see $availableBoxes * @param float Scale factor from user space units to points * @return array */ public function getPageBox($page, $box_index, $k) { $page = $this->getObjectVal($page); $box = null; if (isset($page[1][1][$box_index])) { $box = & $page[1][1][$box_index]; } if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) { $tmp_box = $this->getObjectVal($box); $box = $tmp_box[1]; } if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) { $b = & $box[1]; return array('x' => $b[0][1] / $k, 'y' => $b[1][1] / $k, 'w' => abs($b[0][1] - $b[2][1]) / $k, 'h' => abs($b[1][1] - $b[3][1]) / $k, 'llx' => min($b[0][1], $b[2][1]) / $k, 'lly' => min($b[1][1], $b[3][1]) / $k, 'urx' => max($b[0][1], $b[2][1]) / $k, 'ury' => max($b[1][1], $b[3][1]) / $k, ); } elseif (!isset($page[1][1]['/Parent'])) { return false; } else { return $this->getPageBox($this->getObjectVal($page[1][1]['/Parent']), $box_index, $k); } } /** * Get all page boxes by page no * * @param int The page number * @param float Scale factor from user space units to points * @return array */ public function getPageBoxes($pageno, $k) { return $this->_getPageBoxes($this->pages[$pageno - 1], $k); } /** * Get all boxes from /Page * * @param array a /Page * @return array */ private function _getPageBoxes($page, $k) { $boxes = array(); foreach ($this->availableBoxes as $box) { if ($_box = $this->getPageBox($page, $box, $k)) { $boxes[$box] = $_box; } } return $boxes; } /** * Get the page rotation by pageno * * @param integer $pageno * @return array */ public function getPageRotation($pageno) { return $this->_getPageRotation($this->pages[$pageno - 1]); } private function _getPageRotation($obj) // $obj = /Page { $obj = $this->getObjectVal($obj); if (isset($obj[1][1]['/Rotate'])) { $res = $this->getObjectVal($obj[1][1]['/Rotate']); if ($res[0] == PDF_TYPE_OBJECT) { return $res[1]; } return $res; } else { if (!isset($obj[1][1]['/Parent'])) { return false; } else { $res = $this->_getPageRotation($obj[1][1]['/Parent']); if (is_array($res) && $res[0] == PDF_TYPE_OBJECT) { return $res[1]; } return $res; } } } /** * This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. * @param $msg (string) The error message * @public * @since 1.0.000 (2011-05-23) */ public function Error($msg) { // exit program and print error die("TCPDI_PARSER ERROR [{$this->uniqueid}]: " . $msg); } } // END OF TCPDF_PARSER CLASS icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/000077500000000000000000000000001511205031700261235ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/PdfMergeTest.php000066400000000000000000000063231511205031700311710ustar00rootroot00000000000000pdfMerge = new PdfMerge(); $this->dummyFile = __DIR__ . '/files/dummy.pdf'; $this->outputFile = __DIR__ . '/output.pdf'; }); it('returns PDF instance', function () { expect($this->pdfMerge)->getPdf()->toBeInstanceOf(TCPDI::class); }); it('throws exception when trying to add not existing page', function () { ($this->pdfMerge)->add('/foo.pdf'); })->throws(FileNotFoundException::class); it('checks if file was already added', function () { expect($this->pdfMerge)->contains($this->dummyFile)->toBeFalse(); $this->pdfMerge->add($this->dummyFile); expect($this->pdfMerge)->contains($this->dummyFile)->toBeTrue(); }); it('resets files to merge', function () { $this->pdfMerge->add($this->dummyFile); $this->pdfMerge->reset(); expect($this->pdfMerge)->contains($this->dummyFile)->toBeFalse(); }); it('generates merged file', function () { $this->pdfMerge->add($this->dummyFile); $this->pdfMerge->add($this->dummyFile); expect($this->pdfMerge)->merge($this->outputFile)->toBeEmptyString(); expect($this->outputFile)->toEqualPDF(__DIR__ . '/files/expected/output.pdf'); }); it('merges portrait and landscape files', function () { $this->pdfMerge->add($this->dummyFile); $this->pdfMerge->add(__DIR__ . '/files/dummy_landscape.pdf'); expect($this->pdfMerge)->merge($this->outputFile)->toBeEmptyString(); expect($this->outputFile)->toEqualPDF(__DIR__ . '/files/expected/output_mixed_orientation.pdf'); }); it('adds header to merged PDF', function () { copy(__DIR__ . '/files/header_logo.jpg', K_PATH_IMAGES . 'header_logo.png'); $pdfMerge = new PdfMerge(new HeaderConfig(imagePath: 'header_logo.png', logoWidthMM: 20, title: 'Test')); $pdfMerge->add($this->dummyFile); $pdfMerge->add($this->dummyFile); expect($pdfMerge)->merge($this->outputFile)->toBeEmptyString(); expect($this->outputFile)->toEqualPDF(__DIR__ . '/files/expected/output_with_header.pdf'); }); it('adds full header and full footer to merged PDF', function () { copy(__DIR__ . '/files/header_logo.jpg', K_PATH_IMAGES . 'header_logo.png'); $pdfMerge = new PdfMerge( new HeaderConfig( imagePath: 'header_logo.png', logoWidthMM: 20, title: 'Header', text: 'This is a header text', textColor: new RGB(200, 200, 200), lineColor: new RGB(0, 0, 255), ), new FooterConfig( textColor: new RGB(100, 100, 100), lineColor: new RGB(255, 0, 0), margin: 20, ), ); $pdfMerge->add($this->dummyFile); $pdfMerge->add($this->dummyFile); expect($pdfMerge)->merge($this->outputFile)->toBeEmptyString(); expect($this->outputFile)->toEqualPDF(__DIR__ . '/files/expected/output_with_header_and_footer.pdf'); }); it('throws exception when no files were added', function () { $this->pdfMerge->merge('/foo.pdf'); })->throws(NoFilesDefinedException::class); icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/Pest.php000066400000000000000000000012511511205031700275460ustar00rootroot00000000000000extend('toEqualPDF', function (string $expected) { if (filesize($expected) !== filesize($this->value)) { throw new Exception('The file size of the PDF does not equal the file size from the expected output.'); } $pdf = new TCPDI(); $expectedPageCount = $pdf->setSourceFile($expected); $actualPageCount = $pdf->setSourceFile($this->value); if ($expectedPageCount !== $actualPageCount) { throw new Exception('The page count of the PDF does not equal the page count from the expected output.'); } return $this; }); expect()->extend('toBeEmptyString', function () { return expect($this->value)->toEqual(''); }); icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/000077500000000000000000000000001511205031700272255ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/dummy.pdf000066400000000000000000000376631511205031700310720ustar00rootroot00000000000000%PDF-1.3 % 4 0 obj << /Length 5 0 R /Filter /FlateDecode >> stream xj&j옇75nQ܈KSRpY?ݏ?O۟^~LWWc?[ѽ~sxqenˣ/w//⾺?%?Ęy'{?ѓ=tvMiӔ/~>/x7_oeݽg𖢡GX/\R螭34r;4RKһX "\"/ Ie*v`,# n{2=t%VW*H%N㶑t: D ɯ tGjDz[DdaF*BLnR=%z)oޅ:'0IgM\ w unsk'YAF}tç ^g=E y4j"[AE7 ";y4z~ !(xY '[rg 3 X"9΂zG5aN8*OI\cZg %0QohL'5ovhÀMqeqa@oQ.Ea 'ז!!~}6$gdu[tXR"oRV 8kaM qjSA !YHPjkt!3bY|f2S+)JQR5:DF\t-{7瀯2X6W0H+ Ƅ{Q@hbgo JqD ^;A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j 5 0 obj 4120 endobj 2 0 obj << /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0 0 595.2756 841.8898] >> endobj 6 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs1 7 0 R >> /Font << /TT1 8 0 R /TT3 10 0 R >> >> endobj 11 0 obj << /Length 12 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream xwTSϽ7" %z ;HQIP&vDF)VdTG"cE b PQDE݌k 5ޚYg}׺PtX4X\XffGD=HƳ.d,P&s"7C$ E6<~&S2)212 "įl+ɘ&Y4Pޚ%ᣌ\%g|eTI(L0_&l2E9r9hxgIbטifSb1+MxL 0oE%YmhYh~S=zU&ϞAYl/$ZUm@O ޜl^ ' lsk.+7oʿ9V;?#I3eE妧KD d9i,UQ h A1vjpԁzN6p\W p G@ K0ށiABZyCAP8C@&*CP=#t] 4}a ٰ;GDxJ>,_“@FXDBX$!k"EHqaYbVabJ0՘cVL6f3bձX'?v 6-V``[a;p~\2n5׌ &x*sb|! ߏƿ' Zk! $l$T4QOt"y\b)AI&NI$R$)TIj"]&=&!:dGrY@^O$ _%?P(&OJEBN9J@y@yCR nXZOD}J}/G3ɭk{%Oחw_.'_!JQ@SVF=IEbbbb5Q%O@%!BӥyҸM:e0G7ӓ e%e[(R0`3R46i^)*n*|"fLUo՝mO0j&jajj.ϧwϝ_4갺zj=U45nɚ4ǴhZ ZZ^0Tf%9->ݫ=cXgN].[7A\SwBOK/X/_Q>QG[ `Aaac#*Z;8cq>[&IIMST`ϴ kh&45ǢYYF֠9<|y+ =X_,,S-,Y)YXmĚk]c}džjcΦ浭-v};]N"&1=xtv(}'{'IߝY) Σ -rqr.d._xpUەZM׍vm=+KGǔ ^WWbj>:>>>v}/avO8 FV> 2 u/_$\BCv< 5 ]s.,4&yUx~xw-bEDCĻHGKwFGEGME{EEKX,YFZ ={$vrK .3\rϮ_Yq*©L_wד+]eD]cIIIOAu_䩔)3ѩiB%a+]3='/40CiU@ёL(sYfLH$%Y jgGeQn~5f5wugv5k֮\۹Nw]m mHFˍenQQ`hBBQ-[lllfjۗ"^bO%ܒY}WwvwXbY^Ю]WVa[q`id2JjGէ{׿m>PkAma꺿g_DHGGu;776ƱqoC{P38!9 ҝˁ^r۽Ug9];}}_~imp㭎}]/}.{^=}^?z8hc' O*?f`ϳgC/Oϩ+FFGGόzˌㅿ)ѫ~wgbk?Jި9mdwi獵ޫ?cǑOO?w| x&mf endstream endobj 12 0 obj 2612 endobj 7 0 obj [ /ICCBased 11 0 R ] endobj 3 0 obj << /Type /Pages /MediaBox [0 0 595.2756 841.8898] /Count 1 /Kids [ 2 0 R ] >> endobj 13 0 obj << /Type /Catalog /Pages 3 0 R >> endobj 10 0 obj << /Type /Font /Subtype /TrueType /BaseFont /AMFMTD+Arial-BoldMT /FontDescriptor 14 0 R /ToUnicode 15 0 R /FirstChar 33 /LastChar 40 /Widths [ 722 611 889 556 278 667 611 333 ] >> endobj 15 0 obj << /Length 16 0 R /Filter /FlateDecode >> stream x]j0z=1nAPBV~4Uog#aԭD3AQN֩eIx\CUs;OQ#U"*>`bɌGO`$Xw}+oEbUds/"[Ay셐%L:wU1P+q_kw1d$ժVUY!:bޘ+ c5b.913nnr)cmw}k狤M۟ѧͲ~]D endstream endobj 16 0 obj 277 endobj 14 0 obj << /Type /FontDescriptor /FontName /AMFMTD+Arial-BoldMT /Flags 4 /FontBBox [-628 -376 2000 1056] /ItalicAngle 0 /Ascent 905 /Descent -212 /CapHeight 716 /StemV 0 /Leading 33 /XHeight 519 /AvgWidth 479 /MaxWidth 2000 /FontFile2 17 0 R >> endobj 17 0 obj << /Length 18 0 R /Length1 1160 /Filter /FlateDecode >> stream xSoLSW?ײG[^鴃קDJK68q lE ƌH%4#۲~1[`$Kٲe0dJĔs}}y={ߙ~0G` p8`跱H_CW_ 7 \džΌz7mC?G\~22ԟzpX5QbDI]?L̰6yn{Tm6mEOyleJ+ZL4`+VE)RM`uTT|XL{DlK$_6s׹k_8hw*lmyi?{1 Ű *^AP]`1[=vTmHܪK"F 'đ?lD߅;($5gN'f~R, 2v$#]t؈ Nkt}oփ<x.qpNK"l%$A.Așڦ = sF*znS/czӾ>>V)IT'uJ:J,.b9)ȷGӼX&ih~wmNJNYoC7b\ʵ!W SQRhP]n7.)QC;Bo}8v98-+>E6+l/+5/ 5N endstream endobj 18 0 obj 928 endobj 8 0 obj << /Type /Font /Subtype /TrueType /BaseFont /UUALNP+TimesNewRomanPSMT /FontDescriptor 19 0 R /Encoding /MacRomanEncoding /FirstChar 32 /LastChar 32 /Widths [ 250 ] >> endobj 19 0 obj << /Type /FontDescriptor /FontName /UUALNP+TimesNewRomanPSMT /Flags 32 /FontBBox [-568 -307 2000 1006] /ItalicAngle 0 /Ascent 891 /Descent -216 /CapHeight 662 /StemV 94 /Leading 42 /XHeight 447 /StemH 36 /AvgWidth 401 /MaxWidth 2000 /FontFile2 20 0 R >> endobj 20 0 obj << /Length 21 0 R /Length1 7976 /Filter /FlateDecode >> stream xY |TŹfcd! –l .f^ &`b@A(jyTlnJj-XUX-u 9?gww'o󝙓4Q&m AU~yA4ms'y";KZJ9Υ+oZ][U Hl,hUm7&RPƔ>mU.xuUM){ٟ-ſZr}SʞI70Cg䧇ɎJh<'RKʷߺ!cjÞou-.rdM wm<$Rqǻ^K**3n(ąZu=⽮`,-¢‘eR2g=~F\Ks2^U\5>YU\v2]8)NQaUWeg+0q e3F') *^5/iŸO:)%M<%4GQe1>8 8 PYvVaB0SJAq~El@3`+@AZvN@7-#!<N?;`>y.%~_+XRthi<݀R@m;jJ˃N2*IjZ]AH#zR`ͺMXuYuJhxX0v"RnN Grq$KjlK&*KX5xXK\Z܈KҲR4[6YM]iR5dX,Hp\ (1^P3hYZ;oJְD Ԩ(&? Fj ~6.֒!Mii4YBhDTA 'n/V>f[ƞ #'Djzl'lmgmVj lQ[mmm-mmG3Z26dW;4#QjvrXi P@Var&p. Oa lH!͆vQs?+5f,' rS999au.`7 ,i԰k/JS(,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L eYo{^hl_OϏ:9z~wGs̛࿗ xz'܉=qħkg3;> >ZG)l:2e>[c2v}ngw[Am/1{ (#}ƱnOL|&7Z~Ż"jSDu8n7^d_aG~%UO-l."fbGV] 7{uZ1Q.<~ M-ǧ-d=PǬP7jo ȩ)ԏ5wT׳\f]씺Jn4GT@|3״qz#=ob.@sܮv k¦*>D=SZ)fg ljc+^>|g\털מ[ VsK G M^ceC [fGfS)}Lx6>@ Fw{pi-Fޟ 6*aȖ[;y>ra;K!dP"5[ 2Sw3b>5)]5x缏 l(>xFf^N2>Os^LFa 5 iUcf|\Z3NWѝjSȱ/_}l3dzrIԡbyf** 6YИӬ-xCY~Sc\ =(O݋YYKHJ ]& TͭTLb㮺r옲ѥ%WF,1[{ZްC ؿ_>,gfFznS/F 'O. ApCT{bP]f $--'+5; ~wqZV}Uw;m;hԮ]XgFz^ݔ^ T3P3-l$fU`y''S45AcFxFݬp& Vݨ/2H,1lՆƽlhӱ%EѢ°!b#h)¸5Ơ\b9w~S+:pBtK㎎;ƞYo"apomo:#amĀax9%gx+F^/X 0hM!n4 ;úǨ#cM]k}>ɰvfe*oVΪY}1LOp7IXǜK4:#EZˍhr __ϗKb)RK.錢"c(AXQ8,MpCoqAp{:6)/A=Z0+ݴ(7NܲxTjz.h̕ 4Gu''`8_v \Vn)CԞ _%2tK6D kؼStlٸA?[G'QF@x]B gʾv6%aZđt'xoY"lf1222;Dىtt_EݵюXܰHwn᎖ 2Vr͹Fcs٦Yi΂p7>~7ՇhUDƋWׇSZr% lDi45E 2Ά1Tg靜=͟$O JF6IiZv p}~O. ssƉG ~R/,?9  4wnuEW5havuus j endstream endobj 21 0 obj 5425 endobj 22 0 obj (Microsoft Word - Dokument1) endobj 23 0 obj (macOS Version 10.14.6 \(Build 18G95\) Quartz PDFContext) endobj 24 0 obj (Word) endobj 25 0 obj (D:20200324135830Z00'00') endobj 26 0 obj () endobj 27 0 obj [ ] endobj 1 0 obj << /Title 22 0 R /Producer 23 0 R /Creator 24 0 R /CreationDate 25 0 R /ModDate 25 0 R /Keywords 26 0 R /AAPL:Keywords 27 0 R >> endobj xref 0 28 0000000000 65535 f 0000015445 00000 n 0000004236 00000 n 0000007231 00000 n 0000000022 00000 n 0000004216 00000 n 0000004350 00000 n 0000007195 00000 n 0000009234 00000 n 0000000000 00000 n 0000007374 00000 n 0000004459 00000 n 0000007174 00000 n 0000007324 00000 n 0000007943 00000 n 0000007570 00000 n 0000007923 00000 n 0000008196 00000 n 0000009214 00000 n 0000009416 00000 n 0000009686 00000 n 0000015201 00000 n 0000015222 00000 n 0000015267 00000 n 0000015341 00000 n 0000015364 00000 n 0000015406 00000 n 0000015425 00000 n trailer << /Size 28 /Root 13 0 R /Info 1 0 R /ID [ <923440bf37f51bfd309536adc23e513a> <923440bf37f51bfd309536adc23e513a> ] >> startxref 15589 %%EOF icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/dummy_landscape.pdf000066400000000000000000000407751511205031700331020ustar00rootroot00000000000000%PDF-1.3 % 4 0 obj << /Length 5 0 R /Filter /FlateDecode >> stream xj&j옇75nQ܈KSRpY?ݏ?O۟^~LWWc?[ѽ~sxqenˣ/w//⾺?%?Ęy'{?ѓ=tvMiӔ/~>/x7_oeݽg𖢡GX/\R螭34r;4RKһX "\"/ Ie*v`,# n{2=t%VW*H%N㶑t: D ɯ tGjDz[DdaF*BLnR=%z)oޅ:'0IgM\ w unsk'YAF}tç ^g=E y4j"[AE7 ";y4z~ !(xY '[rg 3 X"9΂zG5aN8*OI\cZg %0QohL'5ovhÀMqeqa@oQ.Ea 'ז!!~}6$gdu[tXR"oRV 8kaM qjSA !YHPjkt!3bY|f2S+)JQR5:DF\t-{7瀯2X6W0H+ Ƅ{Q@hbgo JqD ^;AZBBg;p ^NfNEBWH= rl")Ltcb L P JHRiE[!ZZ*`9qpF, h@=,E61O !Xº/"L [ڕuSI8!o0$*B\SOR ok2Q/XSHUH $.m^G"O}"nG$Ts0Ԉ\-k0&=-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GGu;776ƱqoC{P38!9 ҝˁ^r۽Ug9];}}_~imp㭎}]/}.{^=}^?z8hc' O*?f`ϳgC/Oϩ+FFGGόzˌㅿ)ѫ~wgbk?Jި9mdwi獵ޫ?cǑOO?w| x&mf endstream endobj 12 0 obj 2612 endobj 7 0 obj [ /ICCBased 11 0 R ] endobj 3 0 obj << /Type /Pages /MediaBox [0 0 595.2756 841.8898] /Count 1 /Kids [ 2 0 R ] >> endobj 13 0 obj << /Type /Catalog /Pages 3 0 R >> endobj 10 0 obj << /Type /Font /Subtype /TrueType /BaseFont /AMFMTD+Arial-BoldMT /FontDescriptor 14 0 R /ToUnicode 15 0 R /FirstChar 33 /LastChar 40 /Widths [ 722 611 889 556 278 667 611 333 ] >> endobj 15 0 obj << /Length 16 0 R /Filter /FlateDecode >> stream x]j0z=1nAPBV~4Uog#aԭD3AQN֩eIx\CUs;OQ#U"*>`bɌGO`$Xw}+oEbUds/"[Ay셐%L:wU1P+q_kw1d$ժVUY!:bޘ+ c5b.913nnr)cmw}k狤M۟ѧͲ~]D endstream endobj 16 0 obj 277 endobj 14 0 obj << /Type /FontDescriptor /FontName /AMFMTD+Arial-BoldMT /Flags 4 /FontBBox [-628 -376 2000 1056] /ItalicAngle 0 /Ascent 905 /Descent -212 /CapHeight 716 /StemV 0 /Leading 33 /XHeight 519 /AvgWidth 479 /MaxWidth 2000 /FontFile2 17 0 R >> endobj 17 0 obj << /Length 18 0 R /Length1 1160 /Filter /FlateDecode >> stream xSoLSW?ײG[^鴃קDJK68q lE ƌH%4#۲~1[`$Kٲe0dJĔs}}y={ߙ~0G` p8`跱H_CW_ 7 \džΌz7mC?G\~22ԟzpX5QbDI]?L̰6yn{Tm6mEOyleJ+ZL4`+VE)RM`uTT|XL{DlK$_6s׹k_8hw*lmyi?{1 Ű *^AP]`1[=vTmHܪK"F 'đ?lD߅;($5gN'f~R, 2v$#]t؈ Nkt}oփ<x.qpNK"l%$A.Așڦ = sF*znS/czӾ>>V)IT'uJ:J,.b9)ȷGӼX&ih~wmNJNYoC7b\ʵ!W SQRhP]n7.)QC;Bo}8v98-+>E6+l/+5/ 5N endstream endobj 18 0 obj 928 endobj 8 0 obj << /Type /Font /Subtype /TrueType /BaseFont /UUALNP+TimesNewRomanPSMT /FontDescriptor 19 0 R /Encoding /MacRomanEncoding /FirstChar 32 /LastChar 32 /Widths [ 250 ] >> endobj 19 0 obj << /Type /FontDescriptor /FontName /UUALNP+TimesNewRomanPSMT /Flags 32 /FontBBox [-568 -307 2000 1006] /ItalicAngle 0 /Ascent 891 /Descent -216 /CapHeight 662 /StemV 94 /Leading 42 /XHeight 447 /StemH 36 /AvgWidth 401 /MaxWidth 2000 /FontFile2 20 0 R >> endobj 20 0 obj << /Length 21 0 R /Length1 7976 /Filter /FlateDecode >> stream xY |TŹfcd! –l .f^ &`b@A(jyTlnJj-XUX-u 9?gww'o󝙓4Q&m AU~yA4ms'y";KZJ9Υ+oZ][U Hl,hUm7&RPƔ>mU.xuUM){ٟ-ſZr}SʞI70Cg䧇ɎJh<'RKʷߺ!cjÞou-.rdM wm<$Rqǻ^K**3n(ąZu=⽮`,-¢‘eR2g=~F\Ks2^U\5>YU\v2]8)NQaUWeg+0q e3F') *^5/iŸO:)%M<%4GQe1>8 8 PYvVaB0SJAq~El@3`+@AZvN@7-#!<N?;`>y.%~_+XRthi<݀R@m;jJ˃N2*IjZ]AH#zR`ͺMXuYuJhxX0v"RnN Grq$KjlK&*KX5xXK\Z܈KҲR4[6YM]iR5dX,Hp\ (1^P3hYZ;oJְD Ԩ(&? Fj ~6.֒!Mii4YBhDTA 'n/V>f[ƞ #'Djzl'lmgmVj lQ[mmm-mmG3Z26dW;4#QjvrXi P@Var&p. Oa lH!͆vQs?+5f,' rS999au.`7 ,i԰k/JS(,[.\ 6g$3F=#ٶ,௨, ۷Ao66Ufosa^e>;p^BVVUJoIa^E5VUN;<شӔiڧqXxQiER6.r"?4ҀKfk H hhgKInjN/e̬ Ö>mgK=塋m4Z*r/{-E,@/'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q.<~ M-ǧ-d=PǬP7jo ȩ)ԏ5wT׳\f]씺Jn4GT@|3״qz#=ob.@sܮv k¦*>D=SZ)fg ljc+^>|g\털מ[ VsK G M^ceC [fGfS)}Lx6>@ Fw{pi-Fޟ 6*aȖ[;y>ra;K!dP"5[ 2Sw3b>5)]5x缏 l(>xFf^N2>Os^LFa 5 iUcf|\Z3NWѝjSȱ/_}l3dzrIԡbyf** 6YИӬ-xCY~Sc\ =(O݋YYKHJ ]& TͭTLb㮺r옲ѥ%WF,1[{ZްC ؿ_>,gfFznS/F 'O. ApCT{bP]f $--'+5; ~wqZV}Uw;m;hԮ]XgFz^ݔ^ T3P3-l$fU`y''S45AcFxFݬp& Vݨ/2H,1lՆƽlhӱ%EѢ°!b#h)¸5Ơ\b9w~S+:pBtK㎎;ƞYo"apomo:#amĀax9%gx+F^/X 0hM!n4 ;úǨ#cM]k}>ɰvfe*oVΪY}1LOp7IXǜK4:#EZˍhr __ϗKb)RK.錢"c(AXQ8,MpCoqAp{:6)/A=Z0+ݴ(7NܲxTjz.h̕ 4Gu''`8_v \Vn)CԞ _%2tK6D kؼStlٸA?[G'QF@x]B gʾv6%aZđt'xoY"lf1222;Dىtt_EݵюXܰHwn᎖ 2Vr͹Fcs٦Yi΂p7>~7ՇhUDƋWׇSZr% lDi45E 2Ά1Tg靜=͟$O JF6IiZv p}~O. ssƉG ~R/,?9  4wnuEW5havuus j endstream endobj 21 0 obj 5425 endobj 22 0 obj (Microsoft Word - Dokument1) endobj 23 0 obj (macOS Version 10.14.6 \(Build 18G95\) Quartz PDFContext) endobj 24 0 obj (Word) endobj 25 0 obj (D:20200324135830Z00'00') endobj 26 0 obj () endobj 27 0 obj [ ] endobj 1 0 obj << /Title 22 0 R /Producer 23 0 R /Creator 24 0 R /CreationDate 25 0 R /ModDate 25 0 R /Keywords 26 0 R /AAPL:Keywords 27 0 R >> endobj xref 0 28 0000000000 65535 f 0000015445 00000 n 0000004236 00000 n 0000007231 00000 n 0000000022 00000 n 0000004216 00000 n 0000004350 00000 n 0000007195 00000 n 0000009234 00000 n 0000000000 00000 n 0000007374 00000 n 0000004459 00000 n 0000007174 00000 n 0000007324 00000 n 0000007943 00000 n 0000007570 00000 n 0000007923 00000 n 0000008196 00000 n 0000009214 00000 n 0000009416 00000 n 0000009686 00000 n 0000015201 00000 n 0000015222 00000 n 0000015267 00000 n 0000015341 00000 n 0000015364 00000 n 0000015406 00000 n 0000015425 00000 n trailer << /Size 28 /Root 13 0 R /Info 1 0 R /ID [ <923440bf37f51bfd309536adc23e513a> <923440bf37f51bfd309536adc23e513a> ] >> startxref 15589 %%EOF 1 0 obj << /AAPL:Keywords 27 0 R /Title 22 0 R /CreationDate 25 0 R /ModDate (D:20221206135114Z00'00') /Creator 24 0 R /Producer (macOS Version 12.6.1 \(Build 21G217\) Quartz PDFContext, AppendMode 1.1) /Keywords 26 0 R >> endobj 2 0 obj << /Resources 6 0 R /Type /Page /Contents 4 0 R /Rotate 270 /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 3 0 R >> endobj xref 0 3 0000000000 65535 f 0000016307 00000 n 0000016537 00000 n trailer << /ID [<923440BF37F51BFD309536ADC23E513A><94BC904F350A15145B82C01E813EBF59> ] /Root 13 0 R /Size 28 /Prev 15589 /Info 1 0 R >> startxref 16665 %%EOF icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/expected/000077500000000000000000000000001511205031700310265ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/expected/output.pdf000066400000000000000000000533601511205031700330700ustar00rootroot00000000000000%PDF-1.3 % 5 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206143750+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 6 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /PZ 1 >> endobj 6 0 obj <> stream x3357r/ RR)@\N! n Fz`e@BzC,BC21Q\.C|@@. ;<1 endstream endobj 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206143750+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 4 0 R ] /PZ 1 >> endobj 8 0 obj <> stream xP 0 +Q/vԁ점zUA ~l®}KBON儺I[,Gv!DT\8dĄquz|!^! {ʿ,..Xca1hvʌ`doH+H[xe 1=ml°/lb endstream endobj 1 0 obj << /Type /Pages /Kids [ 5 0 R 7 0 R ] /Count 2 >> endobj 3 0 obj <> endobj 9 0 obj <> /Length 3673 >> stream xYK$=nW3J$ŷ¨6?R=,9twR) 2tߎ~{Ph29?}5aw(㿏;lw̏<>i/-~y???`Ǐ?~<׿<):0"}9sސ{t]!qv鿔*Sf=I>Ҳæ2/{URF,ɏfU|.eGmBȏQ˶hȣhm ^PȆmnoѤ_~,'<cNX+ix֑ ǴP&ۂh8 ˕a` \ gT1Iv+*ƪI ^5s @#'^F4[DidI5X%*g2K"{ "c6H]vxm͑ vĬ:bScI$}EV&_)~&Wݍ\*2Tq$e:"bQgPz0]l9AEN\,& [txƟfke51o2O=ue#L1nh4Zr:R"O "51G HkZE̤o)%ߡW!g0`&xLY`b~!& 8(A{[J+:@F ӵqKD{U Bc9B<=AH}U]*yV`vdbo0@vA.N{B2)+ͳK{TmvOb1 3u2CdȬK-NtY1ӂpJN(g"JbNd},""G<\;(n8RZĕx,V(C`ȈLG5k sM},vq“cJc/`adxa{P_"%(uәw&w2AA&1n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/F1 3 0 R >> /XObject <> >> endobj 4 0 obj <> /H /I>> endobj 24 0 obj << /Producer (TCPDF 6.4.4 \(http://www.tcpdf.org\)) /CreationDate (D:20221206143750+00'00') /ModDate (D:20221206143750+00'00') /Trapped /False >> endobj 25 0 obj << /Type /Metadata /Subtype /XML /Length 4640 >> stream application/pdf 2022-12-06T14:37:50+00:00 2022-12-06T14:37:50+00:00 2022-12-06T14:37:50+00:00 TCPDF 6.4.4 (http://www.tcpdf.org) uuid:4e55a938-8bbe-5c19-2617-9ec187c656ef uuid:4e55a938-8bbe-5c19-2617-9ec187c656ef http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema internal Adobe PDF Schema InstanceID URI http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI http://www.aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 26 0 obj << /Type /Catalog /Version /1.3 /Pages 1 0 R /Names << >> /ViewerPreferences << /Direction /L2R >> /PageLayout /SinglePage /PageMode /UseNone /OpenAction [5 0 R /FitH null] /Metadata 25 0 R >> endobj xref 0 27 0000000000 65535 f 0000001339 00000 n 0000016096 00000 n 0000001404 00000 n 0000016211 00000 n 0000000015 00000 n 0000000465 00000 n 0000000631 00000 n 0000001099 00000 n 0000001510 00000 n 0000005386 00000 n 0000005491 00000 n 0000005527 00000 n 0000005707 00000 n 0000005900 00000 n 0000008613 00000 n 0000008882 00000 n 0000009134 00000 n 0000009485 00000 n 0000009506 00000 n 0000015019 00000 n 0000016035 00000 n 0000016055 00000 n 0000016076 00000 n 0000016427 00000 n 0000016625 00000 n 0000021348 00000 n trailer << /Size 27 /Root 26 0 R /Info 24 0 R /ID [ <4e55a9388bbe5c1926179ec187c656ef> <4e55a9388bbe5c1926179ec187c656ef> ] >> startxref 21557 %%EOF output_mixed_orientation.pdf000066400000000000000000001105421511205031700366060ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/expected%PDF-1.3 % 5 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206143558+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 6 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /PZ 1 >> endobj 6 0 obj <> stream x3357r/ RR)@\N! n Fz`e@BzC,BC21Q\.C|@@. ;<1 endstream endobj 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206143558+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 841.889800 595.275600] /CropBox [0.000000 0.000000 841.889800 595.275600] /BleedBox [0.000000 0.000000 841.889800 595.275600] /TrimBox [0.000000 0.000000 841.889800 595.275600] /ArtBox [0.000000 0.000000 841.889800 595.275600] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 4 0 R ] /PZ 1 >> endobj 8 0 obj <> stream xP 0 +Q/vԁ점zUA ~l®}KBON儺I[,Gv!DT\8dĄquz|!^! {ʿ,.Xca1hvʌ`doH+H[xe 1=ml°/ˁb endstream endobj 1 0 obj << /Type /Pages /Kids [ 5 0 R 7 0 R ] /Count 2 >> endobj 3 0 obj <> endobj 9 0 obj <> /Length 3673 >> stream xYK$=nW3J$ŷ¨6?R=,9twR) 2tߎ~{Ph29?}5aw(㿏;lw̏<>i/-~y???`Ǐ?~<׿<):0"}9sސ{t]!qv鿔*Sf=I>Ҳæ2/{URF,ɏfU|.eGmBȏQ˶hȣhm ^PȆmnoѤ_~,'<cNX+ix֑ ǴP&ۂh8 ˕a` \ gT1Iv+*ƪI ^5s @#'^F4[DidI5X%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#cM]k}>ɰvfe*oVΪY}1LOp7IXǜK4:#EZˍhr __ϗKb)RK.錢"c(AXQ8,MpCoqAp{:6)/A=Z0+ݴ(7NܲxTjz.h̕ 4Gu''`8_v \Vn)CԞ _%2tK6D kؼStlٸA?[G'QF@x]B gʾv6%aZđt'xoY"lf1222;Dىtt_EݵюXܰHwn᎖ 2Vr͹Fcs٦Yi΂p7>~7ՇhUDƋWׇSZr% lDi45E 2Ά1Tg靜=͟$O JF6IiZv p}~O. ssƉG ~R/,?9  4wnuEW5havuus j endstream endobj 35 0 obj <>stream xSoLSW?ײG[^鴃קDJK68q lE ƌH%4#۲~1[`$Kٲe0dJĔs}}y={ߙ~0G` p8`跱H_CW_ 7 \džΌz7mC?G\~22ԟzpX5QbDI]?L̰6yn{Tm6mEOyleJ+ZL4`+VE)RM`uTT|XL{DlK$_6s׹k_8hw*lmyi?{1 Ű *^AP]`1[=vTmHܪK"F 'đ?lD߅;($5gN'f~R, 2v$#]t؈ Nkt}oփ<x.qpNK"l%$A.Așڦ = sF*znS/czӾ>>V)IT'uJ:J,.b9)ȷGӼX&ih~wmNJNYoC7b\ʵ!W SQRhP]n7.)QC;Bo}8v98-+>E6+l/+5/ 5N endstream endobj 36 0 obj 277 endobj 37 0 obj 5425 endobj 38 0 obj 928 endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 3 0 R >> /XObject <> >> endobj 4 0 obj <> /H /I>> endobj 39 0 obj << /Producer (TCPDF 6.4.4 \(http://www.tcpdf.org\)) /CreationDate (D:20221206143558+00'00') /ModDate (D:20221206143558+00'00') /Trapped /False >> endobj 40 0 obj << /Type /Metadata /Subtype /XML /Length 4640 >> stream application/pdf 2022-12-06T14:35:58+00:00 2022-12-06T14:35:58+00:00 2022-12-06T14:35:58+00:00 TCPDF 6.4.4 (http://www.tcpdf.org) uuid:0765db61-7f4e-470b-b5e4-040345f29799 uuid:0765db61-7f4e-470b-b5e4-040345f29799 http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema internal Adobe PDF Schema InstanceID URI http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI http://www.aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 41 0 obj << /Type /Catalog /Version /1.3 /Pages 1 0 R /Names << >> /ViewerPreferences << /Direction /L2R >> /PageLayout /SinglePage /PageMode /UseNone /OpenAction [5 0 R /FitH null] /Metadata 40 0 R >> endobj xref 0 42 0000000000 65535 f 0000001339 00000 n 0000030746 00000 n 0000001404 00000 n 0000030873 00000 n 0000000015 00000 n 0000000465 00000 n 0000000631 00000 n 0000001099 00000 n 0000001510 00000 n 0000009326 00000 n 0000005386 00000 n 0000020036 00000 n 0000009431 00000 n 0000009467 00000 n 0000009647 00000 n 0000009840 00000 n 0000012553 00000 n 0000012822 00000 n 0000013074 00000 n 0000013425 00000 n 0000013446 00000 n 0000018959 00000 n 0000019975 00000 n 0000019995 00000 n 0000020016 00000 n 0000020141 00000 n 0000020177 00000 n 0000020357 00000 n 0000020550 00000 n 0000023263 00000 n 0000023532 00000 n 0000023784 00000 n 0000024135 00000 n 0000024156 00000 n 0000029669 00000 n 0000030685 00000 n 0000030705 00000 n 0000030726 00000 n 0000031089 00000 n 0000031287 00000 n 0000036010 00000 n trailer << /Size 42 /Root 41 0 R /Info 39 0 R /ID [ <0765db617f4e470bb5e4040345f29799> <0765db617f4e470bb5e4040345f29799> ] >> startxref 36219 %%EOF output_with_header.pdf000066400000000000000000001176041511205031700353560ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/expected%PDF-1.3 % 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206151522+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /PZ 1 >> endobj 8 0 obj <> stream x3357r/ RR)@\N! n Fz`e@Bh0``JY뙚ɹ\!& .\@H + B 1:@ \ endstream endobj 9 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20221206151522+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 10 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 6 0 R ] /PZ 1 >> endobj 10 0 obj <> stream xPM @+ޱ.@:!P/e A,f/Byc>fPoNSt$Ov ꕐ2,*Q[ ކmj_9=ڋ~;`8g\iXjZ;B5IޚCycur:@_w1 endstream endobj 1 0 obj << /Type /Pages /Kids [ 7 0 R 9 0 R ] /Count 2 >> endobj 3 0 obj <> endobj 5 0 obj <> endobj 11 0 obj <> stream JFIF,,CCvb" _  !1QS 2ATq"7atw389WXru#45UVvB%6R  [ a!Ab1QSq $%2BDRUc"367rstu#458WwՁCVX ?;i=9܎+fݐDr$&#Ƥg2 ${X[7Mwbڍh6UuEKDȢ/Xg)NU3 bfBYqr{m7jx\YDnd #Q̹TW+3".],*1sLcD&5̬֨*y>f[3PJ˪dEFҐдmYٕʜTT),`RUk[Z[/3REЉ47 LȧFA[D 4ojsm8-Nbzbm\ym8ELv[~/ϖxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_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 obj 5425 endobj 26 0 obj 928 endobj 4 0 obj << /Type /XObject /Subtype /Form /FormType 1 /Filter /FlateDecode /BBox [0.000000 0.000000 595.276000 28.350000] /Matrix [1 0 0 1 0 0] /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F2 5 0 R /F1 3 0 R >> /XObject << /I0 11 0 R >> >> /Length 213 >> stream xR=o1 W,qH.^pm6ԣHw U+:ԑB΃mDI$lQ/; 8c88O+` ewllaJmYYn70b#;^z]e*`FhC^+E;?8cѫ\1|OU~p;z\qyگH*[w*x||B endstream endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 3 0 R /F2 5 0 R >> /XObject << /XT4 4 0 R /I0 11 0 R/TPL1 12 0 R >> >> endobj 6 0 obj <> /H /I>> endobj 27 0 obj << /Producer (TCPDF 6.4.4 \(http://www.tcpdf.org\)) /CreationDate (D:20221206151522+00'00') /ModDate (D:20221206151522+00'00') /Trapped /False >> endobj 28 0 obj << /Type /Metadata /Subtype /XML /Length 4640 >> stream application/pdf 2022-12-06T15:15:22+00:00 2022-12-06T15:15:22+00:00 2022-12-06T15:15:22+00:00 TCPDF 6.4.4 (http://www.tcpdf.org) uuid:2e3b4142-d202-36fa-aca5-67f5e446328c uuid:2e3b4142-d202-36fa-aca5-67f5e446328c http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema internal Adobe PDF Schema InstanceID URI http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI http://www.aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 29 0 obj << /Type /Catalog /Version /1.3 /Pages 1 0 R /Names << >> /ViewerPreferences << /Direction /L2R >> /PageLayout /SinglePage /PageMode /UseNone /OpenAction [7 0 R /FitH null] /Metadata 28 0 R >> endobj xref 0 30 0000000000 65535 f 0000001395 00000 n 0000034583 00000 n 0000001460 00000 n 0000034066 00000 n 0000001566 00000 n 0000034731 00000 n 0000000015 00000 n 0000000465 00000 n 0000000660 00000 n 0000001129 00000 n 0000001677 00000 n 0000019479 00000 n 0000023356 00000 n 0000023461 00000 n 0000023497 00000 n 0000023677 00000 n 0000023870 00000 n 0000026583 00000 n 0000026852 00000 n 0000027104 00000 n 0000027455 00000 n 0000027476 00000 n 0000032989 00000 n 0000034005 00000 n 0000034025 00000 n 0000034046 00000 n 0000034947 00000 n 0000035145 00000 n 0000039868 00000 n trailer << /Size 30 /Root 29 0 R /Info 27 0 R /ID [ <2e3b4142d20236faaca567f5e446328c> <2e3b4142d20236faaca567f5e446328c> ] >> startxref 40077 %%EOF output_with_header_and_footer.pdf000066400000000000000000001201531511205031700375470ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/karriere/pdf-merge/tests/files/expected%PDF-1.3 % 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20230224084848+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /PZ 1 >> endobj 8 0 obj <> stream xR 0+樗4n>rēł(M>xaɰ1ڥF%wX*$GyDCYmbiK?ekTQWPS=OoW$k&MEE0o[䚧l0$98Ntn]Vc_t[ri8ĥsB印K"f231|U߃v0Gu endstream endobj 9 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20230224084848+00'00') /Resources 2 0 R /MediaBox [0.000000 0.000000 595.275600 841.889800] /CropBox [0.000000 0.000000 595.275600 841.889800] /BleedBox [0.000000 0.000000 595.275600 841.889800] /TrimBox [0.000000 0.000000 595.275600 841.889800] /ArtBox [0.000000 0.000000 595.275600 841.889800] /Contents 10 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 6 0 R ] /PZ 1 >> endobj 10 0 obj <> stream xSMo0 W#\L&n $C0 B%4QM+ qhʓ;#Ă =kr9kYLfRv5+p}ȐL^ƴ xO5or>_-||=JN>{,ίt[%i T l(+ݶxϦ3F9|;*b5a>%)h > endobj 3 0 obj <> endobj 5 0 obj <> endobj 11 0 obj <> stream JFIF,,CCvb" _  !1QS 2ATq"7atw389WXru#45UVvB%6R  [ a!Ab1QSq $%2BDRUc"367rstu#458WwՁCVX ?;i=9܎+fݐDr$&#Ƥg2 ${X[7Mwbڍh6UuEKDȢ/Xg)NU3 bfBYqr{m7jx\YDnd #Q̹TW+3".],*1sLcD&5̬֨*y>f[3PJ˪dEFҐдmYٕʜTT),`RUk[Z[/3REЉ47 LȧFA[D 4ojsm8-Nbzbm\ym8ELv[~/ϖxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7Xxz?G_W|SG9鉶1=16q.ze<㶜"S;h߯2]燩{E~7>,[F.8Tm>AlYVRIQkW]ΞN:Q[z=LSMR+%IZ Iėsx#"<Ԩ9P)`͛e Tkr}}:/-1 Fo7Tf#~V/̌mcӥ)JdJr0I$ SAyɈdWP2h$jRc3^1:~ȸsFכSzQGi/ĥT0AJ);* qRPX<2ZH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__ϗKb)RK.錢"c(AXQ8,MpCoqAp{:6)/A=Z0+ݴ(7NܲxTjz.h̕ 4Gu''`8_v \Vn)CԞ _%2tK6D kؼStlٸA?[G'QF@x]B gʾv6%aZđt'xoY"lf1222;Dىtt_EݵюXܰHwn᎖ 2Vr͹Fcs٦Yi΂p7>~7ՇhUDƋWׇSZr% lDi45E 2Ά1Tg靜=͟$O JF6IiZv p}~O. ssƉG ~R/,?9  4wnuEW5havuus j endstream endobj 23 0 obj <>stream xSoLSW?ײG[^鴃קDJK68q lE ƌH%4#۲~1[`$Kٲe0dJĔs}}y={ߙ~0G` p8`跱H_CW_ 7 \džΌz7mC?G\~22ԟzpX5QbDI]?L̰6yn{Tm6mEOyleJ+ZL4`+VE)RM`uTT|XL{DlK$_6s׹k_8hw*lmyi?{1 Ű *^AP]`1[=vTmHܪK"F 'đ?lD߅;($5gN'f~R, 2v$#]t؈ Nkt}oփ<x.qpNK"l%$A.Așڦ = sF*znS/czӾ>>V)IT'uJ:J,.b9)ȷGӼX&ih~wmNJNYoC7b\ʵ!W SQRhP]n7.)QC;Bo}8v98-+>E6+l/+5/ 5N endstream endobj 24 0 obj 277 endobj 25 0 obj 5425 endobj 26 0 obj 928 endobj 4 0 obj << /Type /XObject /Subtype /Form /FormType 1 /Filter /FlateDecode /BBox [0.000000 0.000000 595.276000 28.350000] /Matrix [1 0 0 1 0 0] /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F2 5 0 R /F1 3 0 R >> /XObject << /I0 11 0 R >> >> /Length 236 >> stream xRN1 +;\" VuzG B=*w"u'V^,E!RTQp8Q*I3RGbѽ;ѭ=ސq G;#b:6/ U\Fld;jY,8oZczq립!OԽ6?hsWoiysz6R8#ixc/7ukH*G O{ endstream endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 3 0 R /F2 5 0 R >> /XObject << /XT4 4 0 R /I0 11 0 R/TPL1 12 0 R >> >> endobj 6 0 obj <> /H /I>> endobj 27 0 obj << /Producer (TCPDF 6.6.2 \(http://www.tcpdf.org\)) /CreationDate (D:20230224084848+00'00') /ModDate (D:20230224084848+00'00') /Trapped /False >> endobj 28 0 obj << /Type /Metadata /Subtype /XML /Length 4640 >> stream application/pdf 2023-02-24T08:48:48+00:00 2023-02-24T08:48:48+00:00 2023-02-24T08:48:48+00:00 TCPDF 6.6.2 (http://www.tcpdf.org) uuid:6232d3c6-9d59-671e-d9da-0b57efee30c7 uuid:6232d3c6-9d59-671e-d9da-0b57efee30c7 http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema internal Adobe PDF Schema InstanceID URI http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI http://www.aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 29 0 obj << /Type /Catalog /Version /1.3 /Pages 1 0 R /Names << >> /ViewerPreferences << /Direction /L2R >> /PageLayout /SinglePage /PageMode /UseNone /OpenAction [7 0 R /FitH null] /Metadata 28 0 R >> endobj xref 0 30 0000000000 65535 f 0000001603 00000 n 0000034814 00000 n 0000001668 00000 n 0000034274 00000 n 0000001774 00000 n 0000034962 00000 n 0000000015 00000 n 0000000465 00000 n 0000000770 00000 n 0000001239 00000 n 0000001885 00000 n 0000019687 00000 n 0000023564 00000 n 0000023669 00000 n 0000023705 00000 n 0000023885 00000 n 0000024078 00000 n 0000026791 00000 n 0000027060 00000 n 0000027312 00000 n 0000027663 00000 n 0000027684 00000 n 0000033197 00000 n 0000034213 00000 n 0000034233 00000 n 0000034254 00000 n 0000035178 00000 n 0000035376 00000 n 0000040099 00000 n trailer << /Size 30 /Root 29 0 R /Info 27 0 R /ID [ <6232d3c69d59671ed9da0b57efee30c7> <6232d3c69d59671ed9da0b57efee30c7> ] >> startxref 40308 %%EOF icingaweb2-module-pdfexport-0.12.0+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l: icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/000077500000000000000000000000001511205031700226265ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/000077500000000000000000000000001511205031700250005ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/composer.json000066400000000000000000000016721511205031700275300ustar00rootroot00000000000000{ "name": "phrity/comparison", "type": "library", "description": "Interfaces and helper trait for comparing objects. Comparator for sort and filter applications.", "homepage": "https://phrity.sirn.se/comparison", "keywords": ["comparison", "equalable", "comparable", "comparator", "sort", "filter"], "license": "MIT", "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "Phrity\\Comparison\\": "src/" } }, "autoload-dev": { "psr-4": { "Mock\\": "tests/Mock/" } }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/000077500000000000000000000000001511205031700255675ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/Comparable.php000066400000000000000000000041431511205031700303470ustar00rootroot00000000000000 Comparison */ namespace Phrity\Comparison; /** * Interface for comparable instances. */ interface Comparable extends Equalable { /** * Compare $this and $that and return result as comparison identifier as integer. * @param mixed $that The instance to compare with * @return integer Must return 0 if $this is equal to $that * Must return -1 if $this is less than $that * Must return 1 if $this is greater than $that * @throws IncomparableException Must throw if $this can not be compared with $that */ public function compare(mixed $that): int; /** * If $this is greater than $that. * @param mixed $that The instance to compare with * @return boolean True if $this is greater than $that * @throws IncomparableException Must throw if $this can not be compared with $that */ public function greaterThan(mixed $that): bool; /** * If $this is greater than or equal to $that. * @param mixed $that The instance to compare with * @return boolean True if $this is greater than or equal to $that * @throws IncomparableException Must throw if $this can not be compared with $that */ public function greaterThanOrEqual(mixed $that): bool; /** * If $this is less than $that. * @param mixed $that The instance to compare with * @return boolean True if $this is less than $that * @throws IncomparableException Must throw if $this can not be compared with $that */ public function lessThan(mixed $that): bool; /** * If $this is less than or equal to $this. * @param mixed $that The instance to compare with * @return boolean True if $this is less than or equal to $this * @throws IncomparableException Must throw if $this can not be compared with $that */ public function lessThanOrEqual(mixed $that): bool; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/Comparator.php000066400000000000000000000167771511205031700304310ustar00rootroot00000000000000 Comparison */ namespace Phrity\Comparison; /** * Utility class for comparing and filtering. */ class Comparator { /** @var array */ private $comparables; /** * If comparables supplied in constructor, they will be used as defaults an operations * @param array $comparables List of objects implementing Comparable */ public function __construct(array $comparables = []) { $this->comparables = $comparables; } // Sort methods /** * Sorts array of comparable items, low to high * @param array|null $comparables List of objects implementing Comparable * @return array The sorted list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function sort(array|null $comparables = null): array { $comparables = $comparables ?: $this->comparables; usort($comparables, function ($item_1, $item_2) { $this->verifyComparable($item_1); return $item_1->compare($item_2); }); return $comparables; } /** * Sorts array of comparable items, high to low * @param array|null $comparables List of objects implementing Comparable * @return array The sorted list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function rsort(array|null $comparables = null): array { $comparables = $comparables ?: $this->comparables; usort($comparables, function ($item_1, $item_2) { $this->verifyComparable($item_2); return $item_2->compare($item_1); }); return $comparables; } // Filter methods /** * Filter array of comparable items that equals condition * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function equals(Comparable $condition, array|null $comparables = null): array { return $this->applyFilter('equals', $condition, $comparables); } /** * Filter array of comparable items that are greater than condition * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function greaterThan(Comparable $condition, array|null $comparables = null): array { return $this->applyFilter('greaterThan', $condition, $comparables); } /** * Filter array of comparable items that are greater than or equals condition * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function greaterThanOrEqual(Comparable $condition, array|null $comparables = null): array { return $this->applyFilter('greaterThanOrEqual', $condition, $comparables); } /** * Filter array of comparable items that are less than condition * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function lessThan(Comparable $condition, array|null $comparables = null): array { return $this->applyFilter('lessThan', $condition, $comparables); } /** * Filter array of comparable items that are less than or equals condition * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ public function lessThanOrEqual(Comparable $condition, array|null $comparables = null): array { return $this->applyFilter('lessThanOrEqual', $condition, $comparables); } // Select methods /** * Get minimum item from array of comparable items * @param array|null $comparables List of objects implementing Comparable * @return Comparable|null The resolved instance * @throws IncomparableException Thrown if any item in the list can not be compared */ public function min(array|null $comparables = null): Comparable|null { return $this->applyReduction('lessThan', $comparables); } /** * Get maximum item from array of comparable items * @param array|null $comparables List of objects implementing Comparable * @return Comparable|null The resolved instance * @throws IncomparableException Thrown if any item in the list can not be compared */ public function max(array|null $comparables = null): Comparable|null { return $this->applyReduction('greaterThan', $comparables); } // Private internal methods /** * Verify input implements Comparable * @param mixed $item Item to verify * @throws IncomparableException Thrown if item do not implement Comparable */ private function verifyComparable(mixed $item): void { if (!$item instanceof Comparable) { throw new IncomparableException('All items must implement Comparable'); } } /** * Filter array of comparable items according to condition instance and method * @param string $method Comparison method to use * @param Comparable $condition To compare against * @param array|null $comparables List of objects implementing Comparable * @return array The filtered list * @throws IncomparableException Thrown if any item in the list can not be compared */ private function applyFilter(string $method, Comparable $condition, array|null $comparables = null): array { $comparables = $comparables ?: $this->comparables; $filtered = array_filter($comparables, function ($item) use ($method, $condition) { $this->verifyComparable($item); return $item->$method($condition); }); return array_values($filtered); } /** * Reduce array of comparable items according comparison method * @param string $method Comparison method to use * @param array|null $comparables List of objects implementing Comparable * @return Comparable|null The resolved instance * @throws IncomparableException Thrown if any item in the list can not be compared */ private function applyReduction(string $method, array|null $comparables = null): Comparable|null { $comparables = $comparables ?: $this->comparables; return array_reduce($comparables, function ($item_1, $item_2) use ($method) { if (is_null($item_1)) { return $item_2; } $this->verifyComparable($item_1); return $item_1->$method($item_2) ? $item_1 : $item_2; }); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/ComparisonTrait.php000066400000000000000000000041471511205031700314240ustar00rootroot00000000000000 Comparison */ namespace Phrity\Comparison; /** * Trait that enables comparison methods. */ trait ComparisonTrait { /** * If $this is equal to $that. * @param mixed $that The instance to compare with * @return boolean True if $this is equal to $that * @throws IncomparableException Thrown if $this can not be compared with $that */ public function equals(mixed $that): bool { return $this->compare($that) == 0; } /** * If $this is greater than $that. * @param mixed $that The instance to compare with * @return boolean True if $this is greater than $that * @throws IncomparableException Thrown if $this can not be compared with $that */ public function greaterThan(mixed $that): bool { return $this->compare($that) > 0; } /** * If $this is greater than or equal to $that. * @param mixed $that The instance to compare with * @return boolean True if $this is greater than or equal to $that * @throws IncomparableException Thrown if $this can not be compared with $that */ public function greaterThanOrEqual(mixed $that): bool { return $this->compare($that) >= 0; } /** * If $this is less than $that. * @param mixed $that The instance to compare with * @return boolean True if $this is less than $that * @throws IncomparableException Thrown if $this can not be compared with $that */ public function lessThan(mixed $that): bool { return $this->compare($that) < 0; } /** * If $this is less than or equal to $this. * @param mixed $that The instance to compare with * @return boolean True if $this is less than or equal to $this * @throws IncomparableException Thrown if $this can not be compared with $that */ public function lessThanOrEqual(mixed $that): bool { return $this->compare($that) <= 0; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/Equalable.php000066400000000000000000000007701511205031700301770ustar00rootroot00000000000000 Comparison */ namespace Phrity\Comparison; /** * Interface for equalable instances. */ interface Equalable { /** * If $this is equal to $that. * @param mixed $that The instance to compare with * @return boolean True if $this is equal to $that * @throws IncomparableException Must throw if $this can not be compared with $that */ public function equals(mixed $that): bool; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/comparison/src/IncomparableException.php000066400000000000000000000004401511205031700325510ustar00rootroot00000000000000 Comparison */ namespace Phrity\Comparison; use InvalidArgumentException; /** * Exception that should be thrown when instances can not be compared. */ class IncomparableException extends InvalidArgumentException { } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/000077500000000000000000000000001511205031700236055ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/LICENSE000066400000000000000000000020561511205031700246150ustar00rootroot00000000000000MIT License Copyright (c) 2025 Sören Jensen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/composer.json000066400000000000000000000020361511205031700263300ustar00rootroot00000000000000{ "name": "phrity/http", "type": "library", "description": "Utilities and interfaces for handling HTTP.", "homepage": "https://phrity.sirn.se/http", "keywords": ["HTTP", "HTTP Factories", "PSR-17"], "license": "MIT", "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "Phrity\\Http\\": "src/" } }, "autoload-dev": { "psr-4": { "Phrity\\Http\\Test\\": "tests/" } }, "require": { "php": "^8.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "provides": { "psr/http-factory-implementation": "*" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/docu.json000066400000000000000000000002161511205031700254310ustar00rootroot00000000000000[ { "name": "Overview", "source": "README.md" }, { "name": "License", "source": "LICENSE" } ] icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/src/000077500000000000000000000000001511205031700243745ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/http/src/HttpFactory.php000066400000000000000000000131771511205031700273650ustar00rootroot00000000000000requestFactory)) { throw new BadMethodCallException('HttpFactory.createRequest not implemented.'); } return $this->requestFactory->createRequest($method, $uri); } /** * @param int $code * @param string $reasonPhrase */ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface { if (is_null($this->responseFactory)) { throw new BadMethodCallException('HttpFactory.createResponse not implemented.'); } return $this->responseFactory->createResponse($code, $reasonPhrase); } /** * @param string $method * @param UriInterface|string $uri * @param array $serverParams */ public function createServerRequest(string $method, mixed $uri, array $serverParams = []): ServerRequestInterface { if (is_null($this->serverRequestFactory)) { throw new BadMethodCallException('HttpFactory.createServerRequest not implemented.'); } return $this->serverRequestFactory->createServerRequest($method, $uri); } /** * @param string $content */ public function createStream(string $content = ''): StreamInterface { if (is_null($this->streamFactory)) { throw new BadMethodCallException('HttpFactory.createStream not implemented.'); } return $this->streamFactory->createStream($content); } /** * @param string $filename * @param string $mode */ public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface { if (is_null($this->streamFactory)) { throw new BadMethodCallException('HttpFactory.createStreamFromFile not implemented.'); } return $this->streamFactory->createStreamFromFile($filename, $mode); } /** * @param resource $resource */ public function createStreamFromResource($resource): StreamInterface { if (is_null($this->streamFactory)) { throw new BadMethodCallException('HttpFactory.createStreamFromResource not implemented.'); } return $this->streamFactory->createStreamFromResource($resource); } /** * @param StreamInterface $stream * @param int $size * @param int $error * @param string $clientFilename * @param string $clientMediaType */ public function createUploadedFile( StreamInterface $stream, int|null $size = null, int $error = UPLOAD_ERR_OK, string|null $clientFilename = null, string|null $clientMediaType = null ): UploadedFileInterface { if (is_null($this->uploadedFileFactory)) { throw new BadMethodCallException('HttpFactory.createUploadedFile not implemented.'); } return $this->uploadedFileFactory->createUploadedFile( $stream, $size, $error, $clientFilename, $clientMediaType ); } /** * @param string $uri The URI to parse. */ public function createUri(string $uri = ''): UriInterface { if (is_null($this->uriFactory)) { throw new BadMethodCallException('HttpFactory.createUri not implemented.'); } return $this->uriFactory->createUri($uri); } public static function create(object ...$implementations): self { $created = new self(); foreach ($implementations as $implementation) { if ($implementation instanceof RequestFactoryInterface) { $created->requestFactory = $implementation; } if ($implementation instanceof ResponseFactoryInterface) { $created->responseFactory = $implementation; } if ($implementation instanceof ServerRequestFactoryInterface) { $created->serverRequestFactory = $implementation; } if ($implementation instanceof StreamFactoryInterface) { $created->streamFactory = $implementation; } if ($implementation instanceof UploadedFileFactoryInterface) { $created->uploadedFileFactory = $implementation; } if ($implementation instanceof UriFactoryInterface) { $created->uriFactory = $implementation; } } return $created; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/000077500000000000000000000000001511205031700247055ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/composer.json000066400000000000000000000021121511205031700274230ustar00rootroot00000000000000{ "name": "phrity/net-stream", "type": "library", "description": "Socket stream classes implementing PSR-7 Stream and PSR-17 StreamFactory", "homepage": "https://phrity.sirn.se/net-stream", "keywords": ["socket", "stream", "stream factory", "client", "server", "PSR-7", "PSR-17"], "license": "MIT", "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "autoload-dev": { "psr-4": { "Phrity\\Net\\Test\\": "tests/mock/" } }, "require": { "php": "^8.1", "phrity/util-errorhandler": "^1.1", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/net-uri": "^2.0", "squizlabs/php_codesniffer": "^3.5" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/000077500000000000000000000000001511205031700254745ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/Context.php000066400000000000000000000142451511205031700276370ustar00rootroot00000000000000, Closure> */ protected array $notifiers = []; /** * Create exception. * @param open-resource|null $stream * @throws InvalidArgumentException if not a resource * @throws InvalidArgumentException if wrong resource type */ public function __construct(mixed $stream = null) { if (is_null($stream)) { $stream = stream_context_create(); } $type = gettype($stream); if ($type !== 'resource') { throw new InvalidArgumentException("Invalid stream provided; got type '{$type}'."); } $rtype = get_resource_type($stream); if (!in_array($rtype, ['stream', 'persistent stream', 'stream-context'])) { throw new InvalidArgumentException("Invalid stream provided; got resource type '{$rtype}'."); } $this->stream = $stream; stream_context_set_params($this->stream, ['notification' => function (...$input) { $this->notifyCallback(...$input); }]); } public function getOption(string $wrapper, string $option): mixed { return stream_context_get_options($this->stream)[$wrapper][$option] ?? null; } /** * @return array> */ public function getOptions(): array { return stream_context_get_options($this->stream); } /** * @throws StreamException on failure */ public function setOption(string $wrapper, string $option, mixed $value): self { if (!is_resource($this->stream) || !stream_context_set_option($this->stream, $wrapper, $option, $value)) { throw new StreamException(StreamException::CONTEXT_SET_ERR); } return $this; } /** * @param array> $options */ public function setOptions(array $options): self { foreach ($options as $wrapper => $wrapperOptions) { foreach ($wrapperOptions as $option => $value) { $this->setOption($wrapper, $option, $value); } } return $this; } /** * @deprecated Use getOption. */ public function getParam(string $param): mixed { return stream_context_get_params($this->stream)[$param] ?? null; } /** * @return array * @deprecated Use getOptions. */ public function getParams(): array { return stream_context_get_params($this->stream); } /** * @deprecated Use setOption and on- callbacks instead. */ public function setParam(string $param, mixed $value): self { $this->setParams([$param => $value]); return $this; } /** * @param array $params * @deprecated Use setOptions and on- callbacks instead. * @throws StreamException on failure */ public function setParams(array $params): self { /** @phpstan-ignore booleanNot.alwaysFalse */ if (!is_resource($this->stream) || !stream_context_set_params($this->stream, $params)) { throw new StreamException(StreamException::CONTEXT_SET_ERR); } return $this; } public function getResource(): mixed { return $this->stream; } /** @param Closure(): void $closure */ public function onResolve(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_RESOLVE] = $closure; } /** @param Closure(): void $closure */ public function onConnect(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_CONNECT] = $closure; } /** @param Closure(): void $closure */ public function onAuthRequired(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_AUTH_REQUIRED] = $closure; } /** @param Closure(string $mimeType): void $closure */ public function onMimeType(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_MIME_TYPE_IS] = $closure; } /** @param Closure(int $fileSize): void $closure */ public function onFileSize(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_FILE_SIZE_IS] = $closure; } /** @param Closure(string $uri): void $closure */ public function onRedirected(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_REDIRECTED] = $closure; } /** @param Closure(int $transferred, int $max): void $closure */ public function onProgress(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_PROGRESS] = $closure; } /** @param Closure(): void $closure */ public function onCompleted(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_COMPLETED] = $closure; } /** @param Closure(string $message, int $code): void $closure */ public function onFailure(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_FAILURE] = $closure; } /** @param Closure(): void $closure */ public function onAuthResult(Closure $closure): void { $this->notifiers[STREAM_NOTIFY_AUTH_RESULT] = $closure; } protected function notifyCallback( int $code, int $severity, string|null $message, int $errorCode, int $transferred, int $max, ): void { if (!array_key_exists($code, $this->notifiers)) { return; } $callback = $this->notifiers[$code]; $params = match ($code) { STREAM_NOTIFY_RESOLVE, STREAM_NOTIFY_CONNECT, STREAM_NOTIFY_AUTH_REQUIRED, STREAM_NOTIFY_COMPLETED, STREAM_NOTIFY_AUTH_RESULT => [], STREAM_NOTIFY_MIME_TYPE_IS => ['mimeType' => $message], STREAM_NOTIFY_FILE_SIZE_IS => ['fileSize' => $message], STREAM_NOTIFY_REDIRECTED => ['uri' => $message], STREAM_NOTIFY_PROGRESS => ['transferred' => $transferred, 'max' => $max], STREAM_NOTIFY_FAILURE => ['message' => $message, 'code' => $errorCode], }; $callback(...$params); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/SocketClient.php000066400000000000000000000062261511205031700306020ustar00rootroot00000000000000|float|null */ protected int|float|null $timeout = null; protected Context $context; /** * Create new socker server instance * @param UriInterface $uri The URI to open socket on. */ public function __construct(UriInterface $uri, Context|null $context = null) { $this->uri = $uri; $this->context = $context ?? new Context(); $this->handler = new ErrorHandler(); } // ---------- Configuration --------------------------------------------------------------------------------------- /** * Set stream context. * @param Context|array>|null $options * @param array|null $params * @return SocketClient */ public function setContext(Context|array|null $options = null, array|null $params = null): self { if ($options instanceof Context) { $this->context = $options; return $this; } // @deprecated // @todo Add deprecation warning $this->context->setOptions($options ?? []); $this->context->setParams($params ?? []); return $this; } public function getContext(): Context { return $this->context; } /** * Set connection persistency. * @param bool $persistent * @return SocketClient */ public function setPersistent(bool $persistent): self { $this->persistent = $persistent; return $this; } /** * Set timeout in seconds. * @param int<0, max>|float|null $timeout * @return SocketClient * @throws InvalidArgumentException if invalid timeout */ public function setTimeout(int|float|null $timeout): self { if (!is_null($timeout) && $timeout < 0) { throw new InvalidArgumentException("Timeout must be 0 or more."); } $this->timeout = $timeout; return $this; } // ---------- Operations ------------------------------------------------------------------------------------------ /** * Create a connection on remote socket. * @return SocketStream The stream for opened conenction. */ public function connect(): SocketStream { /** @throws StreamException if connection could not be created */ $stream = $this->handler->with(function () { $error_code = $error_message = ''; return stream_socket_client( $this->uri->__toString(), $error_code, $error_message, $this->timeout, $this->persistent ? STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT : STREAM_CLIENT_CONNECT, $this->context->getResource() ); }, new StreamException(StreamException::CLIENT_CONNECT_ERR, ['uri' => $this->uri])); return new SocketStream($stream); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/SocketServer.php000066400000000000000000000137211511205031700306300ustar00rootroot00000000000000 */ private static array $internet_schemes = ['tcp', 'udp', 'tls', 'ssl']; /** @var array */ private static array $unix_schemes = ['unix', 'udg']; protected ErrorHandler $handler; protected string $address; /** @var resource */ protected $stream; protected Context $context; /** * Create new socker server instance * @param UriInterface $uri The URI to open socket on. * @throws StreamException if invalid scheme. * @throws StreamException if unsupported scheme. * @throws StreamException if unable to create socket. */ public function __construct(UriInterface $uri, Context|null $context = null) { $this->handler = new ErrorHandler(); if (!in_array($uri->getScheme(), $this->getTransports())) { throw new StreamException(StreamException::SCHEME_TRANSPORT, ['scheme' => $uri->getScheme()]); } if (in_array(substr($uri->getScheme(), 0, 3), self::$internet_schemes)) { $this->address = "{$uri->getScheme()}://{$uri->getAuthority()}"; } elseif (in_array($uri->getScheme(), self::$unix_schemes)) { $this->address = "{$uri->getScheme()}://{$uri->getPath()}"; } else { throw new StreamException(StreamException::SCHEME_HANDLER, ['scheme' => $uri->getScheme()]); } $this->context = $context ?? new Context(); /** @throws StreamException on failure */ $this->stream = $this->handler->with(function () { $error_code = $error_message = ''; return stream_socket_server( $this->address, $error_code, $error_message, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $this->context->getResource() ); }, new StreamException(StreamException::SERVER_SOCKET_ERR, ['uri' => $uri->__toString()])); $this->evalStream(); } // ---------- Configuration --------------------------------------------------------------------------------------- /** * Set stream context. * @param Context|array>|null $options * @param array|null $params * @return static */ public function setContext(Context|array|null $options = null, array|null $params = null): self { if ($options instanceof Context) { $this->context = $options; return $this; } // @deprecated // @todo Add deprecation warning $this->context->setOptions($options ?? []); $this->context->setParams($params ?? []); return $this; } public function getContext(): Context { return $this->context; } /** * Retrieve list of registered socket transports. * @return array List of registered transports. */ public function getTransports(): array { return stream_get_transports(); } /** * If server is in blocking mode. * @return bool|null */ public function isBlocking(): bool|null { return $this->getMetadata('blocked'); } /** * Toggle blocking/non-blocking mode. * @param bool $enable Blocking mode to set. * @return bool If operation was succesful. * @throws StreamException if socket is closed. */ public function setBlocking(bool $enable): bool { if (!is_resource($this->stream)) { throw new StreamException(StreamException::SERVER_CLOSED); } return stream_set_blocking($this->stream, $enable); } /** * Get stream metadata as an associative array or retrieve a specific key. * @param string $key Specific metadata to retrieve. * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. */ public function getMetadata(string|null $key = null): mixed { if (!is_resource($this->stream)) { return null; } // Add URI default for version compability $meta = array_merge([ 'uri' => $this->address, ], stream_get_meta_data($this->stream)); if (isset($key)) { return array_key_exists($key, $meta) ? $meta[$key] : null; } return $meta; } // ---------- Operations ------------------------------------------------------------------------------------------ /** * Accept a connection on a socket. * @param int<0, max>|float|null $timeout Override the default socket accept timeout. * @return SocketStream|null The stream for opened conenction. * @throws InvalidArgumentException if invalid timeout * @throws StreamException if socket is closed */ public function accept(int|float|null $timeout = null): SocketStream|null { if (!is_null($timeout) && $timeout < 0) { throw new InvalidArgumentException("Timeout must be 0 or more."); } if (!is_resource($this->stream)) { throw new StreamException(StreamException::SERVER_CLOSED); } /** @throws StreamException */ $stream = $this->handler->with(function () use ($timeout) { $peer_name = ''; return stream_socket_accept($this->stream, $timeout, $peer_name); }, function (ErrorException $e) { // If non-blocking mode, don't throw error on time out if ($this->getMetadata('blocked') === false && substr_count($e->getMessage(), 'timed out') > 0) { return null; } throw new StreamException(StreamException::SERVER_ACCEPT_ERR); }); return $stream ? new SocketStream($stream) : null; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/SocketStream.php000066400000000000000000000121421511205031700306110ustar00rootroot00000000000000stream) && ($this->readable || $this->writable); } /** * Get name of remote socket, or null if not connected. * @return string|null */ public function getRemoteName(): string|null { return is_resource($this->stream) ? (stream_socket_get_name($this->stream, true) ?: null) : null; } /** * Get name of local socket, or null if not connected. * @return string|null */ public function getLocalName(): string|null { return is_resource($this->stream) ? (stream_socket_get_name($this->stream, false) ?: null) : null; } /** * Get type of stream resoucre. * @return string */ public function getResourceType(): string { return $this->stream ? get_resource_type($this->stream) : ''; } /** * If stream is in blocking mode. * @return bool|null */ public function isBlocking(): bool|null { return $this->getMetadata('blocked'); } /** * Toggle blocking/non-blocking mode. * @param bool $enable Blocking mode to set. * @return bool If operation was succesful. * @throws StreamException if stream is closed. */ public function setBlocking(bool $enable): bool { if (!isset($this->stream)) { throw new StreamException(StreamException::STREAM_DETACHED); } return stream_set_blocking($this->stream, $enable); } /** * If socket stream has unread content. * @return bool If there is content to read. * @throws StreamException if stream is unselectable. */ public function hasContents(): bool { if (!is_resource($this->stream)) { return false; } /** @throws StreamException */ return $this->handler->with(function () { $read = [$this->getOpenResource()]; $write = $oob = []; return stream_select($read, $write, $oob, 0, 0) > 0; }, new StreamException(StreamException::FAIL_SELECT)); } /** * Set timeout period on a stream. * @param int<0, max>|float $timeout Seconds to be set. * @param int|null $microseconds Microseconds to be set - deprecated * @return bool If operation was succesful. * @throws InvalidArgumentException if invalid timeout. * @throws StreamException if stream is closed. */ public function setTimeout(int|float $timeout, int|null $microseconds = null): bool { // @deprecated Setting $microseconds is deprecated, use float value on $timeout instead // @todo Add deprecation warning if ($timeout < 0) { throw new InvalidArgumentException("Timeout must be 0 or more."); } if (!isset($this->stream)) { throw new StreamException(StreamException::STREAM_DETACHED); } $seconds = intval($timeout); $microseconds = $microseconds ?? intval(round($timeout - $seconds, 6) * 1000000); return stream_set_timeout($this->stream, $seconds, $microseconds); } // ---------- Operations ------------------------------------------------------------------------------------------ /** * Read line from the stream. * @param int<0, max> $length Read up to $length bytes from the object and return them. * @return string|null Returns the data read from the stream, or null of eof. * @throws StreamException if an error occurs. */ public function readLine(int $length): string|null { $stream = $this->getOpenResource(); if (!$this->readable) { throw new StreamException(StreamException::NOT_READABLE); } /** @throws StreamException */ return $this->handler->with(function () use ($stream, $length) { $result = fgets($stream, $length); return $result === false ? null : $result; }, new StreamException(StreamException::FAIL_GETS)); } /** * Closes the stream for further reading. * @return void */ public function closeRead(): void { if (is_resource($this->stream)) { if ($this->readable && $this->writable) { stream_socket_shutdown($this->stream, STREAM_SHUT_RD); $this->evalStream(); } elseif (!$this->writable) { $this->close(); } } $this->readable = false; } /** * Closes the stream for further writing. * @return void */ public function closeWrite(): void { if ($this->readable && $this->writable) { stream_socket_shutdown($this->getOpenResource(), STREAM_SHUT_WR); $this->evalStream(); } elseif (!$this->readable) { $this->close(); } $this->writable = false; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/Stream.php000066400000000000000000000224041511205031700274420ustar00rootroot00000000000000 */ private static array $readmodes = ['r', 'r+', 'w+', 'a+', 'x+', 'c+']; /** @var array */ private static array $writemodes = ['r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+']; /** @var resource|null */ protected $stream; protected Context $context; protected ErrorHandler $handler; protected bool $readable = false; protected bool $writable = false; protected bool $seekable = false; /** * Create new stream wrapper instance * @param resource $stream A stream resource to wrap * @throws InvalidArgumentException If not a valid stream resource */ public function __construct($stream) { $type = gettype($stream); if ($type !== 'resource') { throw new InvalidArgumentException("Invalid stream provided; got type '{$type}'."); } $rtype = get_resource_type($stream); if (!in_array($rtype, ['stream', 'persistent stream'])) { throw new InvalidArgumentException("Invalid stream provided; got resource type '{$rtype}'."); } $this->stream = $stream; $this->context = new Context($this->stream); $this->handler = new ErrorHandler(); $this->evalStream(); } // ---------- PSR-7 methods --------------------------------------------------------------------------------------- /** * Closes the stream and any underlying resources. * @return void */ public function close(): void { if (is_resource($this->stream)) { fclose($this->stream); } $this->stream = null; $this->evalStream(); } /** * Separates any underlying resources from the stream. * After the stream has been detached, the stream is in an unusable state. * @return resource|null Underlying stream, if any */ public function detach(): mixed { if (!isset($this->stream)) { return null; } $stream = $this->stream; $this->stream = null; $this->evalStream(); return $stream; } /** * Get stream metadata as an associative array or retrieve a specific key. * @param string $key Specific metadata to retrieve. * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. */ public function getMetadata(string|null $key = null): mixed { if (!isset($this->stream)) { return null; } $meta = stream_get_meta_data($this->stream); if (isset($key)) { return array_key_exists($key, $meta) ? $meta[$key] : null; } return $meta; } /** * Returns the current position of the file read/write pointer * @return int Position of the file pointer * @throws StreamException on error. */ public function tell(): int { /** @throws StreamException */ return $this->handler->with(function () { return ftell($this->getOpenResource()); }, new StreamException(StreamException::FAIL_TELL)); } /** * Returns true if the stream is at the end of the stream. * @return bool */ public function eof(): bool { return empty($this->stream) || feof($this->stream); } /** * Read data from the stream. * @param int<1, max> $length Read up to $length bytes from the object and return them. * @return string Returns the data read from the stream, or an empty string. * @throws StreamException if an error occurs. */ public function read(int $length): string { if ($length < 1) { throw new InvalidArgumentException("Must read minimum 1 byte"); } $stream = $this->getOpenResource(); if (!$this->readable) { throw new StreamException(StreamException::NOT_READABLE); } /** @throws StreamException */ return $this->handler->with(function () use ($stream, $length) { return (string)fread($stream, $length); }, new StreamException(StreamException::FAIL_READ)); } /** * Write data to the stream. * @param string $string The string that is to be written. * @return int Returns the number of bytes written to the stream. * @throws StreamException on failure. */ public function write(string $string): int { $stream = $this->getOpenResource(); if (!$this->writable) { throw new StreamException(StreamException::NOT_WRITABLE); } /** @throws StreamException */ return $this->handler->with(function () use ($stream, $string) { return fwrite($stream, $string); }, new StreamException(StreamException::FAIL_WRITE)); } /** * Get the size of the stream if known. * @return int|null Returns the size in bytes if known, or null if unknown. */ public function getSize(): int|null { if (!is_resource($this->stream)) { return null; } $stats = fstat($this->stream); return $stats['size'] ?? null; } /** * Returns whether or not the stream is seekable. * @return bool */ public function isSeekable(): bool { return $this->seekable; } /** * Seek to a position in the stream. * @param int $offset Stream offset * @param int $whence Specifies how the cursor position will be calculated based on the seek offset. * @throws StreamException on failure. */ public function seek(int $offset, int $whence = SEEK_SET): void { $stream = $this->getOpenResource(); if (!$this->seekable) { throw new StreamException(StreamException::NOT_SEEKABLE); } $result = fseek($stream, $offset, $whence); if ($result !== 0) { throw new StreamException(StreamException::FAIL_SEEK); } } /** * Seek to the beginning of the stream. * If the stream is not seekable, this method will raise an exception; * otherwise, it will perform a seek(0). */ public function rewind(): void { $this->seek(0); } /** * Returns whether or not the stream is writable. * @return bool */ public function isWritable(): bool { return $this->writable; } /** * Returns whether or not the stream is readable. * @return bool */ public function isReadable(): bool { return $this->readable; } /** * Returns the remaining contents in a string * @return string * @throws StreamException if unable to read. * @throws StreamException if error occurs while reading. */ public function getContents(): string { $stream = $this->getOpenResource(); if (!$this->readable) { throw new StreamException(StreamException::NOT_READABLE); } /** @throws StreamException */ return $this->handler->with(function () use ($stream) { return stream_get_contents($stream); }, new StreamException(StreamException::FAIL_CONTENTS)); } /** * Reads all data from the stream into a string, from the beginning to end. * @return string */ public function __toString(): string { try { if ($this->isSeekable()) { $this->rewind(); } return $this->getContents(); } catch (Throwable $e) { trigger_error($e->getMessage(), E_USER_WARNING); return ''; } } // ---------- Extended methods ------------------------------------------------------------------------------------ /** * Return context for stream. * @return Context */ public function getContext(): Context { return $this->context; } /** * Return underlying resource. * @return resource|null */ public function getResource(): mixed { return $this->stream; } // ---------- Protected helper methods ---------------------------------------------------------------------------- /** * Evaluate stream state. */ protected function evalStream(): void { if ($this->stream && $meta = $this->getMetadata()) { $mode = substr($meta['mode'], 0, 2); $this->readable = in_array($mode, self::$readmodes); $this->writable = in_array($mode, self::$writemodes); $this->seekable = $meta['seekable']; return; } $this->readable = $this->writable = $this->seekable = false; } /** * Return underlying resource. * @return resource * @throws StreamException if closed. */ protected function getOpenResource(): mixed { if (!is_resource($this->stream)) { throw new StreamException(StreamException::STREAM_DETACHED); } return $this->stream; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/StreamCollection.php000066400000000000000000000133361511205031700314620ustar00rootroot00000000000000 */ class StreamCollection implements Countable, Iterator { protected ErrorHandler $handler; /** @var array */ private array $streams = []; /** * Create new stream collection instance. */ public function __construct() { $this->handler = new ErrorHandler(); } // ---------- Collectors and selectors ---------------------------------------------------------------------------- /** * Attach stream to collection. * @param Stream $attach Stream to attach. * @param string|null $key Definable name of stream. * @return string Name of stream. * @throws StreamException If already attached. */ public function attach(Stream $attach, string|null $key = null): string { if ($key && array_key_exists($key, $this->streams)) { throw new StreamException(StreamException::COLLECT_KEY_CONFLICT, ['key' => $key]); } $key = $key ?: $this->createKey(); $this->streams[$key] = $attach; return $key; } /** * Detach stream from collection. * @param Stream|string $detach Stream or name of stream to detach. * @return bool If a stream was detached. */ public function detach(Stream|string $detach): bool { if (is_string($detach)) { if (array_key_exists($detach, $this->streams)) { unset($this->streams[$detach]); return true; } } if ($detach instanceof Stream) { foreach ($this->streams as $key => $stream) { if ($stream === $detach) { unset($this->streams[$key]); return true; } } } return false; } /** * Collect all readable streams into new collection. * @return self New collection instance. */ public function getReadable(): self { $readables = new self(); foreach ($this->streams as $key => $stream) { if ($stream->isReadable()) { $readables->attach($stream, $key); } } return $readables; } /** * Collect all writable streams into new collection. * @return self New collection instance. */ public function getWritable(): self { $writables = new self(); foreach ($this->streams as $key => $stream) { if ($stream->isWritable()) { $writables->attach($stream, $key); } } return $writables; } /** * Wait for redable content in stream collection. * @param int<0, max>|float $timeout Timeout in seconds. * @return self New collection instance. * @throws InvalidArgumentException If invalid timeout. */ public function waitRead(int|float $timeout = 60): self { if ($timeout < 0) { throw new InvalidArgumentException("Timeout must be 0 or more."); } $seconds = intval($timeout); $microseconds = intval(round($timeout - $seconds, 6) * 1000000); $read = []; foreach ($this->streams as $key => $stream) { if ($stream->isReadable()) { $read[$key] = $stream->getResource(); } } if (empty($read)) { return new self(); // Nothing to select } $changed = $this->handler->with(function () use ($read, $seconds, $microseconds) { $write = $oob = []; /** @phpstan-ignore argument.type */ stream_select($read, $write, $oob, $seconds, $microseconds); return $read; }, function (ErrorException $error) { return []; // Ignore, but don't use result }); $ready = new self(); foreach ($changed as $key => $resource) { $ready->attach($this->streams[$key], $key); } return $ready; } // ---------- Countable interface implementation ------------------------------------------------------------------ /** * Count contained streams. * @return int Number of streams in collection. */ public function count(): int { return count($this->streams); } // ---------- Iterator interface implementation ------------------------------------------------------------------- /** * Return the current stream. * @return Stream|null Current stream. */ public function current(): Stream|null { return current($this->streams) ?: null; } /** * Return the key of the current stream. * @return string Current key. */ public function key(): string|null { return key($this->streams); } /** * Move forward to next stream. */ public function next(): void { next($this->streams); } /** * Rewind the Iterator to the first stream. */ public function rewind(): void { reset($this->streams); } /** * Checks if current position is valid. * @return bool True if valid. */ public function valid(): bool { return array_key_exists(key($this->streams) ?? -1, $this->streams); } // ---------- Protected helper methods ---------------------------------------------------------------------------- /** * Create unique key. * @return string Unique key. */ protected function createKey(): string { do { $key = bin2hex(random_bytes(16)); } while (array_key_exists($key, $this->streams)); return $key; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/StreamException.php000066400000000000000000000057331511205031700313270ustar00rootroot00000000000000 */ private static array $messages = [ self::STREAM_DETACHED => 'Stream is detached.', self::NOT_READABLE => 'Stream is not readable.', self::NOT_WRITABLE => 'Stream is not writable.', self::NOT_SEEKABLE => 'Stream is not seekable.', self::FAIL_READ => 'Failed read() on stream.', self::FAIL_WRITE => 'Failed write() on stream.', self::FAIL_SEEK => 'Failed seek() on stream.', self::FAIL_TELL => 'Failed tell() on stream.', self::FAIL_CONTENTS => 'Failed getContents() on stream.', self::FAIL_GETS => 'Failed gets() on stream.', self::FAIL_SELECT => 'Failed select() on stream.', self::CLIENT_CONNECT_ERR => 'Client could not connect to "{uri}".', self::SCHEME_TRANSPORT => 'Scheme "{scheme}" is not supported.', self::SCHEME_HANDLER => 'Could not handle scheme "{scheme}".', self::SERVER_SOCKET_ERR => 'Could not create socket for "{uri}".', self::SERVER_CLOSED => 'Server is closed.', self::SERVER_ACCEPT_ERR => 'Could not accept on socket.', self::COLLECT_KEY_CONFLICT => 'Stream with name "{key}" already attached.', self::COLLECT_SELECT_ERR => 'Failed to select streams for reading.', self::CONTEXT_SET_ERR => 'Failed to set option/param on context.', ]; /** * Create exception. * @param int $code Error code * @param array $data Additional data * @param Throwable|null $previous Previous exception */ public function __construct(int $code, array $data = [], Throwable|null $previous = null) { $message = self::$messages[$code]; foreach ($data as $key => $content) { $message = str_replace('{' . $key . '}', $content, $message); } if ($previous) { $message .= " ({$previous->getMessage()})"; } parent::__construct($message, $code, $previous); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-stream/src/StreamFactory.php000066400000000000000000000102421511205031700307670ustar00rootroot00000000000000 */ private static array $modes = ['r', 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+', 'e']; private ErrorHandler $handler; /** * Create new stream wrapper instance. */ public function __construct() { $this->handler = new ErrorHandler(); } // ---------- PSR-17 methods -------------------------------------------------------------------------------------- /** * Create a new stream from a string. * @param string $content String content with which to populate the stream. * @return Stream A stream instance. */ public function createStream(string $content = ''): Stream { $resource = $this->createResource('php://temp', 'r+'); fwrite($resource, $content); return $this->createStreamFromResource($resource); } /** * Create a stream from an existing file. * @param string $filename The filename or stream URI to use as basis of stream. * @param string $mode The mode with which to open the underlying filename/stream. * @throws InvalidArgumentException If the mode is invalid. * @return Stream A stream instance. */ public function createStreamFromFile(string $filename, string $mode = 'r'): Stream { if (!in_array($mode, self::$modes)) { throw new InvalidArgumentException("Invalid mode '{$mode}'."); } $resource = $this->createResource($filename, $mode); return $this->createStreamFromResource($resource); } /** * Create a new stream from an existing resource. * The stream MUST be readable and may be writable. * @param resource $resource The PHP resource to use as the basis for the stream. * @return Stream A stream instance. */ public function createStreamFromResource($resource): Stream { return new Stream($resource); } // ---------- Extensions ------------------------------------------------------------------------------------------ /** * Create a new socket client. * @param UriInterface $uri The URI to connect to. * @return SocketClient A socket client instance. */ public function createSocketClient(UriInterface $uri, Context|null $context = null): SocketClient { return new SocketClient($uri, $context); } /** * Create a new socket server. * @param UriInterface $uri The URI to create server on. * @return SocketServer A socket server instance. */ public function createSocketServer(UriInterface $uri, Context|null $context = null): SocketServer { return new SocketServer($uri, $context); } /** * Create a new ocket stream from an existing resource. * The stream MUST be readable and may be writable. * @param resource $resource The PHP resource to use as the basis for the stream. * @return SocketStream A socket stream instance. */ public function createSocketStreamFromResource($resource): SocketStream { return new SocketStream($resource); } /** * Create a new stream collection. * @return StreamCollection A stream collection. */ public function createStreamCollection(): StreamCollection { return new StreamCollection(); } // ---------- Helpers --------------------------------------------------------------------------------------------- /** * @return resource * @throws RuntimeException If fails to open resource */ private function createResource(string $filename, string $mode) { /** @throws RuntimeException */ return $this->handler->with(function () use ($filename, $mode) { /** @var resource $resource */ $resource = fopen($filename, $mode); return $resource; }, new RuntimeException("Could not open '{$filename}'.")); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-uri/000077500000000000000000000000001511205031700242115ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-uri/composer.json000066400000000000000000000020261511205031700267330ustar00rootroot00000000000000{ "name": "phrity/net-uri", "type": "library", "description": "PSR-7 Uri and PSR-17 UriFactory implementation", "homepage": "https://phrity.sirn.se/net-uri", "keywords": ["uri", "uri factory", "PSR-7", "PSR-17"], "license": "MIT", "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "Phrity\\Net\\": "src/" } }, "require": { "php": "^8.1", "ext-mbstring": "*", "phrity/comparison": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.1 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/util-errorhandler": "^1.1", "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-intl": "Enables IDN conversion for non-ASCII domains" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-uri/src/000077500000000000000000000000001511205031700250005ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-uri/src/Uri.php000066400000000000000000000565671511205031700262730ustar00rootroot00000000000000 Net > Uri * @see https://www.rfc-editor.org/rfc/rfc3986 * @see https://www.php-fig.org/psr/psr-7/#35-psrhttpmessageuriinterface */ namespace Phrity\Net; use InvalidArgumentException; use JsonSerializable; use Phrity\Comparison\{ Equalable, IncomparableException, }; use Psr\Http\Message\UriInterface; use Stringable; /** * Net\Uri class. */ class Uri implements Equalable, JsonSerializable, Stringable, UriInterface { public const REQUIRE_PORT = 1; // Always include port, explicit or default public const ABSOLUTE_PATH = 2; // Enforce absolute path public const NORMALIZE_PATH = 4; // Normalize path public const IDNA = 8; // @deprecated, replaced by IDN_ENCODE public const IDN_ENCODE = 16; // IDN-encode host public const IDN_DECODE = 32; // IDN-decode host public const URI_DECODE = 64; // Decoded URI public const URI_ENCODE = 128; // Minimal URI encoded public const URI_ENCODE_3986 = 256; // URI encoded RFC 3986 private const RE_MAIN = '!^(?P(?P[^:/?#]+):)?(?P//(?P[^/?#]*))?' . '(?P[^?#]*)(?P\?(?P[^#]*))?(?P#(?P.*))?$!'; private const RE_AUTH = '!^(?P(?P[^:/?#]+)(?P:(?P[^:/?#]+))?@)?' . '(?P[^:/?#]*|\[[^/?#]*\])(?P:(?P[0-9]*))?$!'; /** @var array $portDefaults */ private static array $portDefaults = [ 'acap' => 674, 'afp' => 548, 'dict' => 2628, 'dns' => 53, 'ftp' => 21, 'git' => 9418, 'gopher' => 70, 'http' => 80, 'https' => 443, 'imap' => 143, 'ipp' => 631, 'ipps' => 631, 'irc' => 194, 'ircs' => 6697, 'ldap' => 389, 'ldaps' => 636, 'mms' => 1755, 'msrp' => 2855, 'mtqp' => 1038, 'nfs' => 111, 'nntp' => 119, 'nntps' => 563, 'pop' => 110, 'prospero' => 1525, 'redis' => 6379, 'rsync' => 873, 'rtsp' => 554, 'rtsps' => 322, 'rtspu' => 5005, 'sftp' => 22, 'smb' => 445, 'snmp' => 161, 'ssh' => 22, 'svn' => 3690, 'telnet' => 23, 'ventrilo' => 3784, 'vnc' => 5900, 'wais' => 210, 'ws' => 80, 'wss' => 443, ]; private string $scheme = ''; private bool $authority = false; private string $host = ''; private int|null $port = null; private string $user = ''; private string|null $pass = null; private string $path = ''; private string $query = ''; private string $fragment = ''; /** * Create new URI instance using a string * @param string $uriString URI as string * @throws InvalidArgumentException If the given URI cannot be parsed */ public function __construct(string $uriString = '') { $this->parse($uriString); } // ---------- PSR-7 getters --------------------------------------------------------------------------------------- /** * Retrieve the scheme component of the URI. * @param int $flags Optional modifier flags * @return string The URI scheme */ public function getScheme(int $flags = 0): string { return $this->scheme; } /** * Retrieve the authority component of the URI. * @param int $flags Optional modifier flags * @return string The URI authority, in "[user-info@]host[:port]" format */ public function getAuthority(int $flags = 0): string { $host = $this->formatComponent($this->getHost($flags)); if ($host === '') { return ''; } $userinfo = $this->formatComponent($this->getUserInfo($flags), '', '@'); $port = $this->formatComponent($this->getPort($flags), ':'); return "{$userinfo}{$host}{$port}"; } /** * Retrieve the user information component of the URI. * @param int $flags Optional modifier flags * @return string The URI user information, in "username[:password]" format */ public function getUserInfo(int $flags = 0): string { $user = $this->formatComponent($this->uriEncode($this->user, $flags)); $pass = $this->formatComponent($this->uriEncode($this->pass ?? '', $flags), ':'); return $user === '' ? '' : "{$user}{$pass}"; } /** * Retrieve the host component of the URI. * @param int $flags Optional modifier flags * @return string The URI host */ public function getHost(int $flags = 0): string { if ($flags & self::IDNA) { trigger_error("Flag IDNA is deprecated; use IDN_ENCODE instead", E_USER_DEPRECATED); return $this->idnEncode($this->host); } if ($flags & self::IDN_ENCODE) { return $this->idnEncode($this->host); } if ($flags & self::IDN_DECODE) { return $this->idnDecode($this->host); } return $this->host; } /** * Retrieve the port component of the URI. * @param int $flags Optional modifier flags * @return null|int The URI port */ public function getPort(int $flags = 0): int|null { $default = self::$portDefaults[$this->scheme] ?? null; if ($flags & self::REQUIRE_PORT) { return $this->port !== null ? $this->port : $default; } return $this->port === $default ? null : $this->port; } /** * Retrieve the path component of the URI. * @param int $flags Optional modifier flags * @return string The URI path */ public function getPath(int $flags = 0): string { $path = $this->path; if ($flags & self::NORMALIZE_PATH) { $path = $this->normalizePath($path); } if ($flags & self::ABSOLUTE_PATH && substr($path, 0, 1) !== '/') { $path = "/{$path}"; } return $this->uriEncode($path, $flags, '\/:@'); } /** * Retrieve the query string of the URI. * @param int $flags Optional modifier flags * @return string The URI query string */ public function getQuery(int $flags = 0): string { return $this->uriEncode($this->query, $flags, '\/:@?'); } /** * Retrieve the fragment component of the URI. * @param int $flags Optional modifier flags * @return string The URI fragment */ public function getFragment(int $flags = 0): string { return $this->uriEncode($this->fragment, $flags, '\/:@?'); } // ---------- PSR-7 setters --------------------------------------------------------------------------------------- /** * Return an instance with the specified scheme. * @param string $scheme The scheme to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified scheme * @throws InvalidArgumentException for invalid schemes * @throws InvalidArgumentException for unsupported schemes */ public function withScheme(string $scheme, int $flags = 0): self { $clone = $this->clone($flags); $clone->setScheme($scheme, $flags); return $clone; } /** * Return an instance with the specified user information. * @param string $user The user name to use for authority * @param null|string $password The password associated with $user * @param int $flags Optional modifier flags * @return self A new instance with the specified user information */ public function withUserInfo(string $user, string|null $password = null, int $flags = 0): self { $clone = $this->clone($flags); $clone->setUserInfo($user, $password); return $clone; } /** * Return an instance with the specified host. * @param string $host The hostname to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified host * @throws InvalidArgumentException for invalid hostnames */ public function withHost(string $host, int $flags = 0): self { $clone = $this->clone($flags); $clone->setHost($host, $flags); return $clone; } /** * Return an instance with the specified port. * @param null|int $port The port to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified port * @throws InvalidArgumentException for invalid ports */ public function withPort(int|null $port, int $flags = 0): self { $clone = $this->clone($flags); $clone->setPort($port, $flags); return $clone; } /** * Return an instance with the specified path. * @param string $path The path to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified path * @throws InvalidArgumentException for invalid paths */ public function withPath(string $path, int $flags = 0): self { $clone = $this->clone($flags); $clone->setPath($path, $flags); return $clone; } /** * Return an instance with the specified query string. * @param string $query The query string to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified query string * @throws InvalidArgumentException for invalid query strings */ public function withQuery(string $query, int $flags = 0): self { $clone = $this->clone($flags); $clone->setQuery($query, $flags); return $clone; } /** * Return an instance with the specified URI fragment. * @param string $fragment The fragment to use with the new instance * @param int $flags Optional modifier flags * @return self A new instance with the specified fragment */ public function withFragment(string $fragment, int $flags = 0): self { $clone = $this->clone($flags); $clone->setFragment($fragment, $flags); return $clone; } // ---------- PSR-7 string & Stringable --------------------------------------------------------------------------- /** * Return the string representation as a URI reference. * @return string */ public function __toString(): string { return $this->toString(); } // ---------- JsonSerializable ------------------------------------------------------------------------------------ /** * Return JSON encode value as URI reference. * @return string */ public function jsonSerialize(): string { return $this->toString(); } // ---------- Equalable ------------------------------------------------------------------------------------------ /** * Return JSON encode value as URI reference. * @param UriInterface|string $compareWith * @return bool */ public function equals(mixed $compareWith): bool { if (!$compareWith instanceof UriInterface && !is_string($compareWith)) { throw new IncomparableException(sprintf("Can not compare with type '%s'", get_debug_type($compareWith))); } $flags = self::REQUIRE_PORT | self::NORMALIZE_PATH | self::IDN_ENCODE; $them = $compareWith instanceof self ? $compareWith : new self((string)$compareWith); return $this->toString($flags) == $them->toString($flags); } // ---------- Extensions ------------------------------------------------------------------------------------------ /** * Return the string representation as a URI reference. * @param int $flags Optional modifier flags * @param string $format Optional format specification * @return string */ public function toString(int $flags = 0, string $format = '{scheme}{authority}{path}{query}{fragment}'): string { $pathFlags = ($this->authority && $this->path ? self::ABSOLUTE_PATH : 0) | $flags; return str_replace([ '{scheme}', '{authority}', '{path}', '{query}', '{fragment}', ], [ $this->formatComponent($this->getScheme($flags), '', ':'), $this->authority ? "//{$this->formatComponent($this->getAuthority($flags))}" : '', $this->formatComponent($this->getPath($pathFlags)), $this->formatComponent($this->getQuery(), '?'), $this->formatComponent($this->getFragment(), '#'), ], $format); } /** * Get compontsns as array; as parse_url() method * @param int $flags Optional modifier flags * @return array */ public function getComponents(int $flags = 0): array { return array_filter([ 'scheme' => $this->getScheme($flags), 'host' => $this->getHost($flags), 'port' => $this->getPort($flags | self::REQUIRE_PORT), 'user' => $this->user, 'pass' => $this->pass, 'path' => $this->getPath($flags), 'query' => $this->getQuery($flags), 'fragment' => $this->getFragment($flags), ]); } /** * Return an instance with the specified compontents set. * @param array $components * @param int<0, 256> $flags * @return self A new instance with the specified components */ public function withComponents(array $components, int $flags = 0): self { $clone = $this->clone($flags); foreach ($components as $component => $value) { switch ($component) { case 'port': $clone->setPort($value, $flags); break; case 'scheme': $clone->setScheme($value, $flags); break; case 'host': $clone->setHost($value, $flags); break; case 'path': $clone->setPath($value, $flags); break; case 'query': $clone->setQuery($value, $flags); break; case 'fragment': $clone->setFragment($value, $flags); break; case 'userInfo': $clone->setUserInfo(...$value); break; default: throw new InvalidArgumentException("Invalid URI component: '{$component}'"); } } return $clone; } /** * Return all query items (if any) as associative array. * @param int $flags Optional modifier flags * @return array Query items */ public function getQueryItems(int $flags = 0): array { parse_str($this->getQuery(), $result); return $result; } /** * Return query item value for named query item, or null if not present. * @param string $name Name of query item to retrieve * @param int $flags Optional modifier flags * @return string|null|array Query item value */ public function getQueryItem(string $name, int $flags = 0): array|string|null { parse_str($this->getQuery(), $result); return $result[$name] ?? null; } /** * Add query items as associative array that will be merged qith current items. * @param array $items Array of query items to add * @param int $flags Optional modifier flags * @return self A new instance with the added query items */ public function withQueryItems(array $items, int $flags = 0): self { $clone = $this->clone($flags); $clone->setQuery(http_build_query( $this->queryMerge($this->getQueryItems($flags), $items), '', null, PHP_QUERY_RFC3986 ), $flags); return $clone; } /** * Add query item value for named query item * @param string $name Name of query item to add * @param string|null|array $value Value of query item to add * @param int $flags Optional modifier flags * @return self A new instance with the added query items */ public function withQueryItem(string $name, array|string|null $value, int $flags = 0): self { return $this->withQueryItems([$name => $value], $flags); } // ---------- Protected helper methods ---------------------------------------------------------------------------- protected function setPort(int|null $port, int $flags = 0): void { if ($port !== null && ($port < 0 || $port > 65535)) { throw new InvalidArgumentException("Invalid port '{$port}'"); } $this->port = $port; } protected function setScheme(string $scheme, int $flags = 0): void { $pattern = '/^[a-z][a-z0-9-+.]*$/i'; if ($scheme !== '' && preg_match($pattern, $scheme) == 0) { throw new InvalidArgumentException("Invalid scheme '{$scheme}': Should match {$pattern}"); } $this->scheme = mb_strtolower($scheme); } protected function setHost(string $host, int $flags = 0): void { $this->authority = $this->authority || $host !== ''; if ($flags & self::IDNA) { trigger_error("Flag IDNA is deprecated; use IDN_ENCODE instead", E_USER_DEPRECATED); $host = $this->idnEncode($host); } if ($flags & self::IDN_ENCODE) { $host = $this->idnEncode($host); } if ($flags & self::IDN_DECODE) { $host = $this->idnDecode($host); } $this->host = mb_strtolower($host); } protected function setPath(string $path, int $flags = 0): void { if ($flags & self::NORMALIZE_PATH) { $path = $this->normalizePath($path); } if ($flags & self::ABSOLUTE_PATH && substr($path, 0, 1) !== '/') { $path = "/{$path}"; } $this->path = $this->uriDecode($path); } protected function setQuery(string $query, int $flags = 0): void { $this->query = $this->uriDecode($query); } protected function setFragment(string $fragment, int $flags = 0): void { $this->fragment = $this->uriDecode($fragment); } protected function setUser(string $user, int $flags = 0): void { $this->user = $this->uriDecode($user); } protected function setPassword(string|null $pass, int $flags = 0): void { $this->pass = $pass === null ? null : $this->uriDecode($pass); } protected function setUserInfo(string $user = '', string|null $pass = null, int $flags = 0): void { $this->setUser($user); $this->setPassword($pass); } // ---------- Private helper methods ------------------------------------------------------------------------------ private function parse(string $uriString = ''): void { if ($uriString === '') { return; } preg_match(self::RE_MAIN, $uriString, $main); $this->authority = !empty($main['authorityc']); $this->setScheme($main['scheme'] ?? ''); $this->setPath($main['path'] ?? ''); $this->setQuery($main['query'] ?? ''); $this->setFragment($main['fragment'] ?? ''); if ($this->authority && !empty($main['authority'])) { preg_match(self::RE_AUTH, $main['authority'], $auth); if (empty($auth)) { throw new InvalidArgumentException("Invalid 'authority'."); } if ($auth['host'] === '' && $auth['user'] !== '') { throw new InvalidArgumentException("Invalid 'authority'."); } $this->setUser($auth['user'] ?? ''); $this->setPassword($auth['pass'] ?? null); $this->setHost($auth['host'] ?? ''); $this->setPort(isset($auth['port']) ? (int)$auth['port'] : null); } } private function clone(int $flags = 0): self { $clone = clone $this; if ($flags & self::REQUIRE_PORT) { $clone->setPort($this->getPort(self::REQUIRE_PORT), $flags); } return $clone; } private function uriEncode(string $source, int $flags = 0, string $keep = ''): string { if ($flags & self::URI_DECODE) { return $source; } $unreserved = 'a-zA-Z0-9_\-\.~'; $subdelim = '!\$&\'\(\)\*\+,;='; $char = '\pL'; $pct = '%(?![A-Fa-f0-9]{2}))'; $re = "/(?:[^%{$unreserved}{$subdelim}{$keep}]+|{$pct}/u"; if ($flags & self::URI_ENCODE) { $re = "/(?:[^%{$unreserved}{$subdelim}{$keep}{$char}]+|{$pct}/u"; } return preg_replace_callback($re, function ($matches) { return rawurlencode($matches[0]); }, $source) ?? $source; } private function uriDecode(string $source): string { $re = "/(%[A-Fa-f0-9]{2})/u"; return preg_replace_callback($re, function ($matches) { return rawurldecode($matches[0]); }, $source) ?? $source; } private function formatComponent(string|int|null $value, string $before = '', string $after = ''): string { $string = strval($value); return $string === '' ? '' : "{$before}{$string}{$after}"; } private function normalizePath(string $path): string { $result = []; preg_match_all('!([^/]*/|[^/]*$)!', $path, $items); foreach ($items[0] as $item) { switch ($item) { case '': case './': case '.': break; // just skip case '/': if (empty($result)) { array_push($result, $item); // add } break; case '..': case '../': if (empty($result) || end($result) == '../') { array_push($result, $item); // add } else { array_pop($result); // remove previous } break; default: array_push($result, $item); // add } } return implode('', $result); } private function idnEncode(string $value): string { if ($value === '' || !function_exists('idn_to_ascii')) { return $value; // Can't convert, but don't cause exception } return idn_to_ascii($value, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46) ?: $value; } private function idnDecode(string $value): string { if ($value === '' || !function_exists('idn_to_utf8')) { return $value; // Can't convert, but don't cause exception } return idn_to_utf8($value, IDNA_NONTRANSITIONAL_TO_UNICODE, INTL_IDNA_VARIANT_UTS46) ?: $value; } /** * @param array $a * @param array $b * @return array */ private function queryMerge(array $a, array $b): array { foreach ($b as $key => $value) { if (is_int($key)) { $a[] = $value; } elseif (is_array($value)) { $a[$key] = $this->queryMerge($a[$key] ?? [], $b[$key] ?? []); } elseif (is_scalar($value)) { $a[$key] = $this->uriDecode($b[$key]); } else { unset($a[$key]); } } return $a; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/net-uri/src/UriFactory.php000066400000000000000000000023211511205031700275760ustar00rootroot00000000000000 Net > Uri * @see https://www.rfc-editor.org/rfc/rfc3986 * @see https://www.php-fig.org/psr/psr-17/#26-urifactoryinterface */ namespace Phrity\Net; use InvalidArgumentException; use Psr\Http\Message\{ UriFactoryInterface, UriInterface }; /** * Net\UriFactory class. */ class UriFactory implements UriFactoryInterface { // ---------- PSR-7 methods --------------------------------------------------------------------------------------- /** * Create a new URI. * @param string $uri The URI to parse. * @throws InvalidArgumentException If the given URI cannot be parsed */ public function createUri(string $uri = ''): UriInterface { return new Uri($uri); } // ---------- Extensions ------------------------------------------------------------------------------------------ /** * Create a new URI from existing. * @param UriInterface $uri A URI instance to create from. * @throws InvalidArgumentException If the given URI cannot be parsed */ public function createUriFromInterface(UriInterface $uri): UriInterface { return new Uri($uri->__toString()); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/util-errorhandler/000077500000000000000000000000001511205031700262705ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/util-errorhandler/composer.json000066400000000000000000000015661511205031700310220ustar00rootroot00000000000000{ "name": "phrity/util-errorhandler", "type": "library", "description": "Inline error handler; catch and resolve errors for code block.", "homepage": "https://phrity.sirn.se/util-errorhandler", "keywords": ["error", "warning"], "license": "MIT", "authors": [ { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "Phrity\\Util\\": "src/" } }, "autoload-dev": { "psr-4": { "Phrity\\Util\\Tests\\": "tests/" } }, "require": { "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "squizlabs/php_codesniffer": "^3.5" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/util-errorhandler/src/000077500000000000000000000000001511205031700270575ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/util-errorhandler/src/ErrorHandler.php000066400000000000000000000105771511205031700321710ustar00rootroot00000000000000 Util > ErrorHandler */ namespace Phrity\Util; use Closure; use ErrorException; use Throwable; /** * ErrorHandler utility class. * Allows catching and resolving errors inline. */ class ErrorHandler { /* ----------------- Public methods ---------------------------------------------- */ /** * Set error handler to run until removed. * @param Closure|Throwable|null $handling * - If null, handler will throw ErrorException * - If Throwable $t, throw $t with ErrorException attached as previous * - If callable, will invoke callback with ErrorException as argument * @param int $levels Error levels to catch, all errors by default * @return (callable(): mixed)|null Previously registered error handler, if any */ public function set(Closure|Throwable|null $handling = null, int $levels = E_ALL): callable|null { return set_error_handler($this->getHandler($handling), $levels); } /** * Remove error handler. * @return bool True if removed */ public function restore(): bool { return restore_error_handler(); } /** * Run code with error handling, breaks on first encountered error. * @param callable $callback The code to run * @param Closure|Throwable|null $handling * - If null, handler will throw ErrorException * - If Throwable $t, throw $t with ErrorException attached as previous * - If callable, will invoke callback with ErrorException as argument * @param int $levels Error levels to catch, all errors by default * @return mixed Return what $callback returns, or what $handling retuns on error */ public function with(callable $callback, Closure|Throwable|null $handling = null, int $levels = E_ALL): mixed { $error = null; $result = null; try { $this->set(null, $levels); $result = $callback(); } catch (ErrorException $e) { $error = $this->handle($handling, $e); } finally { $this->restore(); } return $error ?? $result; } /** * Run code with error handling, comletes code before handling errors * @param callable $callback The code to run * @param Closure|Throwable|null $handling * - If null, handler will throw ErrorException * - If Throwable $t, throw $t with ErrorException attached as previous * - If callable, will invoke callback with ErrorException as argument * @param int $levels Error levels to catch, all errors by default * @return mixed Return what $callback returns, or what $handling retuns on error */ public function withAll(callable $callback, Closure|Throwable|null $handling = null, int $levels = E_ALL): mixed { $errors = []; $this->set(function (ErrorException $e) use (&$errors) { $errors[] = $e; }, $levels); $result = $callback(); $this->restore(); $error = empty($errors) ? null : $this->handle($handling, $errors, $result); return $error ?? $result; } /* ----------------- Private helpers --------------------------------------------- */ // Get handler function private function getHandler(Closure|Throwable|null $handling): Closure { return function ($severity, $message, $file, $line) use ($handling) { $error = new ErrorException($message, 0, $severity, $file, $line); $this->handle($handling, $error); }; } /** * Handle error according to $handlig type * @param Closure|Throwable|null $handling * @param ErrorException|non-empty-array $error * @mixed $result * @return mixed * @throws Throwable */ private function handle(Closure|Throwable|null $handling, ErrorException|array $error, mixed $result = null): mixed { if (is_callable($handling)) { return $handling($error, $result); } if (is_array($error)) { $error = array_shift($error); } if ($handling instanceof Throwable) { try { /* @phpstan-ignore finally.exitPoint */ throw $error; } finally { /* @phpstan-ignore finally.exitPoint */ throw $handling; } } throw $error; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/000077500000000000000000000000001511205031700246145ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/LICENSE.md000066400000000000000000000015161511205031700262230ustar00rootroot00000000000000# Websocket: License Websocket PHP is free software released under the following license: [ISC License](http://en.wikipedia.org/wiki/ISC_license) Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/composer.json000066400000000000000000000025661511205031700273470ustar00rootroot00000000000000{ "name": "phrity/websocket", "type": "library", "description": "WebSocket client and server", "homepage": "https://phrity.sirn.se/websocket", "keywords": ["websocket", "client", "server"], "license": "ISC", "authors": [ { "name": "Fredrik Liljegren" }, { "name": "Sören Jensen", "email": "sirn@sirn.se", "homepage": "https://phrity.sirn.se" } ], "autoload": { "psr-4": { "WebSocket\\": "src/" } }, "autoload-dev": { "psr-4": { "WebSocket\\Test\\": "tests/mock/" } }, "require": { "php": "^8.1", "phrity/http": "^1.0", "phrity/net-uri": "^2.1", "phrity/net-stream": "^2.3", "psr/http-message": "^1.1 | ^2.0", "psr/log": "^1.0 | ^2.0 | ^3.0" }, "require-dev": { "guzzlehttp/psr7": "^2.0", "php-coveralls/php-coveralls": "^2.0", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.0 | ^11.0 | ^12.0", "phrity/logger-console": "^1.0", "phrity/net-mock": "^2.3", "phrity/util-errorhandler": "^1.1", "robiningelbrecht/phpunit-coverage-tools": "^1.9", "squizlabs/php_codesniffer": "^3.5" }, "suggests": { "ext-zlib": "Required for per-message deflate compression" } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/docu.json000066400000000000000000000057441511205031700264530ustar00rootroot00000000000000[ { "name": "Overview", "source": "README.md" }, { "name": "Entry points", "content": [ { "name": "Client", "source": "docs/Client.md" }, { "name": "Server", "source": "docs/Server.md" }, ], "name": "Resources", "content": [ { "name": "Connection", "source": "docs/Connection.md" }, { "name": "Listener", "source": "docs/Listener.md" }, { "name": "Message", "source": "docs/Message.md" }, { "name": "Middleware", "source": "docs/Middleware.md", "content": [ { "name": "Callback", "source": "docs/Middleware/Callback.md" }, { "name": "Close Handler", "source": "docs/Middleware/CloseHandler.md" }, { "name": "Compression Extension", "source": "docs/Middleware/CompressionExtension.md" }, { "name": "Follow Redirect", "source": "docs/Middleware/FollowRedirect.md" }, { "name": "Ping Interval", "source": "docs/Middleware/PingInterval.md" }, { "name": "Ping Responder", "source": "docs/Middleware/PingResponder.md" }, { "name": "Subprotocol Negotiation", "source": "docs/Middleware/SubprotocolNegotiation.md" }, { "name": "Creating your own middleware", "source": "docs/Middleware/Creating.md" }, ] }, ], "name": "Developer resources", "content": [ { "name": "Changelog", "source": "docs/Changelog.md" }, { "name": "Contributing", "source": "docs/Contributing.md" }, { "name": "Examples", "source": "docs/Examples.md" }, { "name": "Class synopsis", "source": "docs/Class_Synopsis.md" }, ], "name": "Migration", "content": [ { "name": "Migration v2 -> v3", "source": "docs/Migrate_2_3.md" }, ] }, { "name": "License", "source": "LICENSE.md" } ]icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/000077500000000000000000000000001511205031700254035ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Client.php000066400000000000000000000501551511205031700273400ustar00rootroot00000000000000 */ use ListenerTrait; use LoggerAwareTrait; use SendMethodsTrait; use StringableTrait; // Settings /** @var int<0, max>|float $timeout */ private int|float $timeout = 60; /** @var int<1, max> $frameSize */ private int $frameSize = 4096; private bool $persistent = false; private Context $context; /** @var array $headers */ private array $headers = []; // Internal resources private StreamFactory $streamFactory; private Uri $socketUri; private Connection|null $connection = null; /** @var array $middlewares */ private array $middlewares = []; private StreamCollection|null $streams = null; private bool $running = false; private HttpFactory $httpFactory; /* ---------- Magic methods ------------------------------------------------------------------------------------ */ /** * @param UriInterface|string $uri A ws/wss-URI */ public function __construct(UriInterface|string $uri) { $this->socketUri = $this->parseUri($uri); $this->initLogger(); $this->context = new Context(); $this->setStreamFactory(new StreamFactory()); $this->httpFactory = new DefaultHttpFactory(); } /** * Get string representation of instance. * @return string String representation */ public function __toString(): string { return $this->stringable('%s', $this->connection ? $this->socketUri->__toString() : 'closed'); } /* ---------- Configuration ------------------------------------------------------------------------------------ */ /** * Set stream factory to use. * @param StreamFactory $streamFactory * @return self */ public function setStreamFactory(StreamFactory $streamFactory): self { $this->streamFactory = $streamFactory; return $this; } /** * Set HTTP factory to use. * @param HttpFactory $httpFactory * @return self */ public function setHttpFactory(HttpFactory $httpFactory): self { $this->httpFactory = $httpFactory; return $this; } /** * Set logger. * @param LoggerInterface $logger Logger implementation */ public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; if ($this->connection) { $this->connection->setLogger($this->logger); } } /** * Set timeout. * @param int<0, max>|float $timeout Timeout in seconds * @return self * @throws InvalidArgumentException If invalid timeout provided */ public function setTimeout(int|float $timeout): self { if ($timeout < 0) { throw new InvalidArgumentException("Invalid timeout '{$timeout}' provided"); } $this->timeout = $timeout; if ($this->connection) { $this->connection->setTimeout($timeout); } return $this; } /** * Get timeout. * @return int<0, max>|float Timeout in seconds */ public function getTimeout(): int|float { return $this->timeout; } /** * Set frame size. * @param int<1, max> $frameSize Max frame payload size in bytes * @return self * @throws InvalidArgumentException If invalid frameSize provided */ public function setFrameSize(int $frameSize): self { if ($frameSize < 1) { throw new InvalidArgumentException("Invalid frameSize '{$frameSize}' provided"); } $this->frameSize = $frameSize; if ($this->connection) { $this->connection->setFrameSize($frameSize); } return $this; } /** * Get frame size. * @return int Frame size in bytes */ public function getFrameSize(): int { return $this->frameSize; } /** * Set connection persistence. * @param bool $persistent True for persistent connection. * @return self */ public function setPersistent(bool $persistent): self { $this->persistent = $persistent; return $this; } /** * Set stream context. * @param Context|array $context Context or options as array * @see https://www.php.net/manual/en/context.php * @return self */ public function setContext(Context|array $context): self { if ($context instanceof Context) { $this->context = $context; } else { $this->context->setOptions($context); trigger_error('Calling Client.setContext with array is deprecated, use Context class.', E_USER_DEPRECATED); } return $this; } /** * Get current stream context. * @return Context */ public function getContext(): Context { return $this->context; } /** * Add header for handshake. * @param string $name Header name * @param string $content Header content * @return self */ public function addHeader(string $name, string $content): self { $this->headers[$name] = $content; return $this; } /** * Add a middleware. * @param MiddlewareInterface $middleware * @return self */ public function addMiddleware(MiddlewareInterface $middleware): self { $this->middlewares[] = $middleware; if ($this->connection) { $this->connection->addMiddleware($middleware); } return $this; } /* ---------- Messaging operations ----------------------------------------------------------------------------- */ /** * Send message. * @template T of Message * @param T $message * @return T */ public function send(Message $message): Message { return $this->connection()->pushMessage($message); } /** * Receive message. * Note that this operation will block reading. * @return Message */ public function receive(): Message { return $this->connection()->pullMessage(); } /* ---------- Listener operations ------------------------------------------------------------------------------ */ /** * Start client listener. * @throws ExceptionInterface On high level error * @throws Throwable On low level error */ public function start(int|float|null $timeout = null): void { // Check if running if ($this->running) { $this->logger->warning("[client] Client is already running"); return; } $this->running = true; $reconnect = false; $this->logger->info("[client] Client is running"); $connection = $this->connection(); // Run handler while ($this->running) { /** @var StreamCollection */ $streams = $this->streams; try { // Get streams with readable content $readables = $streams->waitRead($timeout ?? $this->timeout); foreach ($readables as $key => $readable) { try { // Read from connection $message = $connection->pullMessage(); $this->dispatch($message->getOpcode(), [$this, $connection, $message]); } catch (MessageLevelInterface $e) { // Error, but keep connection open $this->logger->error("[client] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } catch (ConnectionLevelInterface $e) { // Error, disconnect connection $this->disconnect(); $this->logger->error("[client] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } } if (!$connection->isConnected()) { $this->running = false; } $connection->tick(); $this->dispatch('tick', [$this]); } catch (CloseException $e) { // Close connection $connection->close($e->getCloseStatus(), $e->getMessage()); $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } catch (ReconnectException $e) { // Reconnect connection $reconnect = true; if ($uri = $e->getUri()) { $this->socketUri = $uri; } $connection->close(); $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } catch (ExceptionInterface $e) { $this->disconnect(); $this->running = false; // Low-level error $this->logger->error("[client] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, null, $e]); } catch (Throwable $e) { $this->disconnect(); $this->running = false; // Crash it $this->logger->error("[client] {$e->getMessage()}", ['exception' => $e]); throw $e; } gc_collect_cycles(); // Collect garbage if ($reconnect && !$connection->isConnected()) { $reconnect = false; $this->running = true; } } } /** * Stop client listener (resumable). */ public function stop(): void { $this->running = false; $this->logger->info("[client] Client is stopped"); } /** * If client is running (accepting messages). * @return bool */ public function isRunning(): bool { return $this->running; } /* ---------- Connection management ---------------------------------------------------------------------------- */ /** * If Client has active connection. * @return bool True if active connection. */ public function isConnected(): bool { return $this->connection && $this->connection->isConnected(); } /** * If Client is readable. * @return bool */ public function isReadable(): bool { return $this->connection && $this->connection->isReadable(); } /** * If Client is writable. * @return bool */ public function isWritable(): bool { return $this->connection && $this->connection->isWritable(); } /** * Connect to server and perform upgrade. * @throws ClientException On failed connection */ public function connect(): void { $this->disconnect(); $this->streams = $this->streamFactory->createStreamCollection(); $hostUri = (new Uri()) ->withScheme(match ($this->socketUri->getScheme()) { 'ws', 'http' => 'tcp', 'wss', 'https' => 'ssl', default => throw new ClientException("Invalid socket scheme: {$this->socketUri->getScheme()}") }) ->withHost($this->socketUri->getHost(Uri::IDN_ENCODE)) ->withPort($this->socketUri->getPort(Uri::REQUIRE_PORT)); $stream = null; try { $client = $this->streamFactory->createSocketClient($hostUri, $this->context); $client->setPersistent($this->persistent); $client->setTimeout($this->timeout); $stream = $client->connect(); } catch (Throwable $e) { $error = "Could not open socket to \"{$hostUri}\": {$e->getMessage()}"; $this->logger->error("[client] {$error}", ['exception' => $e]); throw new ClientException($error); } $name = $stream->getRemoteName(); $this->streams->attach($stream, $name); $this->connection = new Connection( $stream, true, false, $hostUri->getScheme() === 'ssl', $this->httpFactory ); $this->connection->setFrameSize($this->frameSize); $this->connection->setTimeout($this->timeout); $this->connection->setLogger($this->logger); foreach ($this->middlewares as $middleware) { $this->connection->addMiddleware($middleware); } if (!$this->isConnected()) { $error = "Invalid stream on \"{$hostUri}\"."; $this->logger->error("[client] {$error}"); throw new ClientException($error); } try { if (!$this->persistent || $stream->tell() == 0) { /** @throws ReconnectException */ $response = $this->performHandshake($this->socketUri, $this->connection); } } catch (ReconnectException $e) { $this->logger->info("[client] {$e->getMessage()}", ['exception' => $e]); if ($uri = $e->getUri()) { $this->socketUri = $uri; } $this->connect(); return; } $this->logger->info("[client] Client connected to {$this->socketUri}"); $this->dispatch('handshake', [ $this, $this->connection, $this->connection->getHandshakeRequest(), $this->connection->getHandshakeResponse(), ]); $this->dispatch('connect', [$this, $this->connection, $this->connection?->getHandshakeResponse()]); } /** * Disconnect from server. */ public function disconnect(): void { if ($this->connection && $this->isConnected()) { $this->connection->disconnect(); $this->logger->info('[client] Client disconnected'); $this->dispatch('disconnect', [$this, $this->connection]); } } /* ---------- Connection wrapper methods ----------------------------------------------------------------------- */ /** * Get name of local socket, or null if not connected. * @return string|null */ public function getName(): string|null { return $this->isConnected() ? $this->connection?->getName() : null; } /** * Get name of remote socket, or null if not connected. * @return string|null */ public function getRemoteName(): string|null { return $this->isConnected() ? $this->connection?->getRemoteName() : null; } /** * Get meta value on connection. * @param string $key Meta key * @return mixed Meta value * @deprecated Will be removed in v4 */ public function getMeta(string $key): mixed { trigger_error('Client.getMeta is deprecated and will be removed in v4.', E_USER_DEPRECATED); return $this->isConnected() ? $this->connection?->getMeta($key) : null; } /** * Get Response for handshake procedure. * @return ResponseInterface|null Handshake. */ public function getHandshakeResponse(): ResponseInterface|null { return $this->connection ? $this->connection->getHandshakeResponse() : null; } /* ---------- Internal helper methods -------------------------------------------------------------------------- */ /** * Perform upgrade handshake on new connections. * @throws HandshakeException On failed handshake */ protected function performHandshake(Uri $uri, Connection $connection): ResponseInterface { // Generate the WebSocket key. $key = $this->generateKey(); $request = $this->httpFactory->createRequest('GET', $uri); $request = $request ->withHeader('User-Agent', 'websocket-client-php') ->withHeader('Connection', 'Upgrade') ->withHeader('Upgrade', 'websocket') ->withHeader('Sec-WebSocket-Key', $key) ->withHeader('Sec-WebSocket-Version', '13'); // Handle basic authentication. if ($userinfo = $uri->getUserInfo(Uri::URI_DECODE)) { $request = $request->withHeader('Authorization', 'Basic ' . base64_encode($userinfo)); } // Add and override with headers. foreach ($this->headers as $name => $content) { $request = $request->withHeader($name, $content); } try { /** @var RequestInterface */ $request = $connection->pushHttp($request); /** @var ResponseInterface */ $response = $connection->pullHttp(); if ($response->getStatusCode() != 101) { throw new HandshakeException("Invalid status code {$response->getStatusCode()}.", $response); } if (empty($response->getHeaderLine('Sec-WebSocket-Accept'))) { throw new HandshakeException( "Connection to '{$uri}' failed: Server sent invalid upgrade response.", $response ); } $responseKey = trim($response->getHeaderLine('Sec-WebSocket-Accept')); $expectedKey = base64_encode( pack('H*', sha1($key . Constant::GUID)) ); if ($responseKey !== $expectedKey) { throw new HandshakeException("Server sent bad upgrade response.", $response); } } catch (HandshakeException $e) { $this->logger->error("[client] {$e->getMessage()}", ['exception' => $e]); throw $e; } $this->logger->debug("[client] Handshake on {$uri->getPath()}"); $connection->setHandshakeRequest($request); $connection->setHandshakeResponse($response); return $response; } /** * Generate a random string for WebSocket key. * @return string Random string */ protected function generateKey(): string { $key = ''; for ($i = 0; $i < 16; $i++) { $key .= chr(rand(33, 126)); } return base64_encode($key); } /** * Ensure URI instance to use in client. * @param UriInterface|string $uri A ws/wss-URI * @return Uri * @throws BadUriException On invalid URI */ protected function parseUri(UriInterface|string $uri): Uri { try { if ($uri instanceof Uri) { $uriInstance = $uri; } elseif ($uri instanceof UriInterface) { $uriInstance = new Uri("{$uri}"); } else { $uriInstance = new Uri($uri); } } catch (InvalidArgumentException $e) { throw new BadUriException("Invalid URI '{$uri}' provided."); } if (!in_array($uriInstance->getScheme(), ['ws', 'wss'])) { throw new BadUriException("Invalid URI scheme, must be 'ws' or 'wss'."); } if (!$uriInstance->getHost()) { throw new BadUriException("Invalid URI host."); } return $uriInstance; } protected function connection(): Connection { if (!$this->isConnected()) { $this->connect(); } /** @var Connection */ $connection = $this->connection; return $connection; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Connection.php000066400000000000000000000270101511205031700302130ustar00rootroot00000000000000 $frameSize */ private int $frameSize = 4096; /** @var int<0, max>|float $timeout */ private int|float $timeout = 60; private string $localName; private string $remoteName; private RequestInterface|null $handshakeRequest = null; private ResponseInterface|null $handshakeResponse = null; /** @var array $meta */ private array $meta = []; private bool $closed = false; /* ---------- Magic methods ------------------------------------------------------------------------------------ */ public function __construct( SocketStream $stream, bool $pushMasked, bool $pullMaskedRequired, bool $ssl = false, HttpFactory|null $httpFactory = null ) { $this->stream = $stream; $this->httpHandler = new HttpHandler($this->stream, $ssl, $httpFactory); $this->messageHandler = new MessageHandler(new FrameHandler($this->stream, $pushMasked, $pullMaskedRequired)); $this->middlewareHandler = new MiddlewareHandler($this->messageHandler, $this->httpHandler); $this->localName = $this->stream->getLocalName() ?? ''; $this->remoteName = $this->stream->getRemoteName() ?? ''; $this->initLogger(); } public function __destruct() { if (!$this->closed && $this->isConnected()) { $this->stream->close(); } } public function __toString(): string { return $this->stringable('%s:%s', $this->localName, $this->remoteName); } /* ---------- Configuration ------------------------------------------------------------------------------------ */ /** * Set logger. * @param LoggerInterface $logger Logger implementation */ public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; $this->messageHandler->setLogger($logger); $this->middlewareHandler->setLogger($logger); $this->logger->debug("[connection] Setting logger: " . get_class($logger)); } /** * Set time out on connection. * @param int<0, max>|float $timeout Timeout part in seconds * @return self * @throws InvalidArgumentException */ public function setTimeout(int|float $timeout): self { if ($timeout < 0) { throw new InvalidArgumentException("Invalid timeout '{$timeout}' provided"); } $this->timeout = $timeout; $this->stream->setTimeout($timeout); $this->logger->debug("[connection] Setting timeout: {$timeout} seconds"); return $this; } /** * Get timeout. * @return int<0, max>|float Timeout in seconds. */ public function getTimeout(): int|float { return $this->timeout; } /** * Set frame size. * @param int<1, max> $frameSize Frame size in bytes. * @return self * @throws InvalidArgumentException */ public function setFrameSize(int $frameSize): self { if ($frameSize < 1) { throw new InvalidArgumentException("Invalid frameSize '{$frameSize}' provided"); } $this->frameSize = $frameSize; return $this; } /** * Get frame size. * @return int<1, max> Frame size in bytes */ public function getFrameSize(): int { return max(1, $this->frameSize); } /** * Get current stream context. * @return Context */ public function getContext(): Context { return $this->stream->getContext(); } /** * Add a middleware. * @param MiddlewareInterface $middleware * @return self */ public function addMiddleware(MiddlewareInterface $middleware): self { $this->middlewareHandler->add($middleware); $this->logger->debug("[connection] Added middleware: {$middleware}"); return $this; } /* ---------- Connection management ---------------------------------------------------------------------------- */ /** * If connected to stream. * @return bool */ public function isConnected(): bool { return $this->stream->isConnected(); } /** * If connection is readable. * @return bool */ public function isReadable(): bool { return $this->stream->isReadable(); } /** * If connection is writable. * @return bool */ public function isWritable(): bool { return $this->stream->isWritable(); } /** * Close connection stream. * @return self */ public function disconnect(): self { $this->logger->info('[connection] Closing connection'); $this->stream->close(); $this->closed = true; return $this; } /** * Close connection stream reading. * @return self */ public function closeRead(): self { $this->logger->info('[connection] Closing further reading'); $this->stream->closeRead(); return $this; } /** * Close connection stream writing. * @return self */ public function closeWrite(): self { $this->logger->info('[connection] Closing further writing'); $this->stream->closeWrite(); return $this; } /* ---------- Connection state --------------------------------------------------------------------------------- */ /** * Get name of local socket, or null if not connected. * @return string|null */ public function getName(): string|null { return $this->localName; } /** * Get name of remote socket, or null if not connected. * @return string|null */ public function getRemoteName(): string|null { return $this->remoteName; } /** * Set meta value on connection. * @param string $key Meta key * @param mixed $value Meta value */ public function setMeta(string $key, mixed $value): void { $this->meta[$key] = $value; } /** * Get meta value on connection. * @param string $key Meta key * @return mixed Meta value */ public function getMeta(string $key): mixed { return $this->meta[$key] ?? null; } /** * Tick operation on connection. */ public function tick(): void { $this->middlewareHandler->processTick($this); } /* ---------- WebSocket Message methods ------------------------------------------------------------------------ */ /** * Send message. * @template T of Message * @param T $message * @return T */ public function send(Message $message): Message { return $this->pushMessage($message); } /** * Push a message to stream. * @template T of Message * @param T $message * @return T */ public function pushMessage(Message $message): Message { try { /** @throws Throwable */ return $this->middlewareHandler->processOutgoing($this, $message); } catch (Throwable $e) { $this->throwException($e); } } /** * Pull a message from stream * @throws ExceptionInterface */ public function pullMessage(): Message { try { /** @throws Throwable */ return $this->middlewareHandler->processIncoming($this); } catch (Throwable $e) { $this->throwException($e); } } /* ---------- HTTP Message methods ----------------------------------------------------------------------------- */ public function pushHttp(MessageInterface $message): MessageInterface { try { /** @throws Throwable */ return $this->middlewareHandler->processHttpOutgoing($this, $message); } catch (Throwable $e) { $this->throwException($e); } } public function pullHttp(): MessageInterface { try { /** @throws Throwable */ return $this->middlewareHandler->processHttpIncoming($this); } catch (Throwable $e) { $this->throwException($e); } } public function setHandshakeRequest(RequestInterface $request): self { $this->handshakeRequest = $request; return $this; } public function getHandshakeRequest(): RequestInterface|null { return $this->handshakeRequest; } public function setHandshakeResponse(ResponseInterface $response): self { $this->handshakeResponse = $response; return $this; } public function getHandshakeResponse(): ResponseInterface|null { return $this->handshakeResponse; } /* ---------- Internal helper methods -------------------------------------------------------------------------- */ /** * @throws ReconnectException * @throws ExceptionInterface * @throws ConnectionTimeoutException * @throws ConnectionClosedException * @throws ConnectionFailureException */ protected function throwException(Throwable $e): never { // Internal exceptions are handled and re-thrown if ($e instanceof ReconnectException) { $this->logger->info("[connection] {$e->getMessage()}", ['exception' => $e]); throw $e; } if ($e instanceof ExceptionInterface) { $this->logger->error("[connection] {$e->getMessage()}", ['exception' => $e]); throw $e; } // External exceptions are converted to internal if ($this->isConnected()) { $meta = $this->stream->getMetadata(); $json = json_encode($meta); if (!empty($meta['timed_out'])) { $this->logger->error("[connection] {$e->getMessage()}", ['exception' => $e, 'meta' => $meta]); throw new ConnectionTimeoutException(); } if (!empty($meta['eof'])) { $this->logger->error("[connection] {$e->getMessage()}", ['exception' => $e, 'meta' => $meta]); throw new ConnectionClosedException(); } } $this->logger->error("[connection] {$e->getMessage()}", ['exception' => $e]); throw new ConnectionFailureException(); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Constant.php000066400000000000000000000005421511205031700277060ustar00rootroot00000000000000status = $status; parent::__construct($content); } public function getCloseStatus(): int { return $this->status ?? 1000; } } ConnectionClosedException.php000066400000000000000000000007621511205031700351100ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Exceptionresponse = $response; } public function getResponse(): ResponseInterface { return $this->response; } } MessageLevelInterface.php000066400000000000000000000005421511205031700341710ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Exceptionuri = $uri; parent::__construct("Reconnect requested" . ($uri ? ": {$uri}" : '')); } public function getUri(): Uri|null { return $this->uri; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Exception/ServerException.php000066400000000000000000000005001511205031700331720ustar00rootroot00000000000000opcode = $opcode; $this->payload = $payload; $this->final = $final; $this->rsv1 = $rsv1; $this->rsv2 = $rsv2; $this->rsv3 = $rsv3; } public function isFinal(): bool { return $this->final; } public function getRsv1(): bool { return $this->rsv1; } public function setRsv1(bool $rsv1): void { $this->rsv1 = $rsv1; } public function getRsv2(): bool { return $this->rsv2; } public function getRsv3(): bool { return $this->rsv3; } public function isContinuation(): bool { return $this->opcode === 'continuation'; } public function getOpcode(): string { return $this->opcode; } public function getPayload(): string { return $this->payload; } public function getPayloadLength(): int { return strlen($this->payload); } public function __toString(): string { return $this->stringable('%s', $this->opcode); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Frame/FrameHandler.php000066400000000000000000000147031511205031700315030ustar00rootroot00000000000000stream = $stream; $this->pushMasked = $pushMasked; $this->pullMaskedRequired = $pullMaskedRequired; $this->initLogger(); } /** * Pull frame from stream * @throws CloseException */ public function pull(): Frame { // Read the frame "header" first, two bytes. $data = $this->read(2); list ($byte1, $byte2) = array_values($this->unpack('C*', $data)); $final = (bool)($byte1 & 0b10000000); // Final fragment marker. $rsv1 = (bool)($byte1 & 0b01000000); $rsv2 = (bool)($byte1 & 0b00100000); $rsv3 = (bool)($byte1 & 0b00010000); // Parse opcode $opcodeInt = $byte1 & 0b00001111; $opcodeInts = array_flip(self::$opcodes); $opcode = array_key_exists($opcodeInt, $opcodeInts) ? $opcodeInts[$opcodeInt] : strval($opcodeInt); // Masking bit $masked = (bool)($byte2 & 0b10000000); $payload = ''; // Payload length $payloadLength = $byte2 & 0b01111111; if ($payloadLength > 125) { if ($payloadLength === 126) { $data = $this->read(2); // 126: Payload length is a 16-bit unsigned int $payloadLength = current($this->unpack('n', $data)); } else { $data = $this->read(8); // 127: Payload length is a 64-bit unsigned int $payloadLength = current($this->unpack('J', $data)); } } // Get masking key. if ($masked) { $maskingKey = $this->stream->read(4); } // Get the actual payload, if any (might not be for e.g. close frames). if ($payloadLength > 0) { $data = $this->read($payloadLength); if ($masked) { // Unmask payload. for ($i = 0; $i < $payloadLength; $i++) { $payload .= ($data[$i] ^ $maskingKey[$i % 4]); } } else { $payload = $data; } } $frame = new Frame($opcode, $payload, $final, $rsv1, $rsv2, $rsv3); $this->logger->debug("[frame-handler] Pulled '{$opcode}' frame", [ 'opcode' => $frame->getOpcode(), 'final' => $frame->isFinal(), 'content-length' => $frame->getPayloadLength(), ]); if ($this->pullMaskedRequired && !$masked) { $this->logger->error("[frame-handler] Masking required, but frame was unmasked"); throw new CloseException(1002, 'Masking required'); } return $frame; } // Push frame to stream public function push(Frame $frame): int { $payload = $frame->getPayload(); $payloadLength = $frame->getPayloadLength(); $data = ''; $byte1 = $frame->isFinal() ? 0b10000000 : 0b00000000; // Final fragment marker. $byte1 |= $frame->getRsv1() ? 0b01000000 : 0b00000000; // RSV1 bit. $byte1 |= $frame->getRsv2() ? 0b00100000 : 0b00000000; // RSV2 bit. $byte1 |= $frame->getRsv3() ? 0b00010000 : 0b00000000; // RSV3 bit. $byte1 |= self::$opcodes[$frame->getOpcode()]; // Set opcode. $data .= pack('C', $byte1); $byte2 = $this->pushMasked ? 0b10000000 : 0b00000000; // Masking bit marker. // 7 bits of payload length if ($payloadLength > 65535) { $data .= pack('C', $byte2 | 0b01111111); $data .= pack('J', $payloadLength); } elseif ($payloadLength > 125) { $data .= pack('C', $byte2 | 0b01111110); $data .= pack('n', $payloadLength); } else { $data .= pack('C', $byte2 | $payloadLength); } // Handle masking. if ($this->pushMasked) { // Generate a random mask. $mask = ''; for ($i = 0; $i < 4; $i++) { $mask .= chr(rand(0, 255)); } $data .= $mask; // Append masked payload to frame. for ($i = 0; $i < $payloadLength; $i++) { $data .= $payload[$i] ^ $mask[$i % 4]; } } else { // Append payload as-is to frame. $data .= $payload; } // Write to stream. $written = $this->write($data); $this->logger->debug("[frame-handler] Pushed '{opcode}' frame", [ 'opcode' => $frame->getOpcode(), 'final' => $frame->isFinal(), 'content-length' => $frame->getPayloadLength(), ]); return $written; } /** * Secured read op * @param int<1, max> $length * @throws RuntimeException */ private function read(int $length): string { $data = ''; $read = 0; while ($read < $length) { /** @var int<1, max> $readLength */ $readLength = $length - $read; $got = $this->stream->read($readLength); if (empty($got)) { throw new RuntimeException('Empty read; connection dead?'); } $data .= $got; $read = strlen($data); } return $data; } /** * Secured write op * @throws RuntimeException */ private function write(string $data): int { $length = strlen($data); $written = $this->stream->write($data); if ($written < $length) { throw new RuntimeException("Could only write {$written} out of {$length} bytes."); } return $written; } /** @return array */ private function unpack(string $format, string $string): array { /** @var array $result */ $result = unpack($format, $string); return $result; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/000077500000000000000000000000001511205031700263225ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/DefaultHttpFactory.php000066400000000000000000000032651511205031700326150ustar00rootroot00000000000000uriFactory = new UriFactory(); } /** * Create a new request. * @param string $method * @param UriInterface|string $uri */ public function createRequest(string $method, mixed $uri): RequestInterface { return new Request($method, $uri); } /** * @param int $code * @param string $reasonPhrase */ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface { return new Response($code, $reasonPhrase); } /** * @param string $method * @param UriInterface|string $uri * @param array $serverParams */ public function createServerRequest(string $method, mixed $uri, array $serverParams = []): ServerRequestInterface { return new ServerRequest($method, $uri); } /** * @param string $uri The URI to parse. */ public function createUri(string $uri = ''): UriInterface { return $this->uriFactory->createUri($uri); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/HttpHandler.php000066400000000000000000000077331511205031700312620ustar00rootroot00000000000000stream = $stream; $this->ssl = $ssl; $this->httpFactory = $httpFactory ?? new DefaultHttpFactory(); } /** * @deprecated Remove in v4 */ public function setLogger(LoggerInterface $logger): void { trigger_error('HttpHandler.setLogger is deprecated and will be removed in v4.', E_USER_DEPRECATED); } /** * @throws RuntimeException */ public function pull(): MessageInterface { $status = $this->readLine(); $path = $version = null; // Pulling server request preg_match('!^(?P[A-Z]+) (?P[^ ]*) HTTP/(?P[0-9/.]+)!', $status, $matches); if (!empty($matches)) { $message = $this->httpFactory->createServerRequest($matches['method'], ''); $path = $matches['path']; $version = $matches['version']; } // Pulling response preg_match('!^HTTP/(?P[0-9/.]+) (?P[0-9]*)($|\s(?P.*))!', $status, $matches); if (!empty($matches)) { $message = $this->httpFactory->createResponse((int)$matches['code'], $matches['reason'] ?? ''); $version = $matches['version']; } if (empty($message)) { throw new RuntimeException('Invalid Http request.'); } if ($version) { $message = $message->withProtocolVersion($version); } while ($header = $this->readLine()) { $parts = explode(':', $header, 2); if (count($parts) == 2) { if ($message->getheaderLine($parts[0]) === '') { $message = $message->withHeader($parts[0], trim($parts[1])); } else { $message = $message->withAddedHeader($parts[0], trim($parts[1])); } } } if ($message instanceof Request) { $scheme = $this->ssl ? 'wss' : 'ws'; $uri = $this->httpFactory->createUri("{$scheme}://{$message->getHeaderLine('Host')}{$path}"); $message = $message->withUri($uri, true); } return $message; } /** * @param MessageInterface $message * @return MessageInterface * @throws RuntimeException */ public function push(MessageInterface $message): MessageInterface { if (!$message instanceof Message) { throw new RuntimeException('Generic MessageInterface currently not supported.'); } $data = implode("\r\n", $message->getAsArray()) . "\r\n\r\n"; $this->stream->write($data); return $message; } /** * @throws RuntimeException */ private function readLine(): string { $data = ''; do { $buffer = $this->stream->readLine(1024); if (is_null($buffer)) { throw new RuntimeException('Could not read Http request.'); } $data .= $buffer; } while (!str_ends_with($data, "\n")); return trim($data); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/Message.php000066400000000000000000000123771511205031700304310ustar00rootroot00000000000000> $headers */ private array $headers = []; /** * Retrieves the HTTP protocol version as a string. * @return string HTTP protocol version. */ public function getProtocolVersion(): string { return $this->version; } /** * Return an instance with the specified HTTP protocol version. * @param string $version HTTP protocol version * @return static */ public function withProtocolVersion(string $version): self { $new = clone $this; $new->version = $version; return $new; } /** * Retrieves all message header values. * @return string[][] Returns an associative array of the message's headers. */ public function getHeaders(): array { return array_merge(...array_values($this->headers)); } /** * Checks if a header exists by the given case-insensitive name. * @param string $name Case-insensitive header field name. * @return bool Returns true if any header names match the given header. */ public function hasHeader(string $name): bool { return array_key_exists(strtolower($name), $this->headers); } /** * Retrieves a message header value by the given case-insensitive name. * @param string $name Case-insensitive header field name. * @return string[] An array of string values as provided for the given header. */ public function getHeader(string $name): array { return $this->hasHeader($name) ? array_merge(...array_values($this->headers[strtolower($name)] ?: [])) : []; } /** * Retrieves a comma-separated string of the values for a single header. * @param string $name Case-insensitive header field name. * @return string A string of values as provided for the given header. */ public function getHeaderLine(string $name): string { return implode(',', $this->getHeader($name)); } /** * Return an instance with the provided value replacing the specified header. * @param string $name Case-insensitive header field name. * @param string|string[] $value Header value(s). * @return static */ public function withHeader(string $name, mixed $value): self { $new = clone $this; $new->removeHeader($name); $new->handleHeader($name, $value); return $new; } /** * Return an instance with the specified header appended with the given value. * @param string $name Case-insensitive header field name to add. * @param string|string[] $value Header value(s). * @return static */ public function withAddedHeader(string $name, mixed $value): self { $new = clone $this; $new->handleHeader($name, $value); return $new; } /** * Return an instance without the specified header. * @param string $name Case-insensitive header field name to remove. * @return static */ public function withoutHeader(string $name): self { $new = clone $this; $new->removeHeader($name); return $new; } /** * Not implemented, WebSocket only use headers. * @throws BadMethodCallException */ public function getBody(): StreamInterface { throw new BadMethodCallException("Not implemented."); } /** * Not implemented, WebSocket only use headers. * @throws BadMethodCallException */ public function withBody(StreamInterface $body): self { throw new BadMethodCallException("Not implemented."); } /** @return array */ public function getAsArray(): array { $lines = []; foreach ($this->getHeaders() as $name => $values) { foreach ($values as $value) { $lines[] = "{$name}: {$value}"; } } return $lines; } /** * @throws InvalidArgumentException */ protected function handleHeader(string $name, mixed $value): void { if (!preg_match('|^[0-9a-zA-Z#_-]+$|', $name)) { throw new InvalidArgumentException("'{$name}' is not a valid header field name."); } $value = is_array($value) ? $value : [$value]; foreach ($value as $content) { if (!is_string($content) && !is_numeric($content)) { throw new InvalidArgumentException("Invalid header value(s) provided."); } $this->headers[strtolower($name)][$name][] = trim((string)$content); } } protected function removeHeader(string $name): void { if ($this->hasHeader($name)) { unset($this->headers[strtolower($name)]); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/Request.php000066400000000000000000000076361511205031700304770ustar00rootroot00000000000000 $methods */ private static array $methods = ['GET', 'HEAD', 'OPTIONS', 'TRACE', 'PUT', 'DELETE', 'POST', 'PATCH', 'CONNECT']; private string $target = ''; private string $method; private UriInterface $uri; public function __construct(string $method = 'GET', UriInterface|string $uri = '') { if (!in_array($method, self::$methods)) { throw new InvalidArgumentException("Invalid method '{$method}' provided."); } $this->uri = $uri instanceof UriInterface ? $uri : new Uri($uri); $this->method = $method; $this->handleHeader('Host', $this->formatHostHeader($this->uri)); } /** * Retrieves the message's request target. * @return string */ public function getRequestTarget(): string { if ($this->target) { return $this->target; } $uri = (new Uri())->withPath($this->uri->getPath())->withQuery($this->uri->getQuery()); return $uri->toString(Uri::ABSOLUTE_PATH); } /** * Return an instance with the specific request-target. * @param mixed $requestTarget * @return static */ public function withRequestTarget(mixed $requestTarget): self { $new = clone $this; $new->target = $requestTarget; return $new; } /** * Retrieves the HTTP method of the request. * @return string Returns the request method. */ public function getMethod(): string { return $this->method; } /** * Return an instance with the provided HTTP method. * @param string $method Case-sensitive method. * @return static * @throws InvalidArgumentException for invalid HTTP methods. */ public function withMethod(string $method): self { if (!in_array($method, self::$methods)) { throw new InvalidArgumentException("Invalid method '{$method}' provided."); } $new = clone $this; $new->method = $method; return $new; } /** * Retrieves the URI instance. * This method MUST return a UriInterface instance. * @return UriInterface Returns a UriInterface instance representing the URI of the request. */ public function getUri(): UriInterface { return $this->uri; } /** * Returns an instance with the provided URI. * @param UriInterface $uri New request URI to use. * @param bool $preserveHost Preserve the original state of the Host header. * @return static */ public function withUri(UriInterface $uri, bool $preserveHost = false): self { $new = clone $this; $new->uri = $uri instanceof Uri ? $uri : new Uri((string)$uri); if (!$preserveHost || !$new->hasHeader('host')) { $new->removeHeader('host'); $new->handleHeader('Host', $this->formatHostHeader($uri)); } return $new; } public function __toString(): string { return $this->stringable('%s %s', $this->getMethod(), $this->getUri()); } /** @return array */ public function getAsArray(): array { return array_merge([ "{$this->getMethod()} {$this->getRequestTarget()} HTTP/{$this->getProtocolVersion()}", ], parent::getAsArray()); } private function formatHostHeader(UriInterface $uri): string { $host = $uri->getHost(); $port = $uri->getPort(); return $host && $port ? "{$host}:{$port}" : $host; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/Response.php000066400000000000000000000106371511205031700306400ustar00rootroot00000000000000 $codes */ private static array $codes = [ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 103 => 'Early Hints', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported', 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Content Too Large', 414 => 'URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request', 422 => 'Unprocessable Content', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Too Early', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 510 => 'Not Extended', 511 => 'Network Authentication Required', ]; private int $code; private string $reason; public function __construct(int $code = 200, string $reasonPhrase = '') { if ($code < 100 || $code > 599) { throw new InvalidArgumentException("Invalid status code '{$code}' provided."); } $this->code = $code; $this->reason = $reasonPhrase; } /** * Gets the response status code. * @return int Status code. */ public function getStatusCode(): int { return $this->code; } /** * Return an instance with the specified status code and, optionally, reason phrase. * @param int $code The 3-digit integer result code to set. * @param string $reasonPhrase The reason phrase to use. * @return static * @throws InvalidArgumentException For invalid status code arguments. */ public function withStatus(int $code, string $reasonPhrase = ''): self { if ($code < 100 || $code > 599) { throw new InvalidArgumentException("Invalid status code '{$code}' provided."); } $new = clone $this; $new->code = $code; $new->reason = $reasonPhrase; return $new; } /** * Gets the response reason phrase associated with the status code. * @return string Reason phrase; must return an empty string if none present. */ public function getReasonPhrase(): string { $d = self::$codes[$this->code]; return $this->reason ?: $d; } public function __toString(): string { return $this->stringable('%s', $this->getStatusCode()); } /** @return array */ public function getAsArray(): array { return array_merge([ "HTTP/{$this->getProtocolVersion()} {$this->getStatusCode()} {$this->getReasonPhrase()}", ], parent::getAsArray()); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Http/ServerRequest.php000066400000000000000000000103321511205031700316510ustar00rootroot00000000000000 */ public function getServerParams(): array { throw new BadMethodCallException("Not implemented."); } /** * Retrieves cookies sent by the client to the server. * @return array */ public function getCookieParams(): array { throw new BadMethodCallException("Not implemented."); } /** * Return an instance with the specified cookies. * @param array $cookies Array of key/value pairs representing cookies. * @return static */ public function withCookieParams(array $cookies): self { throw new BadMethodCallException("Not implemented."); } /** * Retrieves the deserialized query string arguments, if any. * @return array */ public function getQueryParams(): array { parse_str($this->getUri()->getQuery(), $result); return $result; } /** * Return an instance with the specified query string arguments. * @param array $query Array of query string arguments * @return static */ public function withQueryParams(array $query): self { throw new BadMethodCallException("Not implemented."); } /** * Retrieve normalized file upload data. * @return array An array tree of UploadedFileInterface instances. */ public function getUploadedFiles(): array { throw new BadMethodCallException("Not implemented."); } /** * Create a new instance with the specified uploaded files. * @param array $uploadedFiles An array tree of UploadedFileInterface instances. * @return static */ public function withUploadedFiles(array $uploadedFiles): self { throw new BadMethodCallException("Not implemented."); } /** * Retrieve any parameters provided in the request body. * @return null|array|object The deserialized body parameters, if any. */ public function getParsedBody() { throw new BadMethodCallException("Not implemented."); } /** * Return an instance with the specified body parameters. * @param null|array|object $data The deserialized body data. * @return static */ public function withParsedBody($data): self { throw new BadMethodCallException("Not implemented."); } /** * Retrieve attributes derived from the request. * @return mixed[] Attributes derived from the request. */ public function getAttributes(): array { throw new BadMethodCallException("Not implemented."); } /** * Retrieve a single derived request attribute. * @param string $name The attribute name. * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ public function getAttribute(string $name, $default = null) { throw new BadMethodCallException("Not implemented."); } /** * Return an instance with the specified derived request attribute. * @param string $name The attribute name. * @param mixed $value The value of the attribute. * @return static */ public function withAttribute(string $name, $value): self { throw new BadMethodCallException("Not implemented."); } /** * Return an instance that removes the specified derived request attribute. * @param string $name The attribute name. * @return static */ public function withoutAttribute(string $name): self { throw new BadMethodCallException("Not implemented."); } public function __toString(): string { return $this->stringable('%s %s', $this->getMethod(), $this->getRequestTarget()); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/000077500000000000000000000000001511205031700267675ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/Binary.php000066400000000000000000000010071511205031700307220ustar00rootroot00000000000000compress; } public function setCompress(bool $compress): void { $this->compress = $compress; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/Close.php000066400000000000000000000025211511205031700305450ustar00rootroot00000000000000status = $status; parent::__construct($content); } public function getCloseStatus(): int|null { return $this->status; } public function setCloseStatus(int|null $status): void { $this->status = $status; } public function getPayload(): string { $statusBinstr = sprintf('%016b', $this->status); $statusStr = ''; foreach (str_split($statusBinstr, 8) as $binstr) { $statusStr .= chr((int)bindec($binstr)); } return $statusStr . $this->content; } public function setPayload(string $payload = ''): void { $this->status = 0; $this->content = ''; if (strlen($payload) > 0) { $this->status = current(unpack('n', $payload) ?: []); } if (strlen($payload) > 2) { $this->content = substr($payload, 2); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/Message.php000066400000000000000000000050031511205031700310620ustar00rootroot00000000000000content = $content; $this->timestamp = new DateTimeImmutable(); } public function getOpcode(): string { return $this->opcode; } public function getLength(): int { return strlen($this->content); } public function getTimestamp(): DateTimeInterface { return $this->timestamp; } public function getContent(): string { return $this->content; } public function setContent(string $content = ''): void { $this->content = $content; } public function hasContent(): bool { return $this->content != ''; } public function getPayload(): string { return $this->content; } public function setPayload(string $payload = ''): void { $this->content = $payload; } public function isCompressed(): bool { return false; } /** @throws ConnectionFailureException */ public function setCompress(bool $compress): void { if ($compress) { throw new ConnectionFailureException('Must not compress control message.'); } } /** * Split messages into frames * @param int<1, max> $frameSize * @return array */ public function getFrames(int $frameSize = 4096): array { $frames = []; $split = str_split($this->getPayload(), $frameSize); if (empty($split)) { $split = ['']; } foreach ($split as $i => $payload) { $frames[] = new Frame( $i === 0 ? $this->opcode : 'continuation', $payload, $i === array_key_last($split) ); } if ($this->isCompressed()) { $frames[0]->setRsv1(true); } return $frames; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/MessageHandler.php000066400000000000000000000064341511205031700323710ustar00rootroot00000000000000 $frameBuffer */ private array $frameBuffer = []; public function __construct(FrameHandler $frameHandler) { $this->frameHandler = $frameHandler; $this->initLogger(); } public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; $this->frameHandler->setLogger($logger); } /** * Push message * @template T of Message * @param T $message * @param int<1, max> $size * @return T */ public function push(Message $message, int $size = self::DEFAULT_SIZE): Message { $frames = $message->getFrames($size); foreach ($frames as $frame) { $this->frameHandler->push($frame); } $this->logger->info("[message-handler] Pushed {$message}", [ 'opcode' => $message->getOpcode(), 'content-length' => $message->getLength(), 'frames' => count($frames), ]); return $message; } // Pull message public function pull(): Message { do { $frame = $this->frameHandler->pull(); if ($frame->isFinal()) { if ($frame->isContinuation()) { $frames = array_merge($this->frameBuffer, [$frame]); $this->frameBuffer = []; // Clear buffer } else { $frames = [$frame]; } return $this->createMessage($frames); } // Non-final frame - add to buffer for continuous reading $this->frameBuffer[] = $frame; } while (true); } /** * @param non-empty-array $frames * @throws BadOpcodeException */ private function createMessage(array $frames): Message { $opcode = $frames[0]->getOpcode() ?? null; $message = match ($opcode) { 'text' => new Text(), 'binary' => new Binary(), 'ping' => new Ping(), 'pong' => new Pong(), 'close' => new Close(), default => throw new BadOpcodeException("Invalid opcode '{$opcode}' provided"), }; $message->setPayload(array_reduce($frames, function (string $carry, Frame $item) { return $carry . $item->getPayload(); }, '')); $message->setCompress($frames[0]->getRsv1() ?? false); $this->logger->info("[message-handler] Pulled {$message}", [ 'opcode' => $message->getOpcode(), 'content-length' => $message->getLength(), 'frames' => count($frames), ]); return $message; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Message/Ping.php000066400000000000000000000005011511205031700303710ustar00rootroot00000000000000compress; } public function setCompress(bool $compress): void { $this->compress = $compress; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/000077500000000000000000000000001511205031700274605ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/Callback.php000066400000000000000000000055501511205031700316720ustar00rootroot00000000000000incoming = $incoming; $this->outgoing = $outgoing; $this->httpIncoming = $httpIncoming; $this->httpOutgoing = $httpOutgoing; $this->tick = $tick; $this->initLogger(); } public function processIncoming(ProcessStack $stack, Connection $connection): Message { if (is_callable($this->incoming)) { return call_user_func($this->incoming, $stack, $connection); } return $stack->handleIncoming(); } public function processOutgoing(ProcessStack $stack, Connection $connection, Message $message): Message { if (is_callable($this->outgoing)) { return call_user_func($this->outgoing, $stack, $connection, $message); } return $stack->handleOutgoing($message); } public function processHttpIncoming(ProcessHttpStack $stack, Connection $connection): MessageInterface { if (is_callable($this->httpIncoming)) { return call_user_func($this->httpIncoming, $stack, $connection); } return $stack->handleHttpIncoming(); } public function processHttpOutgoing( ProcessHttpStack $stack, Connection $connection, MessageInterface $message ): MessageInterface { if (is_callable($this->httpOutgoing)) { return call_user_func($this->httpOutgoing, $stack, $connection, $message); } return $stack->handleHttpOutgoing($message); } public function processTick(ProcessTickStack $stack, Connection $connection): void { if (is_callable($this->tick)) { call_user_func($this->tick, $stack, $connection); } $stack->handleTick(); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/CloseHandler.php000066400000000000000000000045231511205031700325400ustar00rootroot00000000000000initLogger(); } public function processIncoming(ProcessStack $stack, Connection $connection): Message { $message = $stack->handleIncoming(); // Proceed before logic if (!$message instanceof Close) { return $message; } if ($connection->isWritable()) { // Remote sent Close; acknowledge and close for further reading $this->logger->debug("[close-handler] Received 'close', status: {$message->getCloseStatus()}"); $ack = "Close acknowledged: {$message->getCloseStatus()}"; $connection->closeRead(); $connection->send(new Close($message->getCloseStatus(), $ack)); } else { // Remote sent Close/Ack: disconnect $this->logger->debug("[close-handler] Received 'close' acknowledge, disconnecting"); $connection->disconnect(); } return $message; } public function processOutgoing(ProcessStack $stack, Connection $connection, Message $message): Message { $message = $stack->handleOutgoing($message); // Proceed before logic if (!$message instanceof Close) { return $message; } if ($connection->isReadable()) { // Local sent Close: close for further writing, expect remote acknowledge $this->logger->debug("[close-handler] Sent 'close', status: {$message->getCloseStatus()}"); $connection->closeWrite(); } else { // Local sent Close/Ack: disconnect $this->logger->debug("[close-handler] Sent 'close' acknowledge, disconnecting"); $connection->disconnect(); } return $message; } } CompressionExtension.php000066400000000000000000000137461511205031700343230ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware $compressors */ private array $compressors = []; public function __construct(CompressorInterface ...$compressors) { $this->compressors = $compressors; $this->initLogger(); } public function processHttpOutgoing( ProcessHttpStack $stack, Connection $connection, MessageInterface $message ): MessageInterface { if ($message instanceof RequestInterface) { // Outgoing requests on Client $connection->setMeta('compressionExtension.compressor', null); $connection->setMeta('compressionExtension.configuration', null); $headerValues = []; foreach ($this->compressors as $compressor) { $headerValues[] = $compressor->getRequestHeaderValue(); } $message = $message->withAddedHeader('Sec-WebSocket-Extensions', implode(', ', $headerValues)); } elseif ($message instanceof ResponseInterface) { // Outgoing Response on Server if ($compressor = $connection->getMeta('compressionExtension.compressor')) { $configuration = $connection->getMeta('compressionExtension.configuration'); $message = $message->withHeader( 'Sec-WebSocket-Extensions', $compressor->getResponseHeaderValue($configuration) ); } } return $stack->handleHttpOutgoing($message); } public function processHttpIncoming(ProcessHttpStack $stack, Connection $connection): MessageInterface { $message = $stack->handleHttpIncoming(); if ($message instanceof ServerRequestInterface) { // Incoming requests on Server $connection->setMeta('compressionExtension.compressor', null); $connection->setMeta('compressionExtension.configuration', null); if ($preferred = $this->getPreferred($message)) { $connection->setMeta('compressionExtension.compressor', $preferred->compressor); $connection->setMeta('compressionExtension.configuration', $preferred->configuration); $this->logger->debug( "[permessage-compression] Using {$preferred->compressor}", (array)$preferred->configuration ); } } elseif ($message instanceof ResponseInterface) { // Incoming Response on Client if ($preferred = $this->getPreferred($message)) { $connection->setMeta('compressionExtension.compressor', $preferred->compressor); $connection->setMeta('compressionExtension.configuration', $preferred->configuration); $this->logger->debug( "[permessage-compression] Using {$preferred->compressor}", (array)$preferred->configuration ); } // @todo: If not found? } return $message; } public function processIncoming(ProcessStack $stack, Connection $connection): Message { $message = $stack->handleIncoming(); if ( ($message instanceof Text || $message instanceof Binary) && $message->isCompressed() && $compressor = $connection->getMeta('compressionExtension.compressor') ) { $message = $compressor->decompress($message, $connection->getMeta('compressionExtension.configuration')); } return $message; } /** * @template T of Message * @param T $message * @return T|Text|Binary */ public function processOutgoing(ProcessStack $stack, Connection $connection, Message $message): Message { if ( ($message instanceof Text || $message instanceof Binary) && !$message->isCompressed() && $compressor = $connection->getMeta('compressionExtension.compressor') ) { /** @var Text|Binary $message */ $message = $compressor->compress($message, $connection->getMeta('compressionExtension.configuration')); } return $stack->handleOutgoing($message); } /** * @return object{compressor: CompressorInterface, configuration: object}|null */ protected function getPreferred(MessageInterface $request): object|null { $isServer = $request instanceof ServerRequestInterface; foreach ($request->getHeader('Sec-WebSocket-Extensions') as $header) { foreach (explode(',', $header) as $element) { foreach ($this->compressors as $compressor) { $configuration = $compressor->getConfiguration(trim($element), $isServer); if ($compressor->isEligable($configuration)) { return (object)['compressor' => $compressor, 'configuration' => $configuration]; } } } } return null; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/CompressionExtension/000077500000000000000000000000001511205031700336565ustar00rootroot00000000000000CompressorInterface.php000066400000000000000000000022271511205031700402700ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/CompressionExtension, * clientMaxWindowBits: int, * } */ class DeflateCompressor implements CompressorInterface, Stringable { use StringableTrait; private const MIN_WINDOW_SIZE = 9; private const MAX_WINDOW_SIZE = 15; private bool $serverNoContextTakeover; private bool $clientNoContextTakeover; /** @var int $serverMaxWindowBits */ private int $serverMaxWindowBits; /** @var int $clientMaxWindowBits */ private int $clientMaxWindowBits; /** * @throws RuntimeException * @throws RangeException */ public function __construct( bool $serverNoContextTakeover = false, bool $clientNoContextTakeover = false, int $serverMaxWindowBits = self::MAX_WINDOW_SIZE, int $clientMaxWindowBits = self::MAX_WINDOW_SIZE, string $extension = 'zlib', ) { if (!extension_loaded($extension)) { throw new RuntimeException("DeflateCompressor require {$extension} extension."); } if ($serverMaxWindowBits < self::MIN_WINDOW_SIZE || $serverMaxWindowBits > self::MAX_WINDOW_SIZE) { throw new RangeException("DeflateCompressor serverMaxWindowBits must be in range 9-15."); } if ($clientMaxWindowBits < self::MIN_WINDOW_SIZE || $clientMaxWindowBits > self::MAX_WINDOW_SIZE) { throw new RangeException("DeflateCompressor clientMaxWindowBits must be in range 9-15."); } $this->serverNoContextTakeover = $serverNoContextTakeover; $this->clientNoContextTakeover = $clientNoContextTakeover; $this->serverMaxWindowBits = $serverMaxWindowBits; $this->clientMaxWindowBits = $clientMaxWindowBits; } public function getRequestHeaderValue(): string { $header = "permessage-deflate"; if ($this->serverNoContextTakeover) { $header .= "; server_no_context_takeover"; } if ($this->clientNoContextTakeover) { $header .= "; client_no_context_takeover"; } if ($this->serverMaxWindowBits != self::MAX_WINDOW_SIZE) { $header .= "; server_max_window_bits={$this->serverMaxWindowBits}"; } if ($this->clientMaxWindowBits != self::MAX_WINDOW_SIZE) { $header .= "; client_max_window_bits={$this->clientMaxWindowBits}"; } return $header; } /** * @param Config $configuration */ public function getResponseHeaderValue(object $configuration): string { // @todo: throw HandshakeException or bad config $header = "permessage-deflate"; if ($configuration->serverNoContextTakeover) { $header .= "; server_no_context_takeover"; } if ($configuration->clientNoContextTakeover) { $header .= "; client_no_context_takeover"; } $serverMaxWindowBits = min($configuration->serverMaxWindowBits, $this->serverMaxWindowBits); if ($serverMaxWindowBits != self::MAX_WINDOW_SIZE) { $header .= "; server_max_window_bits={$serverMaxWindowBits}"; } $clientMaxWindowBits = min($configuration->clientMaxWindowBits, $this->clientMaxWindowBits); if ($clientMaxWindowBits != self::MAX_WINDOW_SIZE) { $header .= "; client_max_window_bits={$clientMaxWindowBits}"; } return $header; } /** * @param Config $configuration */ public function isEligable(object $configuration): bool { return $configuration->compressor == 'permessage-deflate' && $configuration->serverMaxWindowBits <= $this->serverMaxWindowBits && $configuration->clientMaxWindowBits <= $this->clientMaxWindowBits ; } /** * @return Config */ public function getConfiguration(string $element, bool $isServer): object { $configuration = (object)[ 'compressor' => null, 'isServer' => $isServer, 'serverNoContextTakeover' => $this->serverNoContextTakeover, 'clientNoContextTakeover' => $this->clientNoContextTakeover, 'serverMaxWindowBits' => $this->serverMaxWindowBits, 'clientMaxWindowBits' => $this->clientMaxWindowBits, 'deflator' => null, 'inflator' => null, ]; foreach (explode(';', $element) as $parameter) { $parts = explode('=', $parameter); $key = trim($parts[0]); // @todo: Error handling when parsing switch ($key) { case 'permessage-deflate': $configuration->compressor = $key; break; case 'server_no_context_takeover': $configuration->serverNoContextTakeover = true; break; case 'client_no_context_takeover': $configuration->clientNoContextTakeover = true; break; case 'server_max_window_bits': $bits = intval($parts[1] ?? self::MAX_WINDOW_SIZE); $configuration->serverMaxWindowBits = min($bits, $this->serverMaxWindowBits); break; case 'client_max_window_bits': $bits = intval($parts[1] ?? self::MAX_WINDOW_SIZE); $configuration->clientMaxWindowBits = min($bits, $this->clientMaxWindowBits); break; } } return $configuration; } /** * @template T of Binary|Text * @param T $message * @param Config $configuration * @return T */ public function compress(Binary|Text $message, object $configuration): Binary|Text { $windowBits = $configuration->isServer ? $configuration->serverMaxWindowBits : $configuration->clientMaxWindowBits; $noContextTakeover = $configuration->isServer ? $configuration->serverNoContextTakeover : $configuration->clientNoContextTakeover; if (is_null($configuration->deflator) || $noContextTakeover) { $configuration->deflator = deflate_init(ZLIB_ENCODING_RAW, [ 'level' => -1, 'window' => $windowBits, 'strategy' => ZLIB_DEFAULT_STRATEGY ]) ?: null; } /** @var DeflateContext $deflator */ $deflator = $configuration->deflator; /** @var string $deflated */ $deflated = deflate_add($deflator, $message->getPayload(), ZLIB_SYNC_FLUSH); $deflated = substr($deflated, 0, -4); // Remove 4 last chars $message->setCompress(true); $message->setPayload($deflated); return $message; } /** * @param Config $configuration */ public function decompress(Binary|Text $message, object $configuration): Binary|Text { $windowBits = $configuration->isServer ? $configuration->clientMaxWindowBits : $configuration->serverMaxWindowBits; $noContextTakeover = $configuration->isServer ? $configuration->clientNoContextTakeover : $configuration->serverNoContextTakeover; if (is_null($configuration->inflator) || $noContextTakeover) { $configuration->inflator = inflate_init(ZLIB_ENCODING_RAW, [ 'level' => -1, 'window' => $windowBits, 'strategy' => ZLIB_DEFAULT_STRATEGY ]) ?: null; } /** @var InflateContext $inflator */ $inflator = $configuration->inflator; /** @var string $inflated */ $inflated = inflate_add($inflator, $message->getPayload() . "\x00\x00\xff\xff"); $message->setCompress(false); $message->setPayload($inflated); return $message; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/FollowRedirect.php000066400000000000000000000040251511205031700331160ustar00rootroot00000000000000limit = $limit; $this->initLogger(); } /** * @throws HandshakeException * @throws ReconnectException */ public function processHttpIncoming(ProcessHttpStack $stack, Connection $connection): MessageInterface { $message = $stack->handleHttpIncoming(); if ( $message instanceof ResponseInterface && $message->getStatusCode() >= 300 && $message->getStatusCode() < 400 && $locationHeader = $message->getHeaderLine('Location') ) { $note = "{$this->attempts} of {$this->limit} redirect attempts"; if ($this->attempts > $this->limit) { $this->logger->debug("[follow-redirect] Too many redirect attempts, giving up"); throw new HandshakeException("Too many redirect attempts, giving up", $message); } $this->attempts++; $this->logger->debug("[follow-redirect] {$message->getStatusCode()} {$locationHeader} ($note)"); throw new ReconnectException(new Uri($locationHeader)); } return $message; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/MiddlewareHandler.php000066400000000000000000000126531511205031700335530ustar00rootroot00000000000000 */ private array $middlewares = []; /** @var array */ private array $incoming = []; /** @var array */ private array $outgoing = []; /** @var array */ private array $httpIncoming = []; /** @var array */ private array $httpOutgoing = []; /** @var array */ private array $tick = []; // Handlers private HttpHandler $httpHandler; private MessageHandler $messageHandler; /** * Create MiddlewareHandler. * @param MessageHandler $messageHandler * @param HttpHandler $httpHandler */ public function __construct(MessageHandler $messageHandler, HttpHandler $httpHandler) { $this->messageHandler = $messageHandler; $this->httpHandler = $httpHandler; $this->initLogger(); } /** * Set logger on MiddlewareHandler and all LoggerAware middlewares. * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; foreach ($this->middlewares as $middleware) { $this->attachLogger($middleware); } } /** * Add a middleware. * @param MiddlewareInterface $middleware * @return $this */ public function add(MiddlewareInterface $middleware): self { if ($middleware instanceof ProcessIncomingInterface) { $this->logger->info("[middleware-handler] Added incoming: {$middleware}"); $this->incoming[] = $middleware; } if ($middleware instanceof ProcessOutgoingInterface) { $this->logger->info("[middleware-handler] Added outgoing: {$middleware}"); $this->outgoing[] = $middleware; } if ($middleware instanceof ProcessHttpIncomingInterface) { $this->logger->info("[middleware-handler] Added http incoming: {$middleware}"); $this->httpIncoming[] = $middleware; } if ($middleware instanceof ProcessHttpOutgoingInterface) { $this->logger->info("[middleware-handler] Added http outgoing: {$middleware}"); $this->httpOutgoing[] = $middleware; } if ($middleware instanceof ProcessTickInterface) { $this->logger->info("[middleware-handler] Added tick: {$middleware}"); $this->tick[] = $middleware; } $this->attachLogger($middleware); $this->middlewares[] = $middleware; return $this; } /** * Process middlewares for incoming messages. * @param Connection $connection * @return Message */ public function processIncoming(Connection $connection): Message { $this->logger->info("[middleware-handler] Processing incoming"); $stack = new ProcessStack($connection, $this->messageHandler, $this->incoming); return $stack->handleIncoming(); } /** * Process middlewares for outgoing messages. * @template T of Message * @param Connection $connection * @param T $message * @return T */ public function processOutgoing(Connection $connection, Message $message): Message { $this->logger->info("[middleware-handler] Processing outgoing"); $stack = new ProcessStack($connection, $this->messageHandler, $this->outgoing); return $stack->handleOutgoing($message); } /** * Process middlewares for http requests. * @param Connection $connection * @return MessageInterface */ public function processHttpIncoming(Connection $connection): MessageInterface { $this->logger->info("[middleware-handler] Processing http incoming"); $stack = new ProcessHttpStack($connection, $this->httpHandler, $this->httpIncoming); return $stack->handleHttpIncoming(); } /** * Process middlewares for http requests. * @param Connection $connection * @param MessageInterface $message * @return MessageInterface */ public function processHttpOutgoing(Connection $connection, MessageInterface $message): MessageInterface { $this->logger->info("[middleware-handler] Processing http outgoing"); $stack = new ProcessHttpStack($connection, $this->httpHandler, $this->httpOutgoing); return $stack->handleHttpOutgoing($message); } /** * Process middlewares for tick. * @param Connection $connection */ public function processTick(Connection $connection): void { $this->logger->info("[middleware-handler] Processing tick"); $stack = new ProcessTickStack($connection, $this->tick); $stack->handleTick(); } } MiddlewareInterface.php000066400000000000000000000005521511205031700340120ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middlewareinterval = $interval; $this->initLogger(); } public function processOutgoing(ProcessStack $stack, Connection $connection, Message $message): Message { $this->setNext($connection); // Update timestamp for next ping return $stack->handleOutgoing($message); } public function processTick(ProcessTickStack $stack, Connection $connection): void { // Push if time exceeds timestamp for next ping if ($connection->isWritable() && microtime(true) >= $this->getNext($connection)) { $this->logger->debug("[ping-interval] Auto-pushing ping"); $connection->send(new Ping()); $this->setNext($connection); // Update timestamp for next ping } $stack->handleTick(); } private function getNext(Connection $connection): float { return $connection->getMeta('pingInterval.next') ?? $this->setNext($connection); } private function setNext(Connection $connection): float { $next = microtime(true) + ($this->interval ?? $connection->getTimeout()); $connection->setMeta('pingInterval.next', $next); return $next; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware/PingResponder.php000066400000000000000000000017721511205031700327570ustar00rootroot00000000000000initLogger(); } public function processIncoming(ProcessStack $stack, Connection $connection): Message { $message = $stack->handleIncoming(); if ($message instanceof Ping && $connection->isWritable()) { $connection->send(new Pong($message->getContent())); } return $message; } } ProcessHttpIncomingInterface.php000066400000000000000000000010531511205031700356740ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware $processors */ private array $processors; /** * Create ProcessStack. * @param Connection $connection * @param HttpHandler $httpHandler * @param array $processors */ public function __construct(Connection $connection, HttpHandler $httpHandler, array $processors) { $this->connection = $connection; $this->httpHandler = $httpHandler; $this->processors = $processors; } /** * Process middleware for incoming http message. * @return MessageInterface */ public function handleHttpIncoming(): MessageInterface { /** @var ProcessHttpIncomingInterface|null $processor */ $processor = array_shift($this->processors); if ($processor) { return $processor->processHttpIncoming($this, $this->connection); } return $this->httpHandler->pull(); } /** * Process middleware for outgoing http message. * @param MessageInterface $message * @return MessageInterface */ public function handleHttpOutgoing(MessageInterface $message): MessageInterface { /** @var ProcessHttpOutgoingInterface|null $processor */ $processor = array_shift($this->processors); if ($processor) { return $processor->processHttpOutgoing($this, $this->connection, $message); } return $this->httpHandler->push($message); } } ProcessIncomingInterface.php000066400000000000000000000010121511205031700350270ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware $processors */ private array $processors; /** * Create ProcessStack. * @param Connection $connection * @param MessageHandler $messageHandler * @param array $processors */ public function __construct(Connection $connection, MessageHandler $messageHandler, array $processors) { $this->connection = $connection; $this->messageHandler = $messageHandler; $this->processors = $processors; } /** * Process middleware for incoming message. * @return Message */ public function handleIncoming(): Message { /** @var ProcessIncomingInterface|null $processor */ $processor = array_shift($this->processors); if ($processor) { return $processor->processIncoming($this, $this->connection); } return $this->messageHandler->pull(); } /** * Process middleware for outgoing message. * @template T of Message * @param T $message * @return T */ public function handleOutgoing(Message $message): Message { /** @var ProcessOutgoingInterface|null $processor */ $processor = array_shift($this->processors); if ($processor) { return $processor->processOutgoing($this, $this->connection, $message); } return $this->messageHandler->push($message, $this->connection->getFrameSize()); } } ProcessTickInterface.php000066400000000000000000000007401511205031700341650ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware $processors */ private array $processors; /** * Create ProcessStack. * @param Connection $connection * @param array $processors */ public function __construct(Connection $connection, array $processors) { $this->connection = $connection; $this->processors = $processors; } /** * Process middleware for tick. */ public function handleTick(): void { $processor = array_shift($this->processors); if ($processor) { $processor->processTick($this, $this->connection); } } } SubprotocolNegotiation.php000066400000000000000000000101241511205031700346240ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Middleware $subprotocols */ private array $subprotocols; private bool $require; /** @param array $subprotocols */ public function __construct(array $subprotocols, bool $require = false) { $this->subprotocols = $subprotocols; $this->require = $require; $this->initLogger(); } public function processHttpOutgoing( ProcessHttpStack $stack, Connection $connection, MessageInterface $message ): MessageInterface { if ($message instanceof RequestInterface) { // Outgoing requests on Client foreach ($this->subprotocols as $subprotocol) { $message = $message->withAddedHeader('Sec-WebSocket-Protocol', $subprotocol); } if ($supported = implode(', ', $this->subprotocols)) { $this->logger->debug("[subprotocol-negotiation] Requested subprotocols: {$supported}"); } } elseif ($message instanceof ResponseInterface) { // Outgoing Response on Server if ($selected = $connection->getMeta('subprotocolNegotiation.selected')) { $message = $message->withHeader('Sec-WebSocket-Protocol', $selected); $this->logger->info("[subprotocol-negotiation] Selected subprotocol: {$selected}"); } elseif ($this->require) { // No matching subprotocol, fail handshake $message = $message->withStatus(426); } } return $stack->handleHttpOutgoing($message); } /** * @throws HandshakeException */ public function processHttpIncoming(ProcessHttpStack $stack, Connection $connection): MessageInterface { $connection->setMeta('subprotocolNegotiation.selected', null); $message = $stack->handleHttpIncoming(); if ($message instanceof ServerRequestInterface) { // Incoming requests on Server if ($requested = $message->getHeaderLine('Sec-WebSocket-Protocol')) { $this->logger->debug("[subprotocol-negotiation] Requested subprotocols: {$requested}"); } if ($supported = implode(', ', $this->subprotocols)) { $this->logger->debug("[subprotocol-negotiation] Supported subprotocols: {$supported}"); } foreach ($message->getHeader('Sec-WebSocket-Protocol') as $subprotocol) { if (in_array($subprotocol, $this->subprotocols)) { $connection->setMeta('subprotocolNegotiation.selected', $subprotocol); return $message; } } } elseif ($message instanceof ResponseInterface) { // Incoming Response on Client if ($selected = $message->getHeaderLine('Sec-WebSocket-Protocol')) { $connection->setMeta('subprotocolNegotiation.selected', $selected); $this->logger->info("[subprotocol-negotiation] Selected subprotocol: {$selected}"); } elseif ($this->require) { // No matching subprotocol, close and fail $connection->close(); throw new HandshakeException("Could not resolve subprotocol.", $message); } } return $message; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Server.php000066400000000000000000000523151511205031700273700ustar00rootroot00000000000000 */ use ListenerTrait; use LoggerAwareTrait; use SendMethodsTrait; use StringableTrait; // Settings private int $port; private string $scheme; /** @var int<0, max>|float $timeout */ private int|float $timeout = 60; /** @var int<1, max> $frameSize */ private int $frameSize = 4096; private Context $context; // Internal resources private StreamFactory $streamFactory; private SocketServer|null $server = null; private StreamCollection|null $streams = null; private bool $running = false; /** @var array $connections */ private array $connections = []; /** @var array $middlewares */ private array $middlewares = []; private int|null $maxConnections = null; private HttpFactory $httpFactory; /* ---------- Magic methods ------------------------------------------------------------------------------------ */ /** * @param int $port Socket port to listen to * @param bool $ssl If SSL should be used * @throws InvalidArgumentException If invalid port provided */ public function __construct(int $port = 80, bool $ssl = false) { if ($port < 0 || $port > 65535) { throw new InvalidArgumentException("Invalid port '{$port}' provided"); } $this->port = $port; $this->scheme = $ssl ? 'ssl' : 'tcp'; $this->initLogger(); $this->context = new Context(); $this->httpFactory = new DefaultHttpFactory(); $this->setStreamFactory(new StreamFactory()); } /** * Get string representation of instance. * @return string String representation */ public function __toString(): string { return $this->stringable('%s', $this->server ? "{$this->scheme}://0.0.0.0:{$this->port}" : 'closed'); } /* ---------- Configuration ------------------------------------------------------------------------------------ */ /** * Set stream factory to use. * @param StreamFactory $streamFactory * @return self */ public function setStreamFactory(StreamFactory $streamFactory): self { $this->streamFactory = $streamFactory; return $this; } /** * Set HTTP factory to use. * @param HttpFactory $httpFactory * @return self */ public function setHttpFactory(HttpFactory $httpFactory): self { $this->httpFactory = $httpFactory; return $this; } /** * Set logger. * @param LoggerInterface $logger Logger implementation */ public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; foreach ($this->connections as $connection) { $connection->setLogger($this->logger); } } /** * Set timeout. * @param int<0, max>|float $timeout Timeout in seconds * @return self * @throws InvalidArgumentException If invalid timeout provided */ public function setTimeout(int|float $timeout): self { if ($timeout < 0) { throw new InvalidArgumentException("Invalid timeout '{$timeout}' provided"); } $this->timeout = $timeout; foreach ($this->connections as $connection) { $connection->setTimeout($timeout); } return $this; } /** * Get timeout. * @return int<0, max>|float Timeout in seconds */ public function getTimeout(): int|float { return $this->timeout; } /** * Set frame size. * @param int<1, max> $frameSize Frame size in bytes * @return self * @throws InvalidArgumentException If invalid frameSize provided */ public function setFrameSize(int $frameSize): self { if ($frameSize < 3) { throw new InvalidArgumentException("Invalid frameSize '{$frameSize}' provided"); } $this->frameSize = $frameSize; foreach ($this->connections as $connection) { $connection->setFrameSize($frameSize); } return $this; } /** * Get frame size. * @return int Frame size in bytes */ public function getFrameSize(): int { return $this->frameSize; } /** * Get socket port number. * @return int port */ public function getPort(): int { return $this->port; } /** * Get connection scheme. * @return string scheme */ public function getScheme(): string { return $this->scheme; } /** * Get connection scheme. * @return bool SSL mode */ public function isSsl(): bool { return $this->scheme === 'ssl'; } /** * Number of currently connected clients. * @return int Connection count */ public function getConnectionCount(): int { return count($this->connections); } /** * Get currently connected clients. * @return array Connections */ public function getConnections(): array { return $this->connections; } /** * Get currently readable clients. * @return array Connections */ public function getReadableConnections(): array { return array_filter($this->connections, function (Connection $connection) { return $connection->isReadable(); }); } /** * Get currently writable clients. * @return array Connections */ public function getWritableConnections(): array { return array_filter($this->connections, function (Connection $connection) { return $connection->isWritable(); }); } /** * Set stream context. * @param Context|array $context Context or options as array * @see https://www.php.net/manual/en/context.php * @return self */ public function setContext(Context|array $context): self { if ($context instanceof Context) { $this->context = $context; } else { $this->context->setOptions($context); trigger_error('Calling Server.setContext with array is deprecated, use Context class.', E_USER_DEPRECATED); } return $this; } /** * Get current stream context. * @return Context */ public function getContext(): Context { return $this->context; } /** * Add a middleware. * @param MiddlewareInterface $middleware * @return self */ public function addMiddleware(MiddlewareInterface $middleware): self { $this->middlewares[] = $middleware; foreach ($this->connections as $connection) { $connection->addMiddleware($middleware); } return $this; } /** * Set maximum number of connections allowed, null means unlimited. * @param int|null $maxConnections * @return self * @throws InvalidArgumentException If number provided */ public function setMaxConnections(int|null $maxConnections): self { if ($maxConnections !== null && $maxConnections < 1) { throw new InvalidArgumentException("Invalid maxConnections '{$maxConnections}' provided"); } $this->maxConnections = $maxConnections; return $this; } /* ---------- Messaging operations ----------------------------------------------------------------------------- */ /** * Send message (broadcast to all connected clients). * @template T of Message * @param T $message * @return T */ public function send(Message $message): Message { foreach ($this->connections as $connection) { if ($connection->isWritable()) { $connection->send($message); } } return $message; } /* ---------- Listener operations ------------------------------------------------------------------------------ */ /** * Start server listener. * @throws Throwable On low level error */ public function start(int|float|null $timeout = null): void { // Create socket server if (empty($this->server)) { $this->createSocketServer(); } // Check if running if ($this->running) { $this->logger->warning("[server] Server is already running"); return; } $this->running = true; $this->logger->info("[server] Server is running"); /** @var StreamCollection */ $streams = $this->streams; // Run handler while ($this->running) { try { // Clear closed connections $this->detachUnconnected(); if (is_null($this->streams)) { $this->stop(); return; } // Get streams with readable content $readables = $this->streams->waitRead($timeout ?? $this->timeout); foreach ($readables as $key => $readable) { try { $connection = null; // Accept new client connection if ($readable instanceof SocketServer) { $this->acceptSocket($readable); continue; } // Read from connection $connection = $this->connections[$key]; $message = $connection->pullMessage(); $this->dispatch($message->getOpcode(), [$this, $connection, $message]); } catch (MessageLevelInterface $e) { // Error, but keep connection open $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } catch (ConnectionLevelInterface $e) { // Error, disconnect connection if ($connection) { $this->streams()->detach($key); unset($this->connections[$key]); $connection->disconnect(); } $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } catch (CloseException $e) { // Should close if ($connection) { $connection->close($e->getCloseStatus(), $e->getMessage()); } $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, $connection, $e]); } } foreach ($this->connections as $connection) { $connection->tick(); } $this->dispatch('tick', [$this]); } catch (ExceptionInterface $e) { // Low-level error $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->dispatch('error', [$this, null, $e]); } catch (Throwable $e) { // Crash it $this->logger->error("[server] {$e->getMessage()}", ['exception' => $e]); $this->disconnect(); throw $e; } gc_collect_cycles(); // Collect garbage } } /** * Stop server listener (resumable). */ public function stop(): void { $this->running = false; $this->logger->info("[server] Server is stopped"); } /** * If server is running (accepting connections and messages). * @return bool */ public function isRunning(): bool { return $this->running; } /* ---------- Connection management ---------------------------------------------------------------------------- */ /** * Orderly shutdown of server. * @param int $closeStatus Default is 1001 "Going away" */ public function shutdown(int $closeStatus = 1001): void { $this->logger->info('[server] Shutting down'); if ($this->getConnectionCount() == 0) { $this->disconnect(); return; } // Store and reset settings, lock new connections, reset listeners $max = $this->maxConnections; $this->maxConnections = 0; $listeners = $this->listeners; $this->listeners = []; // Track disconnects $this->onDisconnect(function () use ($max, $listeners) { if ($this->getConnectionCount() > 0) { return; } $this->disconnect(); // Restore settings $this->maxConnections = $max; $this->listeners = $listeners; }); // Close all current connections, listen to acks $this->close($closeStatus); $this->start(); } /** * Disconnect all connections and stop server. */ public function disconnect(): void { $this->running = false; foreach ($this->connections as $connection) { $connection->disconnect(); $this->dispatch('disconnect', [$this, $connection]); } $this->connections = []; if ($this->server) { $this->server->close(); } $this->server = $this->streams = null; $this->logger->info('[server] Server disconnected'); } /* ---------- Internal helper methods -------------------------------------------------------------------------- */ // Create socket server protected function createSocketServer(): void { try { $uri = new Uri("{$this->scheme}://0.0.0.0:{$this->port}"); $this->server = $this->streamFactory->createSocketServer($uri, $this->context); $this->streams = $this->streamFactory->createStreamCollection(); $this->streams->attach($this->server, '@server'); $this->logger->info("[server] Starting server on {$uri}."); } catch (Throwable $e) { $error = "Server failed to start: {$e->getMessage()}"; throw new ServerException($error); } } // Accept connection on socket server protected function acceptSocket(SocketServer $socket): void { if (!is_null($this->maxConnections) && $this->getConnectionCount() >= $this->maxConnections) { $this->logger->warning("[server] Denied connection, reached max {$this->maxConnections}"); return; } try { /** @var SocketStream $stream */ $stream = $socket->accept(); $name = $stream->getRemoteName(); $this->streams()->attach($stream, $name); $connection = new Connection( $stream, false, true, $this->isSsl(), $this->httpFactory ); } catch (StreamException $e) { throw new ConnectionFailureException("Server failed to accept: {$e->getMessage()}"); } try { $connection->setLogger($this->logger); $connection ->setFrameSize($this->frameSize) ->setTimeout($this->timeout) ; foreach ($this->middlewares as $middleware) { $connection->addMiddleware($middleware); } /** @throws StreamException */ $request = $this->performHandshake($connection); $this->connections[$name] = $connection; $this->logger->info("[server] Accepted connection from {$name}."); $this->dispatch('handshake', [ $this, $connection, $connection->getHandshakeRequest(), $connection->getHandshakeResponse(), ]); $this->dispatch('connect', [$this, $connection, $request]); } catch (ExceptionInterface | StreamException $e) { $connection->disconnect(); throw new ConnectionFailureException("Server failed to accept: {$e->getMessage()}"); } } // Detach connections no longer available protected function detachUnconnected(): void { foreach ($this->connections as $key => $connection) { if (!$connection->isConnected()) { $this->streams()->detach($key); unset($this->connections[$key]); $this->logger->info("[server] Disconnected {$key}."); $this->dispatch('disconnect', [$this, $connection]); } } } // Perform upgrade handshake on new connections. protected function performHandshake(Connection $connection): ServerRequest { $response = $this->httpFactory->createResponse(101); $exception = null; // Read handshake request /** @var ServerRequest */ $request = $connection->pullHttp(); // Verify handshake request try { if ($request->getMethod() != 'GET') { throw new HandshakeException( "Handshake request with invalid method: '{$request->getMethod()}'", $response->withStatus(405) ); } $connectionHeader = trim($request->getHeaderLine('Connection')); if (!str_contains(strtolower($connectionHeader), 'upgrade')) { throw new HandshakeException( "Handshake request with invalid Connection header: '{$connectionHeader}'", $response->withStatus(426) ); } $upgradeHeader = trim($request->getHeaderLine('Upgrade')); if (strtolower($upgradeHeader) != 'websocket') { throw new HandshakeException( "Handshake request with invalid Upgrade header: '{$upgradeHeader}'", $response->withStatus(426) ); } $versionHeader = trim($request->getHeaderLine('Sec-WebSocket-Version')); if ($versionHeader != '13') { throw new HandshakeException( "Handshake request with invalid Sec-WebSocket-Version header: '{$versionHeader}'", $response->withStatus(426)->withHeader('Sec-WebSocket-Version', '13') ); } $keyHeader = trim($request->getHeaderLine('Sec-WebSocket-Key')); if (empty($keyHeader)) { throw new HandshakeException( "Handshake request with invalid Sec-WebSocket-Key header: '{$keyHeader}'", $response->withStatus(426) ); } if (strlen(base64_decode($keyHeader)) != 16) { throw new HandshakeException( "Handshake request with invalid Sec-WebSocket-Key header: '{$keyHeader}'", $response->withStatus(426) ); } $responseKey = base64_encode(pack('H*', sha1($keyHeader . Constant::GUID))); $response = $response ->withHeader('Upgrade', 'websocket') ->withHeader('Connection', 'Upgrade') ->withHeader('Sec-WebSocket-Accept', $responseKey); } catch (HandshakeException $e) { $this->logger->warning("[server] {$e->getMessage()}", ['exception' => $e]); $response = $e->getResponse(); $exception = $e; } // Respond to handshake /** @var Response */ $response = $connection->pushHttp($response); if ($response->getStatusCode() != 101) { $exception = new HandshakeException("Invalid status code {$response->getStatusCode()}", $response); } if ($exception) { throw $exception; } $this->logger->debug("[server] Handshake on {$request->getUri()->getPath()}"); $connection->setHandshakeRequest($request); $connection->setHandshakeResponse($response); return $request; } protected function streams(): StreamCollection { /** @var StreamCollection $streams */ $streams = $this->streams; return $streams; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/000077500000000000000000000000001511205031700264665ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/ListenerTrait.php000066400000000000000000000064131511205031700317740ustar00rootroot00000000000000 $listeners */ private array $listeners = []; /** * @param Closure(T, Connection, RequestInterface|ResponseInterface): void $closure * @deprecated Will be removed in v4 */ public function onConnect(Closure $closure): self { $msg = 'onConnect() is deprecated and will be removed in v4. Use onHandshake() instead.'; trigger_error($msg, E_USER_DEPRECATED); $this->listeners['connect'] = $closure; return $this; } /** @param Closure(T, Connection): void $closure */ public function onDisconnect(Closure $closure): self { $this->listeners['disconnect'] = $closure; return $this; } /** @param Closure(T, Connection, RequestInterface, ResponseInterface): void $closure */ public function onHandshake(Closure $closure): self { $this->listeners['handshake'] = $closure; return $this; } /** @param Closure(T, Connection, Text): void $closure */ public function onText(Closure $closure): self { $this->listeners['text'] = $closure; return $this; } /** @param Closure(T, Connection, Binary): void $closure */ public function onBinary(Closure $closure): self { $this->listeners['binary'] = $closure; return $this; } /** @param Closure(T, Connection, Ping): void $closure */ public function onPing(Closure $closure): self { $this->listeners['ping'] = $closure; return $this; } /** @param Closure(T, Connection, Pong): void $closure */ public function onPong(Closure $closure): self { $this->listeners['pong'] = $closure; return $this; } /** @param Closure(T, Connection, Close): void $closure */ public function onClose(Closure $closure): self { $this->listeners['close'] = $closure; return $this; } /** @param Closure(T, Connection|null, ExceptionInterface): void $closure */ public function onError(Closure $closure): self { $this->listeners['error'] = $closure; return $this; } /** @param Closure(T): void $closure */ public function onTick(Closure $closure): self { $this->listeners['tick'] = $closure; return $this; } /** * @param array{ * 0: T, * 1?: Connection|null, * 2?: Message|Text|Binary|Close|Ping|Pong|RequestInterface|ResponseInterface|ExceptionInterface|null, * 3?: ResponseInterface|null * } $args */ private function dispatch(string $type, array $args): void { if (array_key_exists($type, $this->listeners)) { $closure = $this->listeners[$type]; call_user_func_array($closure, $args); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/LoggerAwareTrait.php000066400000000000000000000016531511205031700324070ustar00rootroot00000000000000logger = $logger ?? new NullLogger(); } public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } public function attachLogger(mixed $instance): void { if ($instance instanceof LoggerAwareInterface) { $instance->setLogger($this->logger); } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/OpcodeTrait.php000066400000000000000000000010331511205031700314110ustar00rootroot00000000000000 $opcodes */ private static array $opcodes = [ 'continuation' => 0, 'text' => 1, 'binary' => 2, 'close' => 8, 'ping' => 9, 'pong' => 10, ]; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/SendMethodsTrait.php000066400000000000000000000032301511205031700324160ustar00rootroot00000000000000send(new Text($message)); } /** * Send binary message. * @param string $message Content as binary string. * @return Binary instance */ public function binary(string $message): Binary { return $this->send(new Binary($message)); } /** * Send ping. * @param string $message Optional text as string. * @return Ping instance */ public function ping(string $message = ''): Ping { return $this->send(new Ping($message)); } /** * Send unsolicited pong. * @param string $message Optional text as string. * @return Pong instance */ public function pong(string $message = ''): Pong { return $this->send(new Pong($message)); } /** * Tell the socket to close. * @param integer $status http://tools.ietf.org/html/rfc6455#section-7.4 * @param string $message A closing message, max 125 bytes. * @return Close instance */ public function close(int $status = 1000, string $message = 'ttfn'): Close { return $this->send(new Close($status, $message)); } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/phrity/websocket/src/Trait/StringableTrait.php000066400000000000000000000010131511205031700322700ustar00rootroot00000000000000=7.1", "psr/http-message": "^1.0 || ^2.0" }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-factory/src/000077500000000000000000000000001511205031700253265ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-factory/src/RequestFactoryInterface.php000066400000000000000000000007631511205031700326460ustar00rootroot00000000000000 `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. > When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-message/docs/PSR7-Usage.md000066400000000000000000000125641511205031700275730ustar00rootroot00000000000000### PSR-7 Usage All PSR-7 applications comply with these interfaces They were created to establish a standard between middleware implementations. > `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. > When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. The following examples will illustrate how basic operations are done in PSR-7. ##### Examples For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) All PSR-7 implementations should have the same behaviour. The following will be assumed: `$request` is an object of `Psr\Http\Message\RequestInterface` and `$response` is an object implementing `Psr\Http\Message\RequestInterface` ### Working with HTTP Headers #### Adding headers to response: ```php $response->withHeader('My-Custom-Header', 'My Custom Message'); ``` #### Appending values to headers ```php $response->withAddedHeader('My-Custom-Header', 'The second message'); ``` #### Checking if header exists: ```php $request->hasHeader('My-Custom-Header'); // will return false $response->hasHeader('My-Custom-Header'); // will return true ``` > Note: My-Custom-Header was only added in the Response #### Getting comma-separated values from a header (also applies to request) ```php // getting value from request headers $request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" // getting value from response headers $response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" ``` #### Getting array of value from a header (also applies to request) ```php // getting value from request headers $request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] // getting value from response headers $response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] ``` #### Removing headers from HTTP Messages ```php // removing a header from Request, removing deprecated "Content-MD5" header $request->withoutHeader('Content-MD5'); // removing a header from Response // effect: the browser won't know the size of the stream // the browser will download the stream till it ends $response->withoutHeader('Content-Length'); ``` ### Working with HTTP Message Body When working with the PSR-7 there are two methods of implementation: #### 1. Getting the body separately > This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. ```php $body = $response->getBody(); // operations on body, eg. read, write, seek // ... // replacing the old body $response->withBody($body); // this last statement is optional as we working with objects // in this case the "new" body is same with the "old" one // the $body variable has the same value as the one in $request, only the reference is passed ``` #### 2. Working directly on response > This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required ```php $response->getBody()->write('hello'); ``` ### Getting the body contents The following snippet gets the contents of a stream contents. > Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. ```php $body = $response->getBody(); $body->rewind(); // or $body->seek(0); $bodyText = $body->getContents(); ``` > Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. ### Append to body ```php $response->getBody()->write('Hello'); // writing directly $body = $request->getBody(); // which is a `StreamInterface` $body->write('xxxxx'); ``` ### Prepend to body Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. The following example will explain the behaviour of streams. ```php // assuming our response is initially empty $body = $repsonse->getBody(); // writing the string "abcd" $body->write('abcd'); // seeking to start of stream $body->seek(0); // writing 'ef' $body->write('ef'); // at this point the stream contains "efcd" ``` #### Prepending by rewriting separately ```php // assuming our response body stream only contains: "abcd" $body = $response->getBody(); $body->rewind(); $contents = $body->getContents(); // abcd // seeking the stream to beginning $body->rewind(); $body->write('ef'); // stream contains "efcd" $body->write($contents); // stream contains "efabcd" ``` > Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. #### Prepending by using contents as a string ```php $body = $response->getBody(); $body->rewind(); $contents = $body->getContents(); // efabcd $contents = 'ef'.$contents; $body->rewind(); $body->write($contents); ``` icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-message/src/000077500000000000000000000000001511205031700253035ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-message/src/MessageInterface.php000066400000000000000000000156761511205031700312400ustar00rootroot00000000000000getHeaders() as $name => $values) { * echo $name . ": " . implode(", ", $values); * } * * // Emit headers iteratively: * foreach ($message->getHeaders() as $name => $values) { * foreach ($values as $value) { * header(sprintf('%s: %s', $name, $value), false); * } * } * * While header names are not case-sensitive, getHeaders() will preserve the * exact case in which headers were originally specified. * * @return string[][] Returns an associative array of the message's headers. Each * key MUST be a header name, and each value MUST be an array of strings * for that header. */ public function getHeaders(): array; /** * Checks if a header exists by the given case-insensitive name. * * @param string $name Case-insensitive header field name. * @return bool Returns true if any header names match the given header * name using a case-insensitive string comparison. Returns false if * no matching header name is found in the message. */ public function hasHeader(string $name): bool; /** * Retrieves a message header value by the given case-insensitive name. * * This method returns an array of all the header values of the given * case-insensitive header name. * * If the header does not appear in the message, this method MUST return an * empty array. * * @param string $name Case-insensitive header field name. * @return string[] An array of string values as provided for the given * header. If the header does not appear in the message, this method MUST * return an empty array. */ public function getHeader(string $name): array; /** * Retrieves a comma-separated string of the values for a single header. * * This method returns all of the header values of the given * case-insensitive header name as a string concatenated together using * a comma. * * NOTE: Not all header values may be appropriately represented using * comma concatenation. For such headers, use getHeader() instead * and supply your own delimiter when concatenating. * * If the header does not appear in the message, this method MUST return * an empty string. * * @param string $name Case-insensitive header field name. * @return string A string of values as provided for the given header * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ public function getHeaderLine(string $name): string; /** * Return an instance with the provided value replacing the specified header. * * While header names are case-insensitive, the casing of the header will * be preserved by this function, and returned from getHeaders(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new and/or updated header and value. * * @param string $name Case-insensitive header field name. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withHeader(string $name, $value): MessageInterface; /** * Return an instance with the specified header appended with the given value. * * Existing values for the specified header will be maintained. The new * value(s) will be appended to the existing list. If the header did not * exist previously, it will be added. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new header and/or value. * * @param string $name Case-insensitive header field name to add. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withAddedHeader(string $name, $value): MessageInterface; /** * Return an instance without the specified header. * * Header resolution MUST be done without case-sensitivity. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that removes * the named header. * * @param string $name Case-insensitive header field name to remove. * @return static */ public function withoutHeader(string $name): MessageInterface; /** * Gets the body of the message. * * @return StreamInterface Returns the body as a stream. */ public function getBody(): StreamInterface; /** * Return an instance with the specified message body. * * The body MUST be a StreamInterface object. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return a new instance that has the * new body stream. * * @param StreamInterface $body Body. * @return static * @throws \InvalidArgumentException When the body is not valid. */ public function withBody(StreamInterface $body): MessageInterface; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-message/src/RequestInterface.php000066400000000000000000000114671511205031700312760ustar00rootroot00000000000000getQuery()` * or from the `QUERY_STRING` server param. * * @return array */ public function getQueryParams(): array; /** * Return an instance with the specified query string arguments. * * These values SHOULD remain immutable over the course of the incoming * request. They MAY be injected during instantiation, such as from PHP's * $_GET superglobal, or MAY be derived from some other value such as the * URI. In cases where the arguments are parsed from the URI, the data * MUST be compatible with what PHP's parse_str() would return for * purposes of how duplicate query parameters are handled, and how nested * sets are handled. * * Setting query string arguments MUST NOT change the URI stored by the * request, nor the values in the server params. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated query string arguments. * * @param array $query Array of query string arguments, typically from * $_GET. * @return static */ public function withQueryParams(array $query): ServerRequestInterface; /** * Retrieve normalized file upload data. * * This method returns upload metadata in a normalized tree, with each leaf * an instance of Psr\Http\Message\UploadedFileInterface. * * These values MAY be prepared from $_FILES or the message body during * instantiation, or MAY be injected via withUploadedFiles(). * * @return array An array tree of UploadedFileInterface instances; an empty * array MUST be returned if no data is present. */ public function getUploadedFiles(): array; /** * Create a new instance with the specified uploaded files. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated body parameters. * * @param array $uploadedFiles An array tree of UploadedFileInterface instances. * @return static * @throws \InvalidArgumentException if an invalid structure is provided. */ public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; /** * Retrieve any parameters provided in the request body. * * If the request Content-Type is either application/x-www-form-urlencoded * or multipart/form-data, and the request method is POST, this method MUST * return the contents of $_POST. * * Otherwise, this method may return any results of deserializing * the request body content; as parsing returns structured content, the * potential types MUST be arrays or objects only. A null value indicates * the absence of body content. * * @return null|array|object The deserialized body parameters, if any. * These will typically be an array or object. */ public function getParsedBody(); /** * Return an instance with the specified body parameters. * * These MAY be injected during instantiation. * * If the request Content-Type is either application/x-www-form-urlencoded * or multipart/form-data, and the request method is POST, use this method * ONLY to inject the contents of $_POST. * * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of * deserializing the request body content. Deserialization/parsing returns * structured data, and, as such, this method ONLY accepts arrays or objects, * or a null value if nothing was available to parse. * * As an example, if content negotiation determines that the request data * is a JSON payload, this method could be used to create a request * instance with the deserialized parameters. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated body parameters. * * @param null|array|object $data The deserialized body data. This will * typically be in an array or object. * @return static * @throws \InvalidArgumentException if an unsupported argument type is * provided. */ public function withParsedBody($data): ServerRequestInterface; /** * Retrieve attributes derived from the request. * * The request "attributes" may be used to allow injection of any * parameters derived from the request: e.g., the results of path * match operations; the results of decrypting cookies; the results of * deserializing non-form-encoded message bodies; etc. Attributes * will be application and request specific, and CAN be mutable. * * @return array Attributes derived from the request. */ public function getAttributes(): array; /** * Retrieve a single derived request attribute. * * Retrieves a single derived request attribute as described in * getAttributes(). If the attribute has not been previously set, returns * the default value as provided. * * This method obviates the need for a hasAttribute() method, as it allows * specifying a default value to return if the attribute is not found. * * @see getAttributes() * @param string $name The attribute name. * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ public function getAttribute(string $name, $default = null); /** * Return an instance with the specified derived request attribute. * * This method allows setting a single derived request attribute as * described in getAttributes(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated attribute. * * @see getAttributes() * @param string $name The attribute name. * @param mixed $value The value of the attribute. * @return static */ public function withAttribute(string $name, $value): ServerRequestInterface; /** * Return an instance that removes the specified derived request attribute. * * This method allows removing a single derived request attribute as * described in getAttributes(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that removes * the attribute. * * @see getAttributes() * @param string $name The attribute name. * @return static */ public function withoutAttribute(string $name): ServerRequestInterface; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/http-message/src/StreamInterface.php000066400000000000000000000113741511205031700310760ustar00rootroot00000000000000 * [user-info@]host[:port] * * * If the port component is not set or is the standard port for the current * scheme, it SHOULD NOT be included. * * @see https://tools.ietf.org/html/rfc3986#section-3.2 * @return string The URI authority, in "[user-info@]host[:port]" format. */ public function getAuthority(): string; /** * Retrieve the user information component of the URI. * * If no user information is present, this method MUST return an empty * string. * * If a user is present in the URI, this will return that value; * additionally, if the password is also present, it will be appended to the * user value, with a colon (":") separating the values. * * The trailing "@" character is not part of the user information and MUST * NOT be added. * * @return string The URI user information, in "username[:password]" format. */ public function getUserInfo(): string; /** * Retrieve the host component of the URI. * * If no host is present, this method MUST return an empty string. * * The value returned MUST be normalized to lowercase, per RFC 3986 * Section 3.2.2. * * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 * @return string The URI host. */ public function getHost(): string; /** * Retrieve the port component of the URI. * * If a port is present, and it is non-standard for the current scheme, * this method MUST return it as an integer. If the port is the standard port * used with the current scheme, this method SHOULD return null. * * If no port is present, and no scheme is present, this method MUST return * a null value. * * If no port is present, but a scheme is present, this method MAY return * the standard port for that scheme, but SHOULD return null. * * @return null|int The URI port. */ public function getPort(): ?int; /** * Retrieve the path component of the URI. * * The path can either be empty or absolute (starting with a slash) or * rootless (not starting with a slash). Implementations MUST support all * three syntaxes. * * Normally, the empty path "" and absolute path "/" are considered equal as * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically * do this normalization because in contexts with a trimmed base path, e.g. * the front controller, this difference becomes significant. It's the task * of the user to handle both "" and "/". * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.3. * * As an example, if the value should include a slash ("/") not intended as * delimiter between path segments, that value MUST be passed in encoded * form (e.g., "%2F") to the instance. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.3 * @return string The URI path. */ public function getPath(): string; /** * Retrieve the query string of the URI. * * If no query string is present, this method MUST return an empty string. * * The leading "?" character is not part of the query and MUST NOT be * added. * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.4. * * As an example, if a value in a key/value pair of the query string should * include an ampersand ("&") not intended as a delimiter between values, * that value MUST be passed in encoded form (e.g., "%26") to the instance. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.4 * @return string The URI query string. */ public function getQuery(): string; /** * Retrieve the fragment component of the URI. * * If no fragment is present, this method MUST return an empty string. * * The leading "#" character is not part of the fragment and MUST NOT be * added. * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.5. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.5 * @return string The URI fragment. */ public function getFragment(): string; /** * Return an instance with the specified scheme. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified scheme. * * Implementations MUST support the schemes "http" and "https" case * insensitively, and MAY accommodate other schemes if required. * * An empty scheme is equivalent to removing the scheme. * * @param string $scheme The scheme to use with the new instance. * @return static A new instance with the specified scheme. * @throws \InvalidArgumentException for invalid or unsupported schemes. */ public function withScheme(string $scheme): UriInterface; /** * Return an instance with the specified user information. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified user information. * * Password is optional, but the user information MUST include the * user; an empty string for the user is equivalent to removing user * information. * * @param string $user The user name to use for authority. * @param null|string $password The password associated with $user. * @return static A new instance with the specified user information. */ public function withUserInfo(string $user, ?string $password = null): UriInterface; /** * Return an instance with the specified host. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified host. * * An empty host value is equivalent to removing the host. * * @param string $host The hostname to use with the new instance. * @return static A new instance with the specified host. * @throws \InvalidArgumentException for invalid hostnames. */ public function withHost(string $host): UriInterface; /** * Return an instance with the specified port. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified port. * * Implementations MUST raise an exception for ports outside the * established TCP and UDP port ranges. * * A null value provided for the port is equivalent to removing the port * information. * * @param null|int $port The port to use with the new instance; a null value * removes the port information. * @return static A new instance with the specified port. * @throws \InvalidArgumentException for invalid ports. */ public function withPort(?int $port): UriInterface; /** * Return an instance with the specified path. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified path. * * The path can either be empty or absolute (starting with a slash) or * rootless (not starting with a slash). Implementations MUST support all * three syntaxes. * * If the path is intended to be domain-relative rather than path relative then * it must begin with a slash ("/"). Paths not starting with a slash ("/") * are assumed to be relative to some base path known to the application or * consumer. * * Users can provide both encoded and decoded path characters. * Implementations ensure the correct encoding as outlined in getPath(). * * @param string $path The path to use with the new instance. * @return static A new instance with the specified path. * @throws \InvalidArgumentException for invalid paths. */ public function withPath(string $path): UriInterface; /** * Return an instance with the specified query string. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified query string. * * Users can provide both encoded and decoded query characters. * Implementations ensure the correct encoding as outlined in getQuery(). * * An empty query string value is equivalent to removing the query string. * * @param string $query The query string to use with the new instance. * @return static A new instance with the specified query string. * @throws \InvalidArgumentException for invalid query strings. */ public function withQuery(string $query): UriInterface; /** * Return an instance with the specified URI fragment. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified URI fragment. * * Users can provide both encoded and decoded fragment characters. * Implementations ensure the correct encoding as outlined in getFragment(). * * An empty fragment value is equivalent to removing the fragment. * * @param string $fragment The fragment to use with the new instance. * @return static A new instance with the specified fragment. */ public function withFragment(string $fragment): UriInterface; /** * Return the string representation as a URI reference. * * Depending on which components of the URI are present, the resulting * string is either a full URI or relative reference according to RFC 3986, * Section 4.1. The method concatenates the various components of the URI, * using the appropriate delimiters: * * - If a scheme is present, it MUST be suffixed by ":". * - If an authority is present, it MUST be prefixed by "//". * - The path can be concatenated without delimiters. But there are two * cases where the path has to be adjusted to make the URI reference * valid as PHP does not allow to throw an exception in __toString(): * - If the path is rootless and an authority is present, the path MUST * be prefixed by "/". * - If the path is starting with more than one "/" and no authority is * present, the starting slashes MUST be reduced to one. * - If a query is present, it MUST be prefixed by "?". * - If a fragment is present, it MUST be prefixed by "#". * * @see http://tools.ietf.org/html/rfc3986#section-4.1 * @return string */ public function __toString(): string; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/000077500000000000000000000000001511205031700226745ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/LICENSE000066400000000000000000000020751511205031700237050ustar00rootroot00000000000000Copyright (c) 2012 PHP Framework Interoperability Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/README.md000066400000000000000000000025021511205031700241520ustar00rootroot00000000000000PSR Log ======= This repository holds all interfaces/classes/traits related to [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). Note that this is not a logger of its own. It is merely an interface that describes a logger. See the specification for more details. Installation ------------ ```bash composer require psr/log ``` Usage ----- If you need a logger, you can use the interface like this: ```php logger = $logger; } public function doSomething() { if ($this->logger) { $this->logger->info('Doing work'); } try { $this->doSomethingElse(); } catch (Exception $exception) { $this->logger->error('Oh no!', array('exception' => $exception)); } // do something useful } } ``` You can then pick one of the implementations of the interface to get a logger. If you want to implement the interface, you can require this package and implement `Psr\Log\LoggerInterface` in your code. Please read the [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) for details. icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/composer.json000066400000000000000000000010531511205031700254150ustar00rootroot00000000000000{ "name": "psr/log", "description": "Common interface for logging libraries", "keywords": ["psr", "psr-3", "log"], "homepage": "https://github.com/php-fig/log", "license": "MIT", "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "require": { "php": ">=8.0.0" }, "autoload": { "psr-4": { "Psr\\Log\\": "src" } }, "extra": { "branch-alias": { "dev-master": "3.x-dev" } } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/src/000077500000000000000000000000001511205031700234635ustar00rootroot00000000000000icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/src/AbstractLogger.php000066400000000000000000000006361511205031700271040ustar00rootroot00000000000000logger = $logger; } } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/src/LoggerInterface.php000066400000000000000000000053221511205031700272360ustar00rootroot00000000000000log(LogLevel::EMERGENCY, $message, $context); } /** * Action must be taken immediately. * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. */ public function alert(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::ALERT, $message, $context); } /** * Critical conditions. * * Example: Application component unavailable, unexpected exception. */ public function critical(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::CRITICAL, $message, $context); } /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. */ public function error(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::ERROR, $message, $context); } /** * Exceptional occurrences that are not errors. * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. */ public function warning(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::WARNING, $message, $context); } /** * Normal but significant events. */ public function notice(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::NOTICE, $message, $context); } /** * Interesting events. * * Example: User logs in, SQL logs. */ public function info(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::INFO, $message, $context); } /** * Detailed debug information. */ public function debug(string|\Stringable $message, array $context = []): void { $this->log(LogLevel::DEBUG, $message, $context); } /** * Logs with an arbitrary level. * * @param mixed $level * * @throws \Psr\Log\InvalidArgumentException */ abstract public function log($level, string|\Stringable $message, array $context = []): void; } icingaweb2-module-pdfexport-0.12.0+dfsg/vendor/psr/log/src/NullLogger.php000066400000000000000000000012031511205031700262420ustar00rootroot00000000000000logger) { }` * blocks. */ class NullLogger extends AbstractLogger { /** * Logs with an arbitrary level. * * @param mixed[] $context * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, string|\Stringable $message, array $context = []): void { // noop } }