One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
www
/
assets
/
images
/
View File Name :
README.md.tar
home/fluxyjvi/public_html/project/vendor/ramsey/collection/README.md 0000644 00000007041 15105633426 0021542 0 ustar 00 <h1 align="center">ramsey/collection</h1> <p align="center"> <strong>A PHP library for representing and manipulating collections.</strong> </p> <p align="center"> <a href="https://github.com/ramsey/collection"><img src="http://img.shields.io/badge/source-ramsey/collection-blue.svg?style=flat-square" alt="Source Code"></a> <a href="https://packagist.org/packages/ramsey/collection"><img src="https://img.shields.io/packagist/v/ramsey/collection.svg?style=flat-square&label=release" alt="Download Package"></a> <a href="https://php.net"><img src="https://img.shields.io/packagist/php-v/ramsey/collection.svg?style=flat-square&colorB=%238892BF" alt="PHP Programming Language"></a> <a href="https://github.com/ramsey/collection/blob/master/LICENSE"><img src="https://img.shields.io/packagist/l/ramsey/collection.svg?style=flat-square&colorB=darkcyan" alt="Read License"></a> <a href="https://github.com/ramsey/collection/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/actions/workflow/status/ramsey/collection/continuous-integration.yml?branch=main&logo=github&style=flat-square" alt="Build Status"></a> <a href="https://codecov.io/gh/ramsey/collection"><img src="https://img.shields.io/codecov/c/gh/ramsey/collection?label=codecov&logo=codecov&style=flat-square" alt="Codecov Code Coverage"></a> <a href="https://shepherd.dev/github/ramsey/collection"><img src="https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Framsey%2Fcollection%2Fcoverage" alt="Psalm Type Coverage"></a> </p> ## About ramsey/collection is a PHP library for representing and manipulating collections. Much inspiration for this library came from the [Java Collections Framework][java]. This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code. ## Installation Install this package as a dependency using [Composer](https://getcomposer.org). ``` bash composer require ramsey/collection ``` ## Usage Examples of how to use this library may be found in the [Wiki pages](https://github.com/ramsey/collection/wiki/Examples). ## Contributing Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md). ## Coordinated Disclosure Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read [SECURITY.md][] for instructions on submitting a vulnerability report. ## ramsey/collection for Enterprise Available as part of the Tidelift Subscription. The maintainers of ramsey/collection and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-ramsey-collection?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) ## Copyright and License The ramsey/collection library is copyright Β© [Ben Ramsey](https://benramsey.com) and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information. [java]: http://docs.oracle.com/javase/8/docs/technotes/guides/collections/index.html [security.md]: https://github.com/ramsey/collection/blob/main/SECURITY.md home/fluxyjvi/public_html/project/vendor/nicmart/tree/README.md 0000644 00000014241 15105650070 0020475 0 ustar 00 # Tree [](https://github.com/nicmart/Tree/actions) [](https://github.com/nicmart/Tree/actions) [](https://packagist.org/packages/nicmart/tree) [](https://packagist.org/packages/nicmart/tree) [](https://packagist.org/packages/nicmart/tree) In Tree you can find a basic but flexible tree data structure for php together with and an handful Builder class, that enables you to build tree in a fluent way. ## The tree data structure The `Tree\Node\NodeInterface` interface abstracts the concept of a tree node. In `Tree` a Node has essentially two things: a set of children (that implements the same `NodeInterface` interface) and a value. On the other hand, the `Tree\Node\Node` gives a straight implementation for that interface. ### Creating a node ```php use Tree\Node\Node; $node = new Node('foo'); ``` ### Getting and setting the value of a node Each node has a value property, that can be any php value. ```php $node->setValue('my value'); echo $node->getValue(); //Prints 'my value' ``` ### Adding one or more children ```php $child1 = new Node('child1'); $child2 = new Node('child2'); $node ->addChild($child1) ->addChild($child2); ``` ### Removing a child ```php $node->removeChild($child1); ``` ### Getting the array of all children ```php $children = $node->getChildren(); ``` ### Overwriting the children set ```php $node->setChildren([new Node('foo'), new Node('bar')]); ``` ### Removing all children ```php $node->removeAllChildren(); ``` ### Getting if the node is a leaf or not A leaf is a node with no children. ```php $node->isLeaf(); ``` ### Getting if the node is a child or not A child is a node that has a parent. ```php $node->isChild(); ``` ### Getting the parent of a node Reference to the parent node is automatically managed by child-modifiers methods ```php $root->addChild($node = new Node('child')); $node->getParent(); // Returns $root ``` ### Getting the ancestors of a node ```php $root = (new Node('root')) ->addChild($child = new Node('child')) ->addChild($grandChild = new Node('grandchild')) ; $grandchild->getAncestors(); // Returns [$root, $child] ``` #### Related Methods - `getAncestorsAndSelf` retrieves ancestors of a node with the current node included. ### Getting the root of a node ```php $root = $node->root(); ``` ### Getting the neighbors of a node ```php $root = (new Node('root')) ->addChild($child1 = new Node('child1')) ->addChild($child2 = new Node('child2')) ->addChild($child3 = new Node('child3')) ; $child2->getNeighbors(); // Returns [$child1, $child3] ``` #### Related Methods - `getNeighborsAndSelf` retrieves neighbors of current node and the node itself. ### Getting the number of nodes in the tree ```php $node->getSize(); ``` ### Getting the depth of a node ```php $node->getDepth(); ``` ### Getting the height of a node ```php $node->getHeight(); ``` ## The Builder The builder provides a convenient way to build trees. It is provided by the ```Builder``` class, but you can implement your own builder making an implementation of the ```BuilderInterface```class. ### Example Let's see how to build the following tree, where the nodes label are represents nodes values: ``` A / \ B C /|\ D E F /| G H ``` And here is the code: ```php $builder = new Tree\Builder\NodeBuilder; $builder ->value('A') ->leaf('B') ->tree('C') ->tree('D') ->leaf('G') ->leaf('H') ->end() ->leaf('E') ->leaf('F') ->end() ; $nodeA = $builder->getNode(); ``` The example should be self-explanatory, but here you are a brief description of the methods used above. ### Builder::value($value) Set the value of the current node to ```$value``` ### Builder::leaf($value) Add to the current node a new child whose value is ```$value```. ### Builder::tree($value) Add to the current node a new child whose value is ```$value```, and set the new node as the builder current node. ### Builder::end() Returns to the context the builder was before the call to ```tree```method, i.e. make the builder go one level up. ### Builder::getNode() Returns the current node. ## Traversing a tree ### Yield You can obtain the yield of a tree (i.e. the list of leaves in a pre-order traversal) using the YieldVisitor. For example, if `$node` is the tree built above, then ```php use Tree\Visitor\YieldVisitor; $visitor = new YieldVisitor; $yield = $node->accept($visitor); // $yield will contain nodes B, G, H, E, F ``` ### Pre-order Traversal You can walk a tree in pre-order: ```php use Tree\Visitor\PreOrderVisitor; $visitor = new PreOrderVisitor; $yield = $node->accept($visitor); // $yield will contain nodes A, B, C, D, G, H, E, F ``` ### Post-order Traversal You can walk a tree in post-order: ```php use Tree\Visitor\PostOrderVisitor; $visitor = new PostOrderVisitor; $yield = $node->accept($visitor); // $yield will contain nodes B, G, H, D, E, F, C, A ``` ## Install The best way to install Tree is [through composer](http://getcomposer.org). Just create a composer.json file for your project: ```JSON { "require": { "nicmart/tree": "~0.2" } } ``` Then you can run these two commands to install it: $ curl -s http://getcomposer.org/installer | php $ php composer.phar install or simply run `composer install` if you have have already [installed the composer globally](http://getcomposer.org/doc/00-intro.md#globally). Then you can include the autoloader, and you will have access to the library classes: ```php <?php require 'vendor/autoload.php'; ``` # Tests ``` phpunit ``` ## Changelog Please have a look at [`CHANGELOG.md`](CHANGELOG.md). ## Contributing Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md). ## License This package is licensed using the MIT License. Please have a look at [`LICENSE.md`](LICENSE.md). home/fluxyjvi/public_html/project/vendor/doctrine/inflector/README.md 0000644 00000001015 15105703736 0021700 0 ustar 00 # Doctrine Inflector Doctrine Inflector is a small library that can perform string manipulations with regard to uppercase/lowercase and singular/plural forms of words. [](https://github.com/doctrine/inflector/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.0.x) [](https://codecov.io/gh/doctrine/inflector/branch/2.0.x) home/fluxyjvi/public_html/project/vendor/laravel/tinker/README.md 0000644 00000002756 15107327044 0021037 0 ustar 00 <p align="center"><img src="/art/logo.svg" alt="Logo Laravel Tinker"></p> <p align="center"> <a href="https://github.com/laravel/tinker/actions"><img src="https://github.com/laravel/tinker/workflows/tests/badge.svg" alt="Build Status"></a> <a href="https://packagist.org/packages/laravel/tinker"><img src="https://img.shields.io/packagist/dt/laravel/tinker" alt="Total Downloads"></a> <a href="https://packagist.org/packages/laravel/tinker"><img src="https://img.shields.io/packagist/v/laravel/tinker" alt="Latest Stable Version"></a> <a href="https://packagist.org/packages/laravel/tinker"><img src="https://img.shields.io/packagist/l/laravel/tinker" alt="License"></a> </p> ## Introduction Laravel Tinker is a powerful REPL for the Laravel framework. ## Official Documentation Documentation for Tinker can be found on the [Laravel website](https://laravel.com/docs/artisan#tinker). ## Contributing Thank you for considering contributing to Tinker! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). ## Code of Conduct In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). ## Security Vulnerabilities Please review [our security policy](https://github.com/laravel/tinker/security/policy) on how to report security vulnerabilities. ## License Laravel Tinker is open-sourced software licensed under the [MIT license](LICENSE.md). home/fluxyjvi/public_html/project/vendor/sebastian/code-unit/README.md 0000644 00000002025 15107340676 0021750 0 ustar 00 [](https://packagist.org/packages/sebastian/code-unit) [](https://github.com/sebastianbergmann/code-unit/actions) [](https://shepherd.dev/github/sebastianbergmann/code-unit) [](https://codecov.io/gh/sebastianbergmann/code-unit) # sebastian/code-unit Collection of value objects that represent the PHP code units. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require sebastian/code-unit ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev sebastian/code-unit ``` home/fluxyjvi/public_html/project/vendor/mercadopago/dx-php/README.md 0000644 00000006061 15107350220 0021557 0 ustar 00 # Mercado Pago SDK for PHP [](https://packagist.org/packages/mercadopago/dx-php) [](https://packagist.org/packages/mercadopago/dx-php) [](https://packagist.org/packages/mercadopago/dx-php) This library provides developers with a simple set of bindings to help you integrate Mercado Pago API to a website and start receiving payments. ## π‘ Requirements PHP 5.6, 7.1 or higher ## π» Installation First time using Mercado Pago? Create your [Mercado Pago account](https://www.mercadopago.com), if you donβt have one already. 1. Download [Composer](https://getcomposer.org/doc/00-intro.md) if not already installed 2. On your project directory run on the command line `composer require "mercadopago/dx-php:2.6.1"` for PHP7 or `composer require "mercadopago/dx-php:1.12.5"` for PHP5.6. 3. Copy the access_token in the [credentials](https://www.mercadopago.com/mlb/account/credentials) section of the page and replace YOUR_ACCESS_TOKEN with it. That's it! Mercado Pago SDK has been successfully installed. ## π Getting Started Simple usage looks like: ```php <?php require_once 'vendor/autoload.php'; // You have to require the library from your Composer vendor folder MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); // Either Production or SandBox AccessToken $payment = new MercadoPago\Payment(); $payment->transaction_amount = 141; $payment->token = "YOUR_CARD_TOKEN"; $payment->description = "Ergonomic Silk Shirt"; $payment->installments = 1; $payment->payment_method_id = "visa"; $payment->payer = array( "email" => "larue.nienow@email.com" ); $payment->save(); echo $payment->status; ?> ``` ## π Documentation Visit our Dev Site for further information regarding: - Payments APIs: [Spanish](https://www.mercadopago.com.ar/developers/es/guides/payments/api/introduction/) / [Portuguese](https://www.mercadopago.com.br/developers/pt/guides/payments/api/introduction/) - Mercado Pago checkout: [Spanish](https://www.mercadopago.com.ar/developers/es/guides/payments/web-payment-checkout/introduction/) / [Portuguese](https://www.mercadopago.com.br/developers/pt/guides/payments/web-payment-checkout/introduction/) - Web Tokenize checkout: [Spanish](https://www.mercadopago.com.ar/developers/es/guides/payments/web-tokenize-checkout/introduction/) / [Portuguese](https://www.mercadopago.com.br/developers/pt/guides/payments/web-tokenize-checkout/introduction/) Check [our official code reference](https://www.mercadopago.com.br/developers/pt/docs/sdks-library/server-side) to explore all available functionalities. ## β€οΈ Support If you require technical support, please contact our support team at [developers.mercadopago.com](https://developers.mercadopago.com) ## π» License ``` MIT license. Copyright (c) 2018 - Mercado Pago / Mercado Libre For more information, see the LICENSE file. ``` home/fluxyjvi/public_html/project/vendor/doctrine/annotations/README.md 0000644 00000002773 15107350344 0022257 0 ustar 00 β οΈ PHP 8 introduced [attributes](https://www.php.net/manual/en/language.attributes.overview.php), which are a native replacement for annotations. As such, this library is considered feature complete, and should receive exclusively bugfixes and security fixes. # Doctrine Annotations [](https://github.com/doctrine/persistence/actions) [](https://www.versioneye.com/package/php--doctrine--annotations) [](https://www.versioneye.com/php/doctrine:annotations/references) [](https://packagist.org/packages/doctrine/annotations) [](https://packagist.org/packages/doctrine/annotations) Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). ## Documentation See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html). ## Contributing When making a pull request, make sure your changes follow the [Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). home/fluxyjvi/public_html/project/vendor/doctrine/lexer/README.md 0000644 00000000557 15107350360 0021035 0 ustar 00 # Doctrine Lexer [](https://github.com/doctrine/lexer/actions) Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). https://www.doctrine-project.org/projects/lexer.html home/fluxyjvi/public_html/project/vendor/psr/cache/README.md 0000644 00000001042 15107350741 0017747 0 ustar 00 Caching Interface ============== This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url]. Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism. The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. [psr-url]: https://www.php-fig.org/psr/psr-6/ [package-url]: https://packagist.org/packages/psr/cache [implementation-url]: https://packagist.org/providers/psr/cache-implementation home/fluxyjvi/public_html/project/vendor/ramsey/uuid/README.md 0000644 00000010003 15107356715 0020352 0 ustar 00 <h1 align="center">ramsey/uuid</h1> <p align="center"> <strong>A PHP library for generating and working with UUIDs.</strong> </p> <p align="center"> <a href="https://github.com/ramsey/uuid"><img src="http://img.shields.io/badge/source-ramsey/uuid-blue.svg?style=flat-square" alt="Source Code"></a> <a href="https://packagist.org/packages/ramsey/uuid"><img src="https://img.shields.io/packagist/v/ramsey/uuid.svg?style=flat-square&label=release" alt="Download Package"></a> <a href="https://php.net"><img src="https://img.shields.io/packagist/php-v/ramsey/uuid.svg?style=flat-square&colorB=%238892BF" alt="PHP Programming Language"></a> <a href="https://github.com/ramsey/uuid/blob/4.x/LICENSE"><img src="https://img.shields.io/packagist/l/ramsey/uuid.svg?style=flat-square&colorB=darkcyan" alt="Read License"></a> <a href="https://github.com/ramsey/uuid/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/actions/workflow/status/ramsey/uuid/continuous-integration.yml?branch=4.x&logo=github&style=flat-square" alt="Build Status"></a> <a href="https://app.codecov.io/gh/ramsey/uuid/branch/4.x"><img src="https://img.shields.io/codecov/c/github/ramsey/uuid/4.x?label=codecov&logo=codecov&style=flat-square" alt="Codecov Code Coverage"></a> <a href="https://shepherd.dev/github/ramsey/uuid"><img src="https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Framsey%2Fuuid%2Fcoverage" alt="Psalm Type Coverage"></a> </p> ramsey/uuid is a PHP library for generating and working with universally unique identifiers (UUIDs). This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code. Much inspiration for this library came from the [Java][javauuid] and [Python][pyuuid] UUID libraries. ## Installation The preferred method of installation is via [Composer][]. Run the following command to install the package and add it as a requirement to your project's `composer.json`: ```bash composer require ramsey/uuid ``` ## Upgrading to Version 4 See the documentation for a thorough upgrade guide: * [Upgrading ramsey/uuid Version 3 to 4](https://uuid.ramsey.dev/en/stable/upgrading/3-to-4.html) ## Documentation Please see <https://uuid.ramsey.dev> for documentation, tips, examples, and frequently asked questions. ## Contributing Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md). ## Coordinated Disclosure Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read [SECURITY.md][] for instructions on submitting a vulnerability report. ## ramsey/uuid for Enterprise Available as part of the Tidelift Subscription. The maintainers of ramsey/uuid and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-ramsey-uuid?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) ## Copyright and License The ramsey/uuid library is copyright Β© [Ben Ramsey](https://benramsey.com/) and licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information. [rfc4122]: http://tools.ietf.org/html/rfc4122 [conduct]: https://github.com/ramsey/uuid/blob/4.x/CODE_OF_CONDUCT.md [javauuid]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html [pyuuid]: http://docs.python.org/3/library/uuid.html [composer]: http://getcomposer.org/ [contributing.md]: https://github.com/ramsey/uuid/blob/4.x/CONTRIBUTING.md [security.md]: https://github.com/ramsey/uuid/blob/4.x/SECURITY.md [license]: https://github.com/ramsey/uuid/blob/4.x/LICENSE home/fluxyjvi/public_html/project/vendor/guzzlehttp/psr7/README.md 0000644 00000071104 15107364462 0021226 0 ustar 00 # PSR-7 Message Implementation This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/) message implementation, several stream decorators, and some helpful functionality like query string parsing.   ## Features This package comes with a number of stream implementations and stream decorators. ## Installation ```shell composer require guzzlehttp/psr7 ``` ## Version Guidance | Version | Status | PHP Version | |---------|---------------------|--------------| | 1.x | Security fixes only | >=5.4,<8.1 | | 2.x | Latest | >=7.2.5,<8.4 | ## AppendStream `GuzzleHttp\Psr7\AppendStream` Reads from multiple streams, one after the other. ```php use GuzzleHttp\Psr7; $a = Psr7\Utils::streamFor('abc, '); $b = Psr7\Utils::streamFor('123.'); $composed = new Psr7\AppendStream([$a, $b]); $composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); echo $composed; // abc, 123. Above all listen to me. ``` ## BufferStream `GuzzleHttp\Psr7\BufferStream` Provides a buffer stream that can be written to fill a buffer, and read from to remove bytes from the buffer. This stream returns a "hwm" metadata value that tells upstream consumers what the configured high water mark of the stream is, or the maximum preferred size of the buffer. ```php use GuzzleHttp\Psr7; // When more than 1024 bytes are in the buffer, it will begin returning // false to writes. This is an indication that writers should slow down. $buffer = new Psr7\BufferStream(1024); ``` ## CachingStream The CachingStream is used to allow seeking over previously read bytes on non-seekable streams. This can be useful when transferring a non-seekable entity body fails due to needing to rewind the stream (for example, resulting from a redirect). Data that is read from the remote stream will be buffered in a PHP temp stream so that previously read bytes are cached first in memory, then on disk. ```php use GuzzleHttp\Psr7; $original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); $stream = new Psr7\CachingStream($original); $stream->read(1024); echo $stream->tell(); // 1024 $stream->seek(0); echo $stream->tell(); // 0 ``` ## DroppingStream `GuzzleHttp\Psr7\DroppingStream` Stream decorator that begins dropping data once the size of the underlying stream becomes too full. ```php use GuzzleHttp\Psr7; // Create an empty stream $stream = Psr7\Utils::streamFor(); // Start dropping data when the stream has more than 10 bytes $dropping = new Psr7\DroppingStream($stream, 10); $dropping->write('01234567890123456789'); echo $stream; // 0123456789 ``` ## FnStream `GuzzleHttp\Psr7\FnStream` Compose stream implementations based on a hash of functions. Allows for easy testing and extension of a provided stream without needing to create a concrete class for a simple extension point. ```php use GuzzleHttp\Psr7; $stream = Psr7\Utils::streamFor('hi'); $fnStream = Psr7\FnStream::decorate($stream, [ 'rewind' => function () use ($stream) { echo 'About to rewind - '; $stream->rewind(); echo 'rewound!'; } ]); $fnStream->rewind(); // Outputs: About to rewind - rewound! ``` ## InflateStream `GuzzleHttp\Psr7\InflateStream` Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content. This stream decorator converts the provided stream to a PHP stream resource, then appends the zlib.inflate filter. The stream is then converted back to a Guzzle stream resource to be used as a Guzzle stream. ## LazyOpenStream `GuzzleHttp\Psr7\LazyOpenStream` Lazily reads or writes to a file that is opened only after an IO operation take place on the stream. ```php use GuzzleHttp\Psr7; $stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); // The file has not yet been opened... echo $stream->read(10); // The file is opened and read from only when needed. ``` ## LimitStream `GuzzleHttp\Psr7\LimitStream` LimitStream can be used to read a subset or slice of an existing stream object. This can be useful for breaking a large file into smaller pieces to be sent in chunks (e.g. Amazon S3's multipart upload API). ```php use GuzzleHttp\Psr7; $original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); echo $original->getSize(); // >>> 1048576 // Limit the size of the body to 1024 bytes and start reading from byte 2048 $stream = new Psr7\LimitStream($original, 1024, 2048); echo $stream->getSize(); // >>> 1024 echo $stream->tell(); // >>> 0 ``` ## MultipartStream `GuzzleHttp\Psr7\MultipartStream` Stream that when read returns bytes for a streaming multipart or multipart/form-data stream. ## NoSeekStream `GuzzleHttp\Psr7\NoSeekStream` NoSeekStream wraps a stream and does not allow seeking. ```php use GuzzleHttp\Psr7; $original = Psr7\Utils::streamFor('foo'); $noSeek = new Psr7\NoSeekStream($original); echo $noSeek->read(3); // foo var_export($noSeek->isSeekable()); // false $noSeek->seek(0); var_export($noSeek->read(3)); // NULL ``` ## PumpStream `GuzzleHttp\Psr7\PumpStream` Provides a read only stream that pumps data from a PHP callable. When invoking the provided callable, the PumpStream will pass the amount of data requested to read to the callable. The callable can choose to ignore this value and return fewer or more bytes than requested. Any extra data returned by the provided callable is buffered internally until drained using the read() function of the PumpStream. The provided callable MUST return false when there is no more data to read. ## Implementing stream decorators Creating a stream decorator is very easy thanks to the `GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that implement `Psr\Http\Message\StreamInterface` by proxying to an underlying stream. Just `use` the `StreamDecoratorTrait` and implement your custom methods. For example, let's say we wanted to call a specific function each time the last byte is read from a stream. This could be implemented by overriding the `read()` method. ```php use Psr\Http\Message\StreamInterface; use GuzzleHttp\Psr7\StreamDecoratorTrait; class EofCallbackStream implements StreamInterface { use StreamDecoratorTrait; private $callback; private $stream; public function __construct(StreamInterface $stream, callable $cb) { $this->stream = $stream; $this->callback = $cb; } public function read($length) { $result = $this->stream->read($length); // Invoke the callback when EOF is hit. if ($this->eof()) { call_user_func($this->callback); } return $result; } } ``` This decorator could be added to any existing stream and used like so: ```php use GuzzleHttp\Psr7; $original = Psr7\Utils::streamFor('foo'); $eofStream = new EofCallbackStream($original, function () { echo 'EOF!'; }); $eofStream->read(2); $eofStream->read(1); // echoes "EOF!" $eofStream->seek(0); $eofStream->read(3); // echoes "EOF!" ``` ## PHP StreamWrapper You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a PSR-7 stream as a PHP stream resource. Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP stream from a PSR-7 stream. ```php use GuzzleHttp\Psr7\StreamWrapper; $stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); $resource = StreamWrapper::getResource($stream); echo fread($resource, 6); // outputs hello! ``` # Static API There are various static methods available under the `GuzzleHttp\Psr7` namespace. ## `GuzzleHttp\Psr7\Message::toString` `public static function toString(MessageInterface $message): string` Returns the string representation of an HTTP message. ```php $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); echo GuzzleHttp\Psr7\Message::toString($request); ``` ## `GuzzleHttp\Psr7\Message::bodySummary` `public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` Get a short summary of the message body. Will return `null` if the response is not printable. ## `GuzzleHttp\Psr7\Message::rewindBody` `public static function rewindBody(MessageInterface $message): void` Attempts to rewind a message body and throws an exception on failure. The body of the message will only be rewound if a call to `tell()` returns a value other than `0`. ## `GuzzleHttp\Psr7\Message::parseMessage` `public static function parseMessage(string $message): array` Parses an HTTP message into an associative array. The array contains the "start-line" key containing the start line of the message, "headers" key containing an associative array of header array values, and a "body" key containing the body of the message. ## `GuzzleHttp\Psr7\Message::parseRequestUri` `public static function parseRequestUri(string $path, array $headers): string` Constructs a URI for an HTTP request message. ## `GuzzleHttp\Psr7\Message::parseRequest` `public static function parseRequest(string $message): Request` Parses a request message string into a request object. ## `GuzzleHttp\Psr7\Message::parseResponse` `public static function parseResponse(string $message): Response` Parses a response message string into a response object. ## `GuzzleHttp\Psr7\Header::parse` `public static function parse(string|array $header): array` Parse an array of header values containing ";" separated data into an array of associative arrays representing the header key value pair data of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value. ## `GuzzleHttp\Psr7\Header::splitList` `public static function splitList(string|string[] $header): string[]` Splits a HTTP header defined to contain a comma-separated list into each individual value: ``` $knownEtags = Header::splitList($request->getHeader('if-none-match')); ``` Example headers include `accept`, `cache-control` and `if-none-match`. ## `GuzzleHttp\Psr7\Header::normalize` (deprecated) `public static function normalize(string|array $header): array` `Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist) which performs the same operation with a cleaned up API and improved documentation. Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values. ## `GuzzleHttp\Psr7\Query::parse` `public static function parse(string $str, int|bool $urlEncoding = true): array` Parse a query string into an associative array. If multiple values are found for the same key, the value of that key value pair will become an array. This function does not parse nested PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. ## `GuzzleHttp\Psr7\Query::build` `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` Build a query string from an array of key value pairs. This function can use the return value of `parse()` to build a query string. This function does not modify the provided keys when an array is encountered (like `http_build_query()` would). ## `GuzzleHttp\Psr7\Utils::caselessRemove` `public static function caselessRemove(iterable<string> $keys, $keys, array $data): array` Remove the items given by the keys, case insensitively from the data. ## `GuzzleHttp\Psr7\Utils::copyToStream` `public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` Copy the contents of a stream into another stream until the given number of bytes have been read. ## `GuzzleHttp\Psr7\Utils::copyToString` `public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` Copy the contents of a stream into a string until the given number of bytes have been read. ## `GuzzleHttp\Psr7\Utils::hash` `public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` Calculate a hash of a stream. This method reads the entire stream to calculate a rolling hash, based on PHP's `hash_init` functions. ## `GuzzleHttp\Psr7\Utils::modifyRequest` `public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` Clone and modify a request with the given changes. This method is useful for reducing the number of clones needed to mutate a message. - method: (string) Changes the HTTP method. - set_headers: (array) Sets the given headers. - remove_headers: (array) Remove the given headers. - body: (mixed) Sets the given body. - uri: (UriInterface) Set the URI. - query: (string) Set the query string value of the URI. - version: (string) Set the protocol version. ## `GuzzleHttp\Psr7\Utils::readLine` `public static function readLine(StreamInterface $stream, int $maxLength = null): string` Read a line from the stream up to the maximum allowed buffer length. ## `GuzzleHttp\Psr7\Utils::streamFor` `public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` Create a new stream based on the input type. Options is an associative array that can contain the following keys: - metadata: Array of custom metadata. - size: Size of the stream. This method accepts the following `$resource` types: - `Psr\Http\Message\StreamInterface`: Returns the value as-is. - `string`: Creates a stream object that uses the given string as the contents. - `resource`: Creates a stream object that wraps the given PHP stream resource. - `Iterator`: If the provided value implements `Iterator`, then a read-only stream object will be created that wraps the given iterable. Each time the stream is read from, data from the iterator will fill a buffer and will be continuously called until the buffer is equal to the requested read size. Subsequent read calls will first read from the buffer and then call `next` on the underlying iterator until it is exhausted. - `object` with `__toString()`: If the object has the `__toString()` method, the object will be cast to a string and then a stream will be returned that uses the string value. - `NULL`: When `null` is passed, an empty stream object is returned. - `callable` When a callable is passed, a read-only stream object will be created that invokes the given callable. The callable is invoked with the number of suggested bytes to read. The callable can return any number of bytes, but MUST return `false` when there is no more data to return. The stream object that wraps the callable will invoke the callable until the number of requested bytes are available. Any additional bytes will be buffered and used in subsequent reads. ```php $stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); $stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); $generator = function ($bytes) { for ($i = 0; $i < $bytes; $i++) { yield ' '; } } $stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); ``` ## `GuzzleHttp\Psr7\Utils::tryFopen` `public static function tryFopen(string $filename, string $mode): resource` Safely opens a PHP stream resource using a filename. When fopen fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead. ## `GuzzleHttp\Psr7\Utils::tryGetContents` `public static function tryGetContents(resource $stream): string` Safely gets the contents of a given stream. When stream_get_contents fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead. ## `GuzzleHttp\Psr7\Utils::uriFor` `public static function uriFor(string|UriInterface $uri): UriInterface` Returns a UriInterface for the given value. This function accepts a string or UriInterface and returns a UriInterface for the given value. If the value is already a UriInterface, it is returned as-is. ## `GuzzleHttp\Psr7\MimeType::fromFilename` `public static function fromFilename(string $filename): string|null` Determines the mimetype of a file by looking at its extension. ## `GuzzleHttp\Psr7\MimeType::fromExtension` `public static function fromExtension(string $extension): string|null` Maps a file extensions to a mimetype. ## Upgrading from Function API The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0. A migration table has been provided here for your convenience: | Original Function | Replacement Method | |----------------|----------------| | `str` | `Message::toString` | | `uri_for` | `Utils::uriFor` | | `stream_for` | `Utils::streamFor` | | `parse_header` | `Header::parse` | | `normalize_header` | `Header::normalize` | | `modify_request` | `Utils::modifyRequest` | | `rewind_body` | `Message::rewindBody` | | `try_fopen` | `Utils::tryFopen` | | `copy_to_string` | `Utils::copyToString` | | `copy_to_stream` | `Utils::copyToStream` | | `hash` | `Utils::hash` | | `readline` | `Utils::readLine` | | `parse_request` | `Message::parseRequest` | | `parse_response` | `Message::parseResponse` | | `parse_query` | `Query::parse` | | `build_query` | `Query::build` | | `mimetype_from_filename` | `MimeType::fromFilename` | | `mimetype_from_extension` | `MimeType::fromExtension` | | `_parse_message` | `Message::parseMessage` | | `_parse_request_uri` | `Message::parseRequestUri` | | `get_message_body_summary` | `Message::bodySummary` | | `_caseless_remove` | `Utils::caselessRemove` | # Additional URI Methods Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, this library also provides additional functionality when working with URIs as static methods. ## URI Types An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms according to [RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - network-path references, e.g. `//example.com/path` - absolute-path references, e.g. `/path` - relative-path references, e.g. `subpath` The following methods can be used to identify the type of the URI. ### `GuzzleHttp\Psr7\Uri::isAbsolute` `public static function isAbsolute(UriInterface $uri): bool` Whether the URI is absolute, i.e. it has a scheme. ### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` `public static function isNetworkPathReference(UriInterface $uri): bool` Whether the URI is a network-path reference. A relative reference that begins with two slash characters is termed an network-path reference. ### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` `public static function isAbsolutePathReference(UriInterface $uri): bool` Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is termed an absolute-path reference. ### `GuzzleHttp\Psr7\Uri::isRelativePathReference` `public static function isRelativePathReference(UriInterface $uri): bool` Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference. ### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` `public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its fragment component, identical to the base URI. When no base URI is given, only an empty URI reference (apart from its fragment) is considered a same-document reference. ## URI Components Additional methods to work with URI components. ### `GuzzleHttp\Psr7\Uri::isDefaultPort` `public static function isDefaultPort(UriInterface $uri): bool` Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used independently of the implementation. ### `GuzzleHttp\Psr7\Uri::composeComponents` `public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` Composes a URI reference string from its various components according to [RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. ### `GuzzleHttp\Psr7\Uri::fromParts` `public static function fromParts(array $parts): UriInterface` Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components. ### `GuzzleHttp\Psr7\Uri::withQueryValue` `public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` Creates a new URI with a specific query string value. Any existing query string values that exactly match the provided key are removed and replaced with the given key value pair. A value of null will set the query string key without a value, e.g. "key" instead of "key=value". ### `GuzzleHttp\Psr7\Uri::withQueryValues` `public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an associative array of key => value. ### `GuzzleHttp\Psr7\Uri::withoutQueryValue` `public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the provided key are removed. ## Cross-Origin Detection `GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin. ### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin` `public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool` Determines if a modified URL should be considered cross-origin with respect to an original URL. ## Reference Resolution `GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers do when resolving a link in a website based on the current request URI. ### `GuzzleHttp\Psr7\UriResolver::resolve` `public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` Converts the relative URI into a new URI that is resolved against the base URI. ### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` `public static function removeDotSegments(string $path): string` Removes dot segments from a path and returns the new path according to [RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). ### `GuzzleHttp\Psr7\UriResolver::relativize` `public static function relativize(UriInterface $base, UriInterface $target): UriInterface` Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): ```php (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) ``` One use-case is to use the current request URI as base URI and then generate relative links in your documents to reduce the document size or offer self-contained downloadable document archives. ```php $base = new Uri('http://example.com/a/b/'); echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. ``` ## Normalization and Comparison `GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to [RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). ### `GuzzleHttp\Psr7\UriNormalizer::normalize` `public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask of normalizations to apply. The following normalizations are available: - `UriNormalizer::PRESERVING_NORMALIZATIONS` Default normalizations which only include the ones that preserve semantics. - `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. Example: `http://example.org/a%c2%b1b` β `http://example.org/a%C2%B1b` - `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of ALPHA (%41β%5A and %61β%7A), DIGIT (%30β%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. Example: `http://example.org/%7Eusern%61me/` β `http://example.org/~username/` - `UriNormalizer::CONVERT_EMPTY_PATH` Converts the empty path to "/" for http and https URIs. Example: `http://example.org` β `http://example.org/` - `UriNormalizer::REMOVE_DEFAULT_HOST` Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to RFC 3986. Example: `file://localhost/myfile` β `file:///myfile` - `UriNormalizer::REMOVE_DEFAULT_PORT` Removes the default port of the given URI scheme from the URI. Example: `http://example.org:80/` β `http://example.org/` - `UriNormalizer::REMOVE_DOT_SEGMENTS` Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would change the semantics of the URI reference. Example: `http://example.org/../a/b/../c/./d.html` β `http://example.org/a/c/d.html` - `UriNormalizer::REMOVE_DUPLICATE_SLASHES` Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization may change the semantics. Encoded slashes (%2F) are not removed. Example: `http://example.org//foo///bar.html` β `http://example.org/foo/bar.html` - `UriNormalizer::SORT_QUERY_PARAMETERS` Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be significant (this is not defined by the standard). So this normalization is not safe and may change the semantics of the URI. Example: `?lang=en&article=fred` β `?article=fred&lang=en` ### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` `public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given `$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. This of course assumes they will be resolved against the same base URI. If this is not the case, determination of equivalence or difference of relative references does not mean anything. ## Security If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. ## For Enterprise Available as part of the Tidelift Subscription The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) home/fluxyjvi/public_html/project/vendor/psr/clock/README.md 0000644 00000002744 15107366716 0020022 0 ustar 00 # PSR Clock This repository holds the interface for [PSR-20][psr-url]. Note that this is not a clock of its own. It is merely an interface that describes a clock. See the specification for more details. ## Installation ```bash composer require psr/clock ``` ## Usage If you need a clock, you can use the interface like this: ```php <?php use Psr\Clock\ClockInterface; class Foo { private ClockInterface $clock; public function __construct(ClockInterface $clock) { $this->clock = $clock; } public function doSomething() { /** @var DateTimeImmutable $currentDateAndTime */ $currentDateAndTime = $this->clock->now(); // do something useful with that information } } ``` You can then pick one of the [implementations][implementation-url] of the interface to get a clock. If you want to implement the interface, you can require this package and implement `Psr\Clock\ClockInterface` in your code. Don't forget to add `psr/clock-implementation` to your `composer.json`s `provides`-section like this: ```json { "provides": { "psr/clock-implementation": "1.0" } } ``` And please read the [specification text][specification-url] for details on the interface. [psr-url]: https://www.php-fig.org/psr/psr-20 [package-url]: https://packagist.org/packages/psr/clock [implementation-url]: https://packagist.org/providers/psr/clock-implementation [specification-url]: https://github.com/php-fig/fig-standards/blob/master/proposed/clock.md home/fluxyjvi/public_html/project/vendor/mockery/mockery/docs/README.md 0000644 00000000124 15107373323 0022153 0 ustar 00 mockery-docs ============ Document for the PHP Mockery framework on readthedocs.org home/fluxyjvi/public_html/project/vendor/league/commonmark/README.md 0000644 00000027654 15107402435 0021524 0 ustar 00 # league/commonmark [](https://packagist.org/packages/league/commonmark) [](https://packagist.org/packages/league/commonmark) [](LICENSE) [](https://github.com/thephpleague/commonmark/actions?query=workflow%3ATests+branch%3Amain) [](https://scrutinizer-ci.com/g/thephpleague/commonmark/code-structure) [](https://scrutinizer-ci.com/g/thephpleague/commonmark) [](https://shepherd.dev/github/thephpleague/commonmark) [](https://bestpractices.coreinfrastructure.org/projects/126) [](https://www.colinodell.com/sponsor)  **league/commonmark** is a highly-extensible PHP Markdown parser created by [Colin O'Dell][@colinodell] which supports the full [CommonMark] spec and [GitHub-Flavored Markdown]. It is based on the [CommonMark JS reference implementation][commonmark.js] by [John MacFarlane] \([@jgm]\). ## π¦ Installation & Basic Usage This project requires PHP 7.4 or higher with the `mbstring` extension. To install it via [Composer] simply run: ``` bash $ composer require league/commonmark ``` The `CommonMarkConverter` class provides a simple wrapper for converting CommonMark to HTML: ```php use League\CommonMark\CommonMarkConverter; $converter = new CommonMarkConverter([ 'html_input' => 'strip', 'allow_unsafe_links' => false, ]); echo $converter->convert('# Hello World!'); // <h1>Hello World!</h1> ``` Or if you want GitHub-Flavored Markdown, use the `GithubFlavoredMarkdownConverter` class instead: ```php use League\CommonMark\GithubFlavoredMarkdownConverter; $converter = new GithubFlavoredMarkdownConverter([ 'html_input' => 'strip', 'allow_unsafe_links' => false, ]); echo $converter->convert('# Hello World!'); // <h1>Hello World!</h1> ``` Please note that only UTF-8 and ASCII encodings are supported. If your Markdown uses a different encoding please convert it to UTF-8 before running it through this library. π If you will be parsing untrusted input from users, please consider setting the `html_input` and `allow_unsafe_links` options per the example above. See <https://commonmark.thephpleague.com/security/> for more details. If you also do choose to allow raw HTML input from untrusted users, consider using a library (like [HTML Purifier](https://github.com/ezyang/htmlpurifier)) to provide additional HTML filtering. ## π Documentation Full documentation on advanced usage, configuration, and customization can be found at [commonmark.thephpleague.com][docs]. ## β« Upgrading Information on how to upgrade to newer versions of this library can be found at <https://commonmark.thephpleague.com/releases>. ## π» GitHub-Flavored Markdown The `GithubFlavoredMarkdownConverter` shown earlier is a drop-in replacement for the `CommonMarkConverter` which adds additional features found in the GFM spec: - Autolinks - Disallowed raw HTML - Strikethrough - Tables - Task Lists See the [Extensions documentation](https://commonmark.thephpleague.com/customization/extensions/) for more details on how to include only certain GFM features if you don't want them all. ## ποΈ Related Packages ### Integrations - [CakePHP 3](https://github.com/gourmet/common-mark) - [Drupal](https://www.drupal.org/project/markdown) - [Laravel 4+](https://github.com/GrahamCampbell/Laravel-Markdown) - [Sculpin](https://github.com/bcremer/sculpin-commonmark-bundle) - [Symfony 2 & 3](https://github.com/webuni/commonmark-bundle) - [Symfony 4](https://github.com/avensome/commonmark-bundle) - [Twig Markdown extension](https://github.com/twigphp/markdown-extension) - [Twig filter and tag](https://github.com/aptoma/twig-markdown) - [Laravel CommonMark Blog](https://github.com/spekulatius/laravel-commonmark-blog) ### Included Extensions See [our extension documentation](https://commonmark.thephpleague.com/extensions/overview) for a full list of extensions bundled with this library. ### Community Extensions Custom parsers/renderers can be bundled into extensions which extend CommonMark. Here are some that you may find interesting: - [Alt Three Emoji](https://github.com/AltThree/Emoji) An emoji parser for CommonMark. - [Sup Sub extensions](https://github.com/OWS/commonmark-sup-sub-extensions) - Adds support of superscript and subscript (`<sup>` and `<sub>` HTML tags) - [YouTube iframe extension](https://github.com/zoonru/commonmark-ext-youtube-iframe) - Replaces youtube link with iframe. - [Lazy Image extension](https://github.com/simonvomeyser/commonmark-ext-lazy-image) - Adds various options for lazy loading of images. - [Marker Extension](https://github.com/noah1400/commonmark-marker-extension) - Adds support of highlighted text (`<mark>` HTML tag) Others can be found on [Packagist under the `commonmark-extension` package type](https://packagist.org/packages/league/commonmark?type=commonmark-extension). If you build your own, feel free to submit a PR to add it to this list! ### Others Check out the other cool things people are doing with `league/commonmark`: <https://packagist.org/packages/league/commonmark/dependents> ## π·οΈ Versioning [SemVer](http://semver.org/) is followed closely. Minor and patch releases should not introduce breaking changes to the codebase; however, they might change the resulting AST or HTML output of parsed Markdown (due to bug fixes, spec changes, etc.) As a result, you might get slightly different HTML, but any custom code built onto this library should still function correctly. Any classes or methods marked `@internal` are not intended for use outside of this library and are subject to breaking changes at any time, so please avoid using them. ## π οΈ Maintenance & Support When a new **minor** version (e.g. `2.0` -> `2.1`) is released, the previous one (`2.0`) will continue to receive security and critical bug fixes for *at least* 3 months. When a new **major** version is released (e.g. `1.6` -> `2.0`), the previous one (`1.6`) will receive critical bug fixes for *at least* 3 months and security updates for 6 months after that new release comes out. (This policy may change in the future and exceptions may be made on a case-by-case basis.) **Professional support, including notification of new releases and security updates, is available through a [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-league-commonmark?utm_source=packagist-league-commonmark&utm_medium=referral&utm_campaign=readme).** ## π·ββοΈ Contributing To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure with us. If you encounter a bug in the spec, please report it to the [CommonMark] project. Any resulting fix will eventually be implemented in this project as well. Contributions to this library are **welcome**, especially ones that: * Improve usability or flexibility without compromising our ability to adhere to the [CommonMark spec] * Mirror fixes made to the [reference implementation][commonmark.js] * Optimize performance * Fix issues with adhering to the [CommonMark spec] Major refactoring to core parsing logic should be avoided if possible so that we can easily follow updates made to [the reference implementation][commonmark.js]. That being said, we will absolutely consider changes which don't deviate too far from the reference spec or which are favored by other popular CommonMark implementations. Please see [CONTRIBUTING](https://github.com/thephpleague/commonmark/blob/main/.github/CONTRIBUTING.md) for additional details. ## π§ͺ Testing ``` bash $ composer test ``` This will also test league/commonmark against the latest supported spec. ## π Performance Benchmarks You can compare the performance of **league/commonmark** to other popular parsers by running the included benchmark tool: ``` bash $ ./tests/benchmark/benchmark.php ``` ## π₯ Credits & Acknowledgements - [Colin O'Dell][@colinodell] - [John MacFarlane][@jgm] - [All Contributors] This code is partially based on the [CommonMark JS reference implementation][commonmark.js] which is written, maintained and copyrighted by [John MacFarlane]. This project simply wouldn't exist without his work. ### Sponsors We'd also like to extend our sincere thanks the following sponsors who support ongoing development of this project: - [Tidelift](https://tidelift.com/subscription/pkg/packagist-league-commonmark?utm_source=packagist-league-commonmark&utm_medium=referral&utm_campaign=readme) for offering support to both the maintainers and end-users through their [professional support](https://tidelift.com/subscription/pkg/packagist-league-commonmark?utm_source=packagist-league-commonmark&utm_medium=referral&utm_campaign=readme) program - [Blackfire](https://www.blackfire.io/) for providing an Open-Source Profiler subscription - [JetBrains](https://www.jetbrains.com/) for supporting this project with complimentary [PhpStorm](https://www.jetbrains.com/phpstorm/) licenses - [Taylor Otwell](https://twitter.com/taylorotwell) for sponsoring this project through GitHub sponsors Are you interested in sponsoring development of this project? See <https://www.colinodell.com/sponsor> for a list of ways to contribute. ## π License **league/commonmark** is licensed under the BSD-3 license. See the [`LICENSE`](LICENSE) file for more details. ## ποΈ Governance This project is primarily maintained by [Colin O'Dell][@colinodell]. Members of the [PHP League] Leadership Team may occasionally assist with some of these duties. ## πΊοΈ Who Uses It? This project is used by [Drupal](https://www.drupal.org/project/markdown), [Laravel Framework](https://laravel.com/), [Cachet](https://cachethq.io/), [Firefly III](https://firefly-iii.org/), [Neos](https://www.neos.io/), [Daux.io](https://daux.io/), and [more](https://packagist.org/packages/league/commonmark/dependents)! --- <div align="center"> <b> <a href="https://tidelift.com/subscription/pkg/packagist-league-commonmark?utm_source=packagist-league-commonmark&utm_medium=referral&utm_campaign=readme">Get professional support for league/commonmark with a Tidelift subscription</a> </b> <br> <sub> Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. </sub> </div> [CommonMark]: http://commonmark.org/ [CommonMark spec]: http://spec.commonmark.org/ [commonmark.js]: https://github.com/jgm/commonmark.js [GitHub-Flavored Markdown]: https://github.github.com/gfm/ [John MacFarlane]: http://johnmacfarlane.net [docs]: https://commonmark.thephpleague.com/ [docs-examples]: https://commonmark.thephpleague.com/customization/overview/#examples [docs-example-twitter]: https://commonmark.thephpleague.com/customization/inline-parsing#example-1---twitter-handles [docs-example-smilies]: https://commonmark.thephpleague.com/customization/inline-parsing#example-2---emoticons [All Contributors]: https://github.com/thephpleague/commonmark/contributors [@colinodell]: https://www.twitter.com/colinodell [@jgm]: https://github.com/jgm [jgm/stmd]: https://github.com/jgm/stmd [Composer]: https://getcomposer.org/ [PHP League]: https://thephpleague.com home/fluxyjvi/public_html/project/vendor/moneyphp/money/README.md 0000644 00000007171 15107413626 0021101 0 ustar 00 # Money [](https://github.com/moneyphp/money/releases)  [](https://packagist.org/packages/moneyphp/money) [](mailto:team@moneyphp.org)  PHP library to make working with money safer, easier, and fun! > "If I had a dime for every time I've seen someone use FLOAT to store currency, I'd have $999.997634" -- [Bill Karwin](https://twitter.com/billkarwin/status/347561901460447232) In short: You shouldn't represent monetary values by a float. Wherever you need to represent money, use this Money value object. Since version 3.0 this library uses [strings internally](https://github.com/moneyphp/money/pull/136) in order to support unlimited integers. ```php <?php use Money\Money; $fiveEur = Money::EUR(500); $tenEur = $fiveEur->add($fiveEur); list($part1, $part2, $part3) = $tenEur->allocate([1, 1, 1]); assert($part1->equals(Money::EUR(334))); assert($part2->equals(Money::EUR(333))); assert($part3->equals(Money::EUR(333))); ``` The documentation is available at http://moneyphp.org ## Requirements This library requires the [BCMath PHP extension](https://www.php.net/manual/en/book.bc.php). There might be additional dependencies for specific feature, e.g. the Swap exchange implementation, check the documentation for more information. Version 4 requires PHP 8.0. For older version of PHP, use version 3 of this library. ## Install Via Composer ```bash $ composer require moneyphp/money ``` ## Features - JSON Serialization - Big integer support utilizing different, transparent calculation logic upon availability (bcmath, gmp, plain php) - Money formatting (including intl formatter) - Currency repositories (ISO currencies included) - Money exchange (including [Swap](http://swap.voutzinos.org) implementation) ## Documentation Please see the [official documentation](http://moneyphp.org). ## Testing We try to follow BDD and TDD, as such we use both [phpspec](http://www.phpspec.net) and [phpunit](https://phpunit.de) to test this library. ```bash $ composer test ``` ### Running the tests in Docker Money requires a set of dependencies, so you might want to run it in Docker. First, build the image locally: ```bash $ docker build -t moneyphp . ``` Then run the tests: ```bash $ docker run --rm -it -v $PWD:/app -w /app moneyphp vendor/bin/phpunit --exclude-group segmentation ``` ## Contributing We would love to see you helping us to make this library better and better. Please keep in mind we do not use suffixes and prefixes in class names, so not `CurrenciesInterface`, but `Currencies`. Other than that, Style CI will help you using the same code style as we are using. Please provide tests when creating a PR and clear descriptions of bugs when filing issues. ## Security If you discover any security related issues, please contact us at [team@moneyphp.org](mailto:team@moneyphp.org). ## License The MIT License (MIT). Please see [License File](LICENSE) for more information. ## Acknowledgements This library is heavily inspired by [Martin Fowler's Money pattern](http://martinfowler.com/eaaCatalog/money.html). A special remark goes to [Mathias Verraes](https://github.com/mathiasverraes), without his contributions, in code and via his [blog](http://verraes.net/#blog), this library would not be where it stands now. home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/README.md 0000644 00000002053 15107413737 0022122 0 ustar 00 [](https://packagist.org/packages/sebastian/cli-parser) [](https://github.com/sebastianbergmann/cli-parser/actions) [](https://shepherd.dev/github/sebastianbergmann/cli-parser) [](https://codecov.io/gh/sebastianbergmann/cli-parser) # sebastian/cli-parser Library for parsing `$_SERVER['argv']`, extracted from `phpunit/phpunit`. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require sebastian/cli-parser ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev sebastian/cli-parser ``` home/fluxyjvi/public_html/project/vendor/sebastian/comparator/README.md 0000644 00000003073 15107416520 0022224 0 ustar 00 [](https://packagist.org/packages/sebastian/comparator) [](https://github.com/sebastianbergmann/comparator/actions) [](https://shepherd.dev/github/sebastianbergmann/comparator) [](https://codecov.io/gh/sebastianbergmann/comparator) # sebastian/comparator This component provides the functionality to compare PHP values for equality. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require sebastian/comparator ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev sebastian/comparator ``` ## Usage ```php <?php use SebastianBergmann\Comparator\Factory; use SebastianBergmann\Comparator\ComparisonFailure; $date1 = new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')); $date2 = new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago')); $factory = new Factory; $comparator = $factory->getComparatorFor($date1, $date2); try { $comparator->assertEquals($date1, $date2); print "Dates match"; } catch (ComparisonFailure $failure) { print "Dates don't match"; } ``` home/fluxyjvi/public_html/project/vendor/league/glide/README.md 0000644 00000007066 15107421534 0020441 0 ustar 00 # Glide [](https://github.com/thephpleague/glide/releases) [](https://github.com/thephpleague/glide/blob/master/LICENSE) [](https://github.com/thephpleague/glide/actions/workflows/test.yaml?query=branch%3Amaster++) [](https://app.codecov.io/gh/thephpleague/glide/) [](https://packagist.org/packages/league/glide) [](https://github.com/thephpleague/glide) [](https://twitter.com/reinink) [](https://twitter.com/titouangalopin) Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like [Imgix](http://www.imgix.com/) and [Cloudinary](http://cloudinary.com/). Glide leverages powerful libraries like [Intervention Image](http://image.intervention.io/) (for image handling and manipulation) and [Flysystem](http://flysystem.thephpleague.com/) (for file system abstraction). [](https://glide.herokuapp.com/1.0/kayaks.jpg?w=1000) > Β© Photo Joel Reynolds ## Highlights - Adjust, resize and add effects to images using a simple HTTP based API. - Manipulated images are automatically cached and served with far-future expires headers. - Create your own image processing server or integrate Glide directly into your app. - Supports both the [GD](http://php.net/manual/en/book.image.php) library and the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension. - Supports many response methods, including PSR-7, HttpFoundation and more. - Ability to secure image URLs using HTTP signatures. - Works with many different file systems, thanks to the [Flysystem](http://flysystem.thephpleague.com/) library. - Powered by the battle tested [Intervention Image](http://image.intervention.io/) image handling and manipulation library. - Framework-agnostic, will work with any project. - Composer ready and PSR-2 compliant. ## Documentation Full documentation can be found at [glide.thephpleague.com](http://glide.thephpleague.com). ## Installation Glide is available via Composer: ```bash $ composer require league/glide ``` ## Testing Glide has a [PHPUnit](https://phpunit.de/) test suite. To run the tests, run the following command from the project folder: ```bash $ phpunit ``` ## Contributing Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](https://github.com/thephpleague/glide/blob/master/CONTRIBUTING.md) for details. ## Security If you discover any security related issues, please email jonathan@reinink.ca instead of using the issue tracker. ## Credits - [Jonathan Reinink](https://github.com/reinink) - [All Contributors](https://github.com/thephpleague/glide/contributors) ## License The MIT License (MIT). Please see [LICENSE](https://github.com/thephpleague/glide/blob/master/LICENSE) for more information. home/fluxyjvi/public_html/project/vendor/monolog/monolog/README.md 0000644 00000014117 15107441662 0021236 0 ustar 00  # Monolog - Logging for PHP [](https://github.com/Seldaek/monolog/actions) [](https://packagist.org/packages/monolog/monolog) [](https://packagist.org/packages/monolog/monolog) >**Note** This is the **documentation for Monolog 3.x**, if you are using older releases >see the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md) Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete list of handlers below. Special handlers allow you to build advanced logging strategies. This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) interface that you can type-hint against in your own libraries to keep a maximum of interoperability. You can also use it in your applications to make sure you can always use another compatible logger at a later time. As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. Internally Monolog still uses its own level scheme since it predates PSR-3. ## Installation Install the latest version with ```bash $ composer require monolog/monolog ``` ## Basic Usage ```php <?php use Monolog\Level; use Monolog\Logger; use Monolog\Handler\StreamHandler; // create a log channel $log = new Logger('name'); $log->pushHandler(new StreamHandler('path/to/your.log', Level::Warning)); // add records to the log $log->warning('Foo'); $log->error('Bar'); ``` ## Documentation - [Usage Instructions](doc/01-usage.md) - [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) - [Utility Classes](doc/03-utilities.md) - [Extending Monolog](doc/04-extending.md) - [Log Record Structure](doc/message-structure.md) ## Support Monolog Financially Get supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog&utm_medium=referral&utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek). Tidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. ## Third Party Packages Third party handlers, formatters and processors are [listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You can also add your own there if you publish one. ## About ### Requirements - Monolog `^3.0` works with PHP 8.1 or above. - Monolog `^2.5` works with PHP 7.2 or above. - Monolog `^1.25` works with PHP 5.3 up to 8.1, but is not very maintained anymore and will not receive PHP support fixes anymore. ### Support Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 or 3 where possible to benefit from all the latest features and fixes. ### Submitting bugs and feature requests Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) ### Framework Integrations - Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) can be used very easily with Monolog since it implements the interface. - [Symfony](http://symfony.com) comes out of the box with Monolog. - [Laravel](http://laravel.com/) comes out of the box with Monolog. - [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. - [PPI](https://github.com/ppi/framework) comes out of the box with Monolog. - [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. - [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. - [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. - [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. - [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions. - [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. - [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog. - [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog. - [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins. - [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog. - [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog. - [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module. - [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension. - [Magento](https://magento.com/) comes out of the box with Monolog. - [Spiral Framework](https://spiral.dev) comes out of the box with Monolog bridge. ### Author Jordi Boggiano - <j.boggiano@seld.be> - <http://twitter.com/seldaek><br /> See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project. ### License Monolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details ### Acknowledgements This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) library, although most concepts have been adjusted to fit to the PHP world. home/fluxyjvi/public_html/project/vendor/masterminds/html5/README.md 0000644 00000023141 15107467624 0021474 0 ustar 00 > # UKRAINE NEEDS YOUR HELP NOW! > > On 24 February 2022, Russian [President Vladimir Putin ordered an invasion of Ukraine by Russian Armed Forces](https://www.bbc.com/news/world-europe-60504334). > > Your support is urgently needed. > > - Donate to the volunteers. Here is the volunteer fund helping the Ukrainian army to provide all the necessary equipment: > https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi or https://savelife.in.ua/en/donate/ > - Triple-check social media sources. Russian disinformation is attempting to coverup and distort the reality in Ukraine. > - Help Ukrainian refugees who are fleeing Russian attacks and shellings: https://www.globalcitizen.org/en/content/ways-to-help-ukraine-conflict/ > - Put pressure on your political representatives to provide help to Ukraine. > - Believe in the Ukrainian people, they will not surrender, they don't have another Ukraine. > > THANK YOU! ---- # HTML5-PHP HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. It is stable and used in many production websites, and has well over [five million downloads](https://packagist.org/packages/masterminds/html5). HTML5 provides the following features. - An HTML5 serializer - Support for PHP namespaces - Composer support - Event-based (SAX-like) parser - A DOM tree builder - Interoperability with [QueryPath](https://github.com/technosophos/querypath) - Runs on **PHP** 5.3.0 or newer [](https://travis-ci.org/Masterminds/html5-php) [](https://packagist.org/packages/masterminds/html5) [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [](https://masterminds.github.io/stability/sustained.html) ## Installation Install HTML5-PHP using [composer](http://getcomposer.org/). By adding the `masterminds/html5` dependency to your `composer.json` file: ```json { "require" : { "masterminds/html5": "^2.0" }, } ``` By invoking require command via composer executable: ```bash composer require masterminds/html5 ``` ## Basic Usage HTML5-PHP has a high-level API and a low-level API. Here is how you use the high-level `HTML5` library API: ```php <?php // Assuming you installed from Composer: require "vendor/autoload.php"; use Masterminds\HTML5; // An example HTML document: $html = <<< 'HERE' <html> <head> <title>TEST</title> </head> <body id='foo'> <h1>Hello World</h1> <p>This is a test of the HTML5 parser.</p> </body> </html> HERE; // Parse the document. $dom is a DOMDocument. $html5 = new HTML5(); $dom = $html5->loadHTML($html); // Render it as HTML5: print $html5->saveHTML($dom); // Or save it to a file: $html5->save($dom, 'out.html'); ``` The `$dom` created by the parser is a full `DOMDocument` object. And the `save()` and `saveHTML()` methods will take any DOMDocument. ### Options It is possible to pass in an array of configuration options when loading an HTML5 document. ```php // An associative array of options $options = array( 'option_name' => 'option_value', ); // Provide the options to the constructor $html5 = new HTML5($options); $dom = $html5->loadHTML($html); ``` The following options are supported: * `encode_entities` (boolean): Indicates that the serializer should aggressively encode characters as entities. Without this, it only encodes the bare minimum. * `disable_html_ns` (boolean): Prevents the parser from automatically assigning the HTML5 namespace to the DOM document. This is for non-namespace aware DOM tools. * `target_document` (\DOMDocument): A DOM document that will be used as the destination for the parsed nodes. * `implicit_namespaces` (array): An assoc array of namespaces that should be used by the parser. Name is tag prefix, value is NS URI. ## The Low-Level API This library provides the following low-level APIs that you can use to create more customized HTML5 tools: - A SAX-like event-based parser that you can hook into for special kinds of parsing. - A flexible error-reporting mechanism that can be tuned to document syntax checking. - A DOM implementation that uses PHP's built-in DOM library. The unit tests exercise each piece of the API, and every public function is well-documented. ### Parser Design The parser is designed as follows: - The `Scanner` handles scanning on behalf of the parser. - The `Tokenizer` requests data off of the scanner, parses it, clasifies it, and sends it to an `EventHandler`. It is a *recursive descent parser.* - The `EventHandler` receives notifications and data for each specific semantic event that occurs during tokenization. - The `DOMBuilder` is an `EventHandler` that listens for tokenizing events and builds a document tree (`DOMDocument`) based on the events. ### Serializer Design The serializer takes a data structure (the `DOMDocument`) and transforms it into a character representation -- an HTML5 document. The serializer is broken into three parts: - The `OutputRules` contain the rules to turn DOM elements into strings. The rules are an implementation of the interface `RulesInterface` allowing for different rule sets to be used. - The `Traverser`, which is a special-purpose tree walker. It visits each node node in the tree and uses the `OutputRules` to transform the node into a string. - `HTML5` manages the `Traverser` and stores the resultant data in the correct place. The serializer (`save()`, `saveHTML()`) follows the [section 8.9 of the HTML 5.0 spec](http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#serializing-html-fragments). So tags are serialized according to these rules: - A tag with children: <foo>CHILDREN</foo> - A tag that cannot have content: <foo> (no closing tag) - A tag that could have content, but doesn't: <foo></foo> ## Known Issues (Or, Things We Designed Against the Spec) Please check the issue queue for a full list, but the following are issues known issues that are not presently on the roadmap: - Namespaces: HTML5 only [supports a selected list of namespaces](http://www.w3.org/TR/html5/infrastructure.html#namespaces) and they do not operate in the same way as XML namespaces. A `:` has no special meaning. By default the parser does not support XML style namespaces via `:`; to enable the XML namespaces see the [XML Namespaces section](#xml-namespaces) - Scripts: This parser does not contain a JavaScript or a CSS interpreter. While one may be supplied, not all features will be supported. - Reentrance: The current parser is not re-entrant. (Thus you can't pause the parser to modify the HTML string mid-parse.) - Validation: The current tree builder is **not** a validating parser. While it will correct some HTML, it does not check that the HTML conforms to the standard. (Should you wish, you can build a validating parser by extending DOMTree or building your own EventHandler implementation.) * There is limited support for insertion modes. * Some autocorrection is done automatically. * Per the spec, many legacy tags are admitted and correctly handled, even though they are technically not part of HTML5. - Attribute names and values: Due to the implementation details of the PHP implementation of DOM, attribute names that do not follow the XML 1.0 standard are not inserted into the DOM. (Effectively, they are ignored.) If you've got a clever fix for this, jump in! - Processor Instructions: The HTML5 spec does not allow processor instructions. We do. Since this is a server-side library, we think this is useful. And that means, dear reader, that in some cases you can parse the HTML from a mixed PHP/HTML document. This, however, is an incidental feature, not a core feature. - HTML manifests: Unsupported. - PLAINTEXT: Unsupported. - Adoption Agency Algorithm: Not yet implemented. (8.2.5.4.7) ## XML Namespaces To use XML style namespaces you have to configure well the main `HTML5` instance. ```php use Masterminds\HTML5; $html = new HTML5(array( "xmlNamespaces" => true )); $dom = $html->loadHTML('<t:tag xmlns:t="http://www.example.com"/>'); $dom->documentElement->namespaceURI; // http://www.example.com ``` You can also add some default prefixes that will not require the namespace declaration, but its elements will be namespaced. ```php use Masterminds\HTML5; $html = new HTML5(array( "implicitNamespaces"=>array( "t"=>"http://www.example.com" ) )); $dom = $html->loadHTML('<t:tag/>'); $dom->documentElement->namespaceURI; // http://www.example.com ``` ## Thanks to... The dedicated (and patient) contributors of patches small and large, who have already made this library better.See the CREDITS file for a list of contributors. We owe a huge debt of gratitude to the original authors of html5lib. While not much of the original parser remains, we learned a lot from reading the html5lib library. And some pieces remain here. In particular, much of the UTF-8 and Unicode handling is derived from the html5lib project. ## License This software is released under the MIT license. The original html5lib library was also released under the MIT license. See LICENSE.txt Certain files contain copyright assertions by specific individuals involved with html5lib. Those have been retained where appropriate. home/fluxyjvi/public_html/project/vendor/sebastian/complexity/README.md 0000644 00000002033 15107471353 0022252 0 ustar 00 [](https://packagist.org/packages/sebastian/complexity) [](https://github.com/sebastianbergmann/complexity/actions) [](https://shepherd.dev/github/sebastianbergmann/complexity) [](https://codecov.io/gh/sebastianbergmann/complexity) # sebastian/complexity Library for calculating the complexity of PHP code units. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require sebastian/complexity ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev sebastian/complexity ``` home/fluxyjvi/public_html/project/vendor/phpunit/php-timer/README.md 0000644 00000004732 15107474600 0021506 0 ustar 00 # phpunit/php-timer [](https://packagist.org/packages/phpunit/php-timer) [](https://github.com/sebastianbergmann/php-timer/actions) [](https://shepherd.dev/github/sebastianbergmann/php-timer) [](https://codecov.io/gh/sebastianbergmann/php-timer) Utility class for timing things, factored out of PHPUnit into a stand-alone component. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require phpunit/php-timer ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev phpunit/php-timer ``` ## Usage ### Basic Timing ```php require __DIR__ . '/vendor/autoload.php'; use SebastianBergmann\Timer\Timer; $timer = new Timer; $timer->start(); foreach (\range(0, 100000) as $i) { // ... } $duration = $timer->stop(); var_dump(get_class($duration)); var_dump($duration->asString()); var_dump($duration->asSeconds()); var_dump($duration->asMilliseconds()); var_dump($duration->asMicroseconds()); var_dump($duration->asNanoseconds()); ``` The code above yields the output below: ``` string(32) "SebastianBergmann\Timer\Duration" string(9) "00:00.002" float(0.002851062) float(2.851062) float(2851.062) int(2851062) ``` ### Resource Consumption #### Explicit duration ```php require __DIR__ . '/vendor/autoload.php'; use SebastianBergmann\Timer\ResourceUsageFormatter; use SebastianBergmann\Timer\Timer; $timer = new Timer; $timer->start(); foreach (\range(0, 100000) as $i) { // ... } print (new ResourceUsageFormatter)->resourceUsage($timer->stop()); ``` The code above yields the output below: ``` Time: 00:00.002, Memory: 6.00 MB ``` #### Duration since PHP Startup (using unreliable `$_SERVER['REQUEST_TIME_FLOAT']`) ```php require __DIR__ . '/vendor/autoload.php'; use SebastianBergmann\Timer\ResourceUsageFormatter; foreach (\range(0, 100000) as $i) { // ... } print (new ResourceUsageFormatter)->resourceUsageSinceStartOfRequest(); ``` The code above yields the output below: ``` Time: 00:00.002, Memory: 6.00 MB ``` home/fluxyjvi/public_html/project/vendor/league/config/README.md 0000644 00000016002 15107507415 0020613 0 ustar 00 # league/config [](https://packagist.org/packages/league/config) [](https://packagist.org/packages/league/config) [](LICENSE) [](https://github.com/thephpleague/config/actions?query=workflow%3ATests+branch%3Amain) [](https://scrutinizer-ci.com/g/thephpleague/config/code-structure) [](https://scrutinizer-ci.com/g/thephpleague/config) [](https://www.colinodell.com/sponsor) **league/config** helps you define nested configuration arrays with strict schemas and access configuration values with dot notation. It was created by [Colin O'Dell][@colinodell]. ## π¦ Installation This project requires PHP 7.4 or higher. To install it via [Composer] simply run: ```bash composer require league/config ``` ## π§°οΈ Basic Usage The `Configuration` class provides everything you need to define the configuration structure and fetch values: ```php use League\Config\Configuration; use Nette\Schema\Expect; // Define your configuration schema $config = new Configuration([ 'database' => Expect::structure([ 'driver' => Expect::anyOf('mysql', 'postgresql', 'sqlite')->required(), 'host' => Expect::string()->default('localhost'), 'port' => Expect::int()->min(1)->max(65535), 'ssl' => Expect::bool(), 'database' => Expect::string()->required(), 'username' => Expect::string()->required(), 'password' => Expect::string()->nullable(), ]), 'logging' => Expect::structure([ 'enabled' => Expect::bool()->default($_ENV['DEBUG'] == true), 'file' => Expect::string()->deprecated("use logging.path instead"), 'path' => Expect::string()->assert(function ($path) { return \is_writeable($path); })->required(), ]), ]); // Set the values, either all at once with `merge()`: $config->merge([ 'database' => [ 'driver' => 'mysql', 'port' => 3306, 'database' => 'mydb', 'username' => 'user', 'password' => 'secret', ], ]); // Or one-at-a-time with `set()`: $config->set('logging.path', '/var/log/myapp.log'); // You can now retrieve those values with `get()`. // Validation and defaults will be applied for you automatically $config->get('database'); // Fetches the entire "database" section as an array $config->get('database.driver'); // Fetch a specific nested value with dot notation $config->get('database/driver'); // Fetch a specific nested value with slash notation $config->get('database.host'); // Returns the default value "localhost" $config->get('logging.path'); // Guaranteed to be writeable thanks to the assertion in the schema // If validation fails an `InvalidConfigurationException` will be thrown: $config->set('database.driver', 'mongodb'); $config->get('database.driver'); // InvalidConfigurationException // Attempting to fetch a non-existent key will result in an `InvalidConfigurationException` $config->get('foo.bar'); // You could avoid this by checking whether that item exists: $config->exists('foo.bar'); // Returns `false` ``` ## π Documentation Full documentation can be found at [config.thephpleague.com][docs]. ## π Philosophy This library aims to provide a **simple yet opinionated** approach to configuration with the following goals: - The configuration should operate on **arrays with nested values** which are easily accessible - The configuration structure should be **defined with strict schemas** defining the overall structure, allowed types, and allowed values - Schemas should be defined using a **simple, fluent interface** - You should be able to **add and combine schemas but never modify existing ones** - Both the configuration values and the schema should be **defined and managed with PHP code** - Schemas should be **immutable**; they should never change once they are set - Configuration values should never define or influence the schemas As a result, this library will likely **never** support features like: - Loading and/or exporting configuration values or schemas using YAML, XML, or other files - Parsing configuration values from a command line or other user interface - Dynamically changing the schema, allowed values, or default values based on other configuration values If you need that functionality you should check out other libraries like: - [symfony/config] - [symfony/options-resolver] - [hassankhan/config] - [consolidation/config] - [laminas/laminas-config] ## π·οΈ Versioning [SemVer](http://semver.org/) is followed closely. Minor and patch releases should not introduce breaking changes to the codebase. Any classes or methods marked `@internal` are not intended for use outside this library and are subject to breaking changes at any time, so please avoid using them. ## π οΈ Maintenance & Support When a new **minor** version (e.g. `1.0` -> `1.1`) is released, the previous one (`1.0`) will continue to receive security and critical bug fixes for *at least* 3 months. When a new **major** version is released (e.g. `1.1` -> `2.0`), the previous one (`1.1`) will receive critical bug fixes for *at least* 3 months and security updates for 6 months after that new release comes out. (This policy may change in the future and exceptions may be made on a case-by-case basis.) ## π·βοΈ Contributing Contributions to this library are **welcome**! We only ask that you adhere to our [contributor guidelines] and avoid making changes that conflict with our Philosophy above. ## π§ͺ Testing ```bash composer test ``` ## π License **league/config** is licensed under the BSD-3 license. See the [`LICENSE.md`][license] file for more details. ## πΊοΈ Who Uses It? This project is used by [league/commonmark][league-commonmark]. [docs]: https://config.thephpleague.com/ [@colinodell]: https://www.twitter.com/colinodell [Composer]: https://getcomposer.org/ [PHP League]: https://thephpleague.com [symfony/config]: https://symfony.com/doc/current/components/config.html [symfony/options-resolver]: https://symfony.com/doc/current/components/options_resolver.html [hassankhan/config]: https://github.com/hassankhan/config [consolidation/config]: https://github.com/consolidation/config [laminas/laminas-config]: https://docs.laminas.dev/laminas-config/ [contributor guidelines]: https://github.com/thephpleague/config/blob/main/.github/CONTRIBUTING.md [license]: https://github.com/thephpleague/config/blob/main/LICENSE.md [league-commonmark]: https://commonmark.thephpleague.com home/fluxyjvi/public_html/project/vendor/mockery/mockery/README.md 0000644 00000024526 15107533605 0021240 0 ustar 00 Mockery ======= [](https://github.com/mockery/mockery/actions) [](https://www.php.net/supported-versions) [](https://codecov.io/gh/mockery/mockery) [](https://shepherd.dev/github/mockery/mockery) [](https://packagist.org/packages/mockery/mockery) [](https://packagist.org/packages/mockery/mockery) Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending. Mockery is released under a New BSD License. ## Installation To install Mockery, run the command below and you will get the latest version ```sh composer require --dev mockery/mockery ``` ## Documentation In older versions, this README file was the documentation for Mockery. Over time we have improved this, and have created an extensive documentation for you. Please use this README file as a starting point for Mockery, but do read the documentation to learn how to use Mockery. The current version can be seen at [docs.mockery.io](http://docs.mockery.io). ## PHPUnit Integration Mockery ships with some helpers if you are using PHPUnit. You can extend the [`Mockery\Adapter\Phpunit\MockeryTestCase`](library/Mockery/Adapter/Phpunit/MockeryTestCase.php) class instead of `PHPUnit\Framework\TestCase`, or if you are already using a custom base class for your tests, take a look at the traits available in the [`Mockery\Adapter\Phpunit`](library/Mockery/Adapter/Phpunit) namespace. ## Test Doubles Test doubles (often called mocks) simulate the behaviour of real objects. They are commonly utilised to offer test isolation, to stand in for objects which do not yet exist, or to allow for the exploratory design of class APIs without requiring actual implementation up front. The benefits of a test double framework are to allow for the flexible generation and configuration of test doubles. They allow the setting of expected method calls and/or return values using a flexible API which is capable of capturing every possible real object behaviour in way that is stated as close as possible to a natural language description. Use the `Mockery::mock` method to create a test double. ``` php $double = Mockery::mock(); ``` If you need Mockery to create a test double to satisfy a particular type hint, you can pass the type to the `mock` method. ``` php class Book {} interface BookRepository { function find($id): Book; function findAll(): array; function add(Book $book): void; } $double = Mockery::mock(BookRepository::class); ``` A detailed explanation of creating and working with test doubles is given in the documentation, [Creating test doubles](http://docs.mockery.io/en/latest/reference/creating_test_doubles.html) section. ## Method Stubs π« A method stub is a mechanism for having your test double return canned responses to certain method calls. With stubs, you don't care how many times, if at all, the method is called. Stubs are used to provide indirect input to the system under test. ``` php $double->allows()->find(123)->andReturns(new Book()); $book = $double->find(123); ``` If you have used Mockery before, you might see something new in the example above — we created a method stub using `allows`, instead of the "old" `shouldReceive` syntax. This is a new feature of Mockery v1, but fear not, the trusty ol' `shouldReceive` is still here. For new users of Mockery, the above example can also be written as: ``` php $double->shouldReceive('find')->with(123)->andReturn(new Book()); $book = $double->find(123); ``` If your stub doesn't require specific arguments, you can also use this shortcut for setting up multiple calls at once: ``` php $double->allows([ "findAll" => [new Book(), new Book()], ]); ``` or ``` php $double->shouldReceive('findAll') ->andReturn([new Book(), new Book()]); ``` You can also use this shortcut, which creates a double and sets up some stubs in one call: ``` php $double = Mockery::mock(BookRepository::class, [ "findAll" => [new Book(), new Book()], ]); ``` ## Method Call Expectations π² A Method call expectation is a mechanism to allow you to verify that a particular method has been called. You can specify the parameters and you can also specify how many times you expect it to be called. Method call expectations are used to verify indirect output of the system under test. ``` php $book = new Book(); $double = Mockery::mock(BookRepository::class); $double->expects()->add($book); ``` During the test, Mockery accept calls to the `add` method as prescribed. After you have finished exercising the system under test, you need to tell Mockery to check that the method was called as expected, using the `Mockery::close` method. One way to do that is to add it to your `tearDown` method in PHPUnit. ``` php public function tearDown() { Mockery::close(); } ``` The `expects()` method automatically sets up an expectation that the method call (and matching parameters) is called **once and once only**. You can choose to change this if you are expecting more calls. ``` php $double->expects()->add($book)->twice(); ``` If you have used Mockery before, you might see something new in the example above — we created a method expectation using `expects`, instead of the "old" `shouldReceive` syntax. This is a new feature of Mockery v1, but same as with `allows` in the previous section, it can be written in the "old" style. For new users of Mockery, the above example can also be written as: ``` php $double->shouldReceive('find') ->with(123) ->once() ->andReturn(new Book()); $book = $double->find(123); ``` A detailed explanation of declaring expectations on method calls, please read the documentation, the [Expectation declarations](http://docs.mockery.io/en/latest/reference/expectations.html) section. After that, you can also learn about the new `allows` and `expects` methods in the [Alternative shouldReceive syntax](http://docs.mockery.io/en/latest/reference/alternative_should_receive_syntax.html) section. It is worth mentioning that one way of setting up expectations is no better or worse than the other. Under the hood, `allows` and `expects` are doing the same thing as `shouldReceive`, at times in "less words", and as such it comes to a personal preference of the programmer which way to use. ## Test Spies π΅οΈ By default, all test doubles created with the `Mockery::mock` method will only accept calls that they have been configured to `allow` or `expect` (or in other words, calls that they `shouldReceive`). Sometimes we don't necessarily care about all of the calls that are going to be made to an object. To facilitate this, we can tell Mockery to ignore any calls it has not been told to expect or allow. To do so, we can tell a test double `shouldIgnoreMissing`, or we can create the double using the `Mocker::spy` shortcut. ``` php // $double = Mockery::mock()->shouldIgnoreMissing(); $double = Mockery::spy(); $double->foo(); // null $double->bar(); // null ``` Further to this, sometimes we want to have the object accept any call during the test execution and then verify the calls afterwards. For these purposes, we need our test double to act as a Spy. All mockery test doubles record the calls that are made to them for verification afterwards by default: ``` php $double->baz(123); $double->shouldHaveReceived()->baz(123); // null $double->shouldHaveReceived()->baz(12345); // Uncaught Exception Mockery\Exception\InvalidCountException... ``` Please refer to the [Spies](http://docs.mockery.io/en/latest/reference/spies.html) section of the documentation to learn more about the spies. ## Utilities π ### Global Helpers Mockery ships with a handful of global helper methods, you just need to ask Mockery to declare them. ``` php Mockery::globalHelpers(); $mock = mock(Some::class); $spy = spy(Some::class); $spy->shouldHaveReceived() ->foo(anyArgs()); ``` All of the global helpers are wrapped in a `!function_exists` call to avoid conflicts. So if you already have a global function called `spy`, Mockery will silently skip the declaring its own `spy` function. ### Testing Traits As Mockery ships with code generation capabilities, it was trivial to add functionality allowing users to create objects on the fly that use particular traits. Any abstract methods defined by the trait will be created and can have expectations or stubs configured like normal Test Doubles. ``` php trait Foo { function foo() { return $this->doFoo(); } abstract function doFoo(); } $double = Mockery::mock(Foo::class); $double->allows()->doFoo()->andReturns(123); $double->foo(); // int(123) ``` ## Versioning The Mockery team attempts to adhere to [Semantic Versioning](http://semver.org), however, some of Mockery's internals are considered private and will be open to change at any time. Just because a class isn't final, or a method isn't marked private, does not mean it constitutes part of the API we guarantee under the versioning scheme. ### Alternative Runtimes Mockery 1.3 was the last version to support HHVM 3 and PHP 5. There is no support for HHVM 4+. ## A new home for Mockery β οΈοΈ Update your remotes! Mockery has transferred to a new location. While it was once at `padraic/mockery`, it is now at `mockery/mockery`. While your existing repositories will redirect transparently for any operations, take some time to transition to the new URL. ```sh $ git remote set-url upstream https://github.com/mockery/mockery.git ``` Replace `upstream` with the name of the remote you use locally; `upstream` is commonly used but you may be using something else. Run `git remote -v` to see what you're actually using. home/fluxyjvi/public_html/project/vendor/sebastian/exporter/README.md 0000644 00000006343 15107546510 0021733 0 ustar 00 [](https://packagist.org/packages/sebastian/exporter) [](https://github.com/sebastianbergmann/exporter/actions) [](https://shepherd.dev/github/sebastianbergmann/exporter) [](https://codecov.io/gh/sebastianbergmann/exporter) # sebastian/exporter This component provides the functionality to export PHP variables for visualization. ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): ``` composer require sebastian/exporter ``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: ``` composer require --dev sebastian/exporter ``` ## Usage Exporting: ```php <?php use SebastianBergmann\Exporter\Exporter; $exporter = new Exporter; /* Exception Object &0000000078de0f0d000000002003a261 ( 'message' => '' 'string' => '' 'code' => 0 'file' => '/home/sebastianbergmann/test.php' 'line' => 34 'previous' => null ) */ print $exporter->export(new Exception); ``` ## Data Types Exporting simple types: ```php <?php use SebastianBergmann\Exporter\Exporter; $exporter = new Exporter; // 46 print $exporter->export(46); // 4.0 print $exporter->export(4.0); // 'hello, world!' print $exporter->export('hello, world!'); // false print $exporter->export(false); // NAN print $exporter->export(acos(8)); // -INF print $exporter->export(log(0)); // null print $exporter->export(null); // resource(13) of type (stream) print $exporter->export(fopen('php://stderr', 'w')); // Binary String: 0x000102030405 print $exporter->export(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5)); ``` Exporting complex types: ```php <?php use SebastianBergmann\Exporter\Exporter; $exporter = new Exporter; /* Array &0 ( 0 => Array &1 ( 0 => 1 1 => 2 2 => 3 ) 1 => Array &2 ( 0 => '' 1 => 0 2 => false ) ) */ print $exporter->export(array(array(1,2,3), array("",0,FALSE))); /* Array &0 ( 'self' => Array &1 ( 'self' => Array &1 ) ) */ $array = array(); $array['self'] = &$array; print $exporter->export($array); /* stdClass Object &0000000003a66dcc0000000025e723e2 ( 'self' => stdClass Object &0000000003a66dcc0000000025e723e2 ) */ $obj = new stdClass(); $obj->self = $obj; print $exporter->export($obj); ``` Compact exports: ```php <?php use SebastianBergmann\Exporter\Exporter; $exporter = new Exporter; // Array () print $exporter->shortenedExport(array()); // Array (...) print $exporter->shortenedExport(array(1,2,3,4,5)); // stdClass Object () print $exporter->shortenedExport(new stdClass); // Exception Object (...) print $exporter->shortenedExport(new Exception); // this\nis\na\nsuper\nlong\nstring\nt...\nspace print $exporter->shortenedExport( <<<LONG_STRING this is a super long string that wraps a lot and eats up a lot of space LONG_STRING ); ```