pax_global_header00006660000000000000000000000064135377765230014534gustar00rootroot0000000000000052 comment=2bc1a9d5696d6496df5d5682962929165a823e57 pinky-1.0.5/000077500000000000000000000000001353777652300126715ustar00rootroot00000000000000pinky-1.0.5/.editorconfig000066400000000000000000000003771353777652300153550ustar00rootroot00000000000000; This file is for unifying the coding style for different editors and IDEs. ; More information at http://editorconfig.org root = true [*] indent_style = space indent_size = 4 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true pinky-1.0.5/.gitignore000066400000000000000000000000071353777652300146560ustar00rootroot00000000000000vendor pinky-1.0.5/LICENSE000066400000000000000000000021031353777652300136720ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2017 José Lorenzo Rodríguez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pinky-1.0.5/README.md000066400000000000000000000016421353777652300141530ustar00rootroot00000000000000# Pinky A PHP Transpiler for ([Inky](https://github.com/zurb/inky)), the templating language made for the ZURB's Foundation for Email framework. ## Installation You can install this bundle using composer composer require lorenzo/pinky ## Usage and Examples ### Basic Usage ```php saveHTML(); ``` You can transpile strings directly: ```php Contents'); echo $transpiled->saveHTML(); ``` And you can also transpile many files or strings in batch: ```php saveHTML(); } ``` ## License See the [LICENSE](LICENSE) file for license info (it's the MIT license). pinky-1.0.5/composer.json000066400000000000000000000010421353777652300154100ustar00rootroot00000000000000{ "name": "lorenzo/pinky", "description": "A Foundation for Emails (Inky) template transpiler", "type": "library", "keywords": ["inky", "foundation", "zurb", "email", "template"], "license": "MIT", "authors": [ { "name": "Jose Lorenzo Rodriguez", "email": "jose.zap@gmail.com" } ], "autoload": { "files": ["src/pinky.php"] }, "require": { "php": ">=5.6.0", "ext-xsl": "*" }, "require-dev": { "phpunit/phpunit": "^5.7" } } pinky-1.0.5/composer.lock000066400000000000000000001343221353777652300153770ustar00rootroot00000000000000{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], "content-hash": "aa96f6204f8095dd6242bdf4d41ac16d", "packages": [], "packages-dev": [ { "name": "doctrine/instantiator", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "^6.2.3", "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", "homepage": "http://ocramius.github.com/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://github.com/doctrine/instantiator", "keywords": [ "constructor", "instantiate" ], "time": "2017-07-22T11:58:36+00:00" }, { "name": "myclabs/deep-copy", "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", "phpunit/phpunit": "^4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" }, "files": [ "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", "keywords": [ "clone", "copy", "duplicate", "object", "object graph" ], "time": "2017-10-19T19:58:43+00:00" }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { "php": ">=5.5" }, "require-dev": { "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Jaap van Otterdijk", "email": "opensource@ijaap.nl" } ], "description": "Common reflection classes used by phpdocumentor to reflect the code structure", "homepage": "http://www.phpdoc.org", "keywords": [ "FQSEN", "phpDocumentor", "phpdoc", "reflection", "static analysis" ], "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { "php": "^7.0", "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { "doctrine/instantiator": "~1.0.5", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { "mockery/mockery": "^0.9.4", "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.7.x-dev" } }, "autoload": { "psr-0": { "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Konstantin Kudryashov", "email": "ever.zet@gmail.com", "homepage": "http://everzet.com" }, { "name": "Marcello Duarte", "email": "marcello.duarte@gmail.com" } ], "description": "Highly opinionated mocking framework for PHP 5.3+", "homepage": "https://github.com/phpspec/prophecy", "keywords": [ "Double", "Dummy", "fake", "mock", "spy", "stub" ], "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "^1.3", "phpunit/php-text-template": "^1.2", "phpunit/php-token-stream": "^1.4.2 || ^2.0", "sebastian/code-unit-reverse-lookup": "^1.0", "sebastian/environment": "^1.3.2 || ^2.0", "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { "ext-xdebug": "^2.1.4", "phpunit/phpunit": "^5.7" }, "suggest": { "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ "coverage", "testing", "xunit" ], "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ "filesystem", "iterator" ], "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Simple template engine.", "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ "template" ], "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ "timer" ], "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", "homepage": "https://github.com/sebastianbergmann/php-token-stream/", "keywords": [ "tokenizer" ], "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.6.2", "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "^1.2.4", "sebastian/diff": "^1.4.3", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", "sebastian/version": "^1.0.6|^2.0.1", "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { "dev-master": "5.7.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "The PHP Unit Testing framework.", "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.6 || ^7.0", "phpunit/php-text-template": "^1.2", "sebastian/exporter": "^1.2 || ^2.0" }, "conflict": { "phpunit/phpunit": "<5.4.0" }, "require-dev": { "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.2.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Mock Object library for PHPUnit", "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "keywords": [ "mock", "xunit" ], "time": "2017-06-30T09:13:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", "homepage": "http://www.github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides functionality to handle HHVM/PHP environments", "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", "hhvm" ], "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/recursion-context": "~2.0" }, "require-dev": { "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides the functionality to export PHP variables for visualization", "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.2" }, "suggest": { "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Snapshotting of global state", "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", "shasum": "" }, "require": { "php": ">=5.6", "sebastian/recursion-context": "~2.0" }, "require-dev": { "phpunit/phpunit": "~5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { "php": ">=5.6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/yaml", "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/yaml/zipball/275ad099e4cbe612a2acbca14a16dd1c5311324d", "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d", "shasum": "" }, "require": { "php": "^7.1.3" }, "conflict": { "symfony/console": "<3.4" }, "require-dev": { "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", "time": "2018-04-08T08:49:08+00:00" }, { "name": "webmozart/assert", "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.3-dev" } }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ "assert", "check", "validate" ], "time": "2018-01-29T19:49:41+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=5.6.0" }, "platform-dev": [] } pinky-1.0.5/src/000077500000000000000000000000001353777652300134605ustar00rootroot00000000000000pinky-1.0.5/src/inky-center.xsl000066400000000000000000000017631353777652300164470ustar00rootroot00000000000000 float-center center float-center pinky-1.0.5/src/inky.xsl000066400000000000000000000174611353777652300151730ustar00rootroot00000000000000
first last
hide-for-large show-for-large 16
 
 
 
pinky-1.0.5/src/pinky.php000066400000000000000000000074421353777652300153320ustar00rootroot00000000000000load(__DIR__ . "/inky.xsl"); $centering = new DOMDocument(); $centering->load(__DIR__ . "/inky-center.xsl"); $security = XSL_SECPREF_READ_FILE | XSL_SECPREF_READ_NETWORK | XSL_SECPREF_DEFAULT; $centerProcessor = new XSLTProcessor(); $centerProcessor->setSecurityPrefs($security); $centerProcessor->importStylesheet($centering); $generalProcessor = new XSLTProcessor(); $generalProcessor->setSecurityPrefs($security); $generalProcessor->importStylesheet($general); return [$centerProcessor, $generalProcessor]; } /** * Processes the provided document using the passed XSLTProcessor instance. * * @param XSLTProcessor[] $proc A pre-configured list of processors to apply to the document * @param DOMDocument $doc The document to be processed * @return DOMDocument */ function transformWithProcessor(array $processors, DOMDocument $doc) { foreach ($processors as $processor) { $doc = $processor->transformToDoc($doc); } return $doc; } /** * Returns the same document after replacing all the relevant tags from the * Inky templating language * * @param DOMDocument $doc The document to process * @return DOMDocument */ function transformDOM(DOMDocument $doc) { return transformWithProcessor(createInkyProcessor(), $doc); } /** * Returns a DOMDocument after replacing all the relevant tags from the * Inky templating language in the provided file * * @param string $filePath The file containing the template to process * @return DOMDocument */ function transformFile($filePath) { return transformDOM(loadTemplateFile($filePath)); } /** * Returns a DOMDocument after replacing all the relevant tags from the * Inky templating language in the provided string * * @param string $xml The documen to process * @return DOMDocument */ function transformString($xml) { return transformDOM(loadTemplateString($xml)); } /** * Returns a DOMDocument after parsing the contents of the spedified file * * @param string $filePath The file to parse * @return DOMDocument */ function loadTemplateFile($filePath) { return loadTemplateString(file_get_contents($filePath)); } /** * Returns a DOMDocument after parsing the contents of the spedified string * * @param string $html The string to parse * @return DOMDocument */ function loadTemplateString($html) { $document = new DOMDocument('1.0', 'UTF-8'); $internalErrors = libxml_use_internal_errors(true); $document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); libxml_use_internal_errors($internalErrors); $document->formatOutput = true; return $document; } /** * Yields each of the transformed files as a DOMDocument * * @param array $files List of file paths to process * @return Traversable */ function transformManyFiles($files) { $proc = createInkyProcessor(); foreach ($files as $k => $file) { yield $k => transformWithProcessor($proc, loadTemplateFile($file)); } } /** * Yields each of the transformed strings as a DOMDocument * * @param array $files List of xml strings to process * @return Traversable */ function transformManyStrings($xmls) { $proc = createInkyProcessor(); foreach ($xmls as $k => $xml) { yield $k => transformWithProcessor($proc, loadTemplateString($xml)); } } /** * Yields each of the transformed DOMDocument objects * * @param array List of DOMDocument objects to process * @return Traversable */ function transformManyDocs($docs) { $proc = createInkyProcessor(); foreach ($docs as $k => $doc) { yield $k => transformWithProcessor($proc, $doc); } } pinky-1.0.5/tests/000077500000000000000000000000001353777652300140335ustar00rootroot00000000000000pinky-1.0.5/tests/ComponentsTest.php000066400000000000000000000272751353777652300175460ustar00rootroot00000000000000
doc; $expected =<<
doc; $this->assertSameDocuments($doc, $expected); } public function testCenterDoesRecurse() { $doc =<<

Hello

doc; $expected =<<

Hello

doc; $this->assertSameDocuments($doc, $expected); } public function testCenterWithContainerNested() { $doc =<<

Hello

doc; $expected =<<

Hello

doc; $this->assertSameDocuments($doc, $expected); } public function testCenterWithButtonNested() { $doc =<< doc; $expected =<<
Button
doc; $this->assertSameDocuments($doc, $expected); } public function testCenterAppliesClassToMenuItems() { $doc =<< doc; $expected =<< doc; $this->assertSameDocuments($doc, $expected); } public function testCreateSimpleButton() { $doc =<<Button doc; $expected =<<
Button
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateButtonWithTarget() { $doc =<<Button doc; $expected =<<
Button
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateButtonWithClasses() { $doc =<<Button doc; $expected =<<
Button
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateExpandedButton() { $doc =<<Button doc; $expected =<<
Button
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateMenuWithContent() { $doc =<< Item doc; $expected =<<
Item
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateMenuWithContentAndTarget() { $doc =<< Item doc; $expected =<<
Item
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateMenuWithClasses() { $doc =<<

Hey!

doc; $expected =<<

Hey!

doc; $this->assertSameDocuments($doc, $expected); } public function testCreateMemuWithoutItemTag() { $doc =<< Item 1 doc; $expected =<<
Item 1
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateCallout() { $doc =<<Callout doc; $expected =<< Callout doc; $this->assertSameDocuments($doc, $expected); } public function testCreateCalloutWithClasses() { $doc =<<Callout doc; $expected =<< Callout doc; $this->assertSameDocuments($doc, $expected); } public function testCreateSpacer() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } public function testCreateSmallSpacerCorrectly() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } public function testCreateSpacerWithDefaultSize() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } public function testCreateLargeSpacerCorrectly() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } public function testSpacerGetClassesCopied() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } public function testSpacerElementsWithBothSizes() { $doc =<< doc; $expected =<<  
 
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateWrapper() { $doc =<< doc; $expected =<< doc; $this->assertSameDocuments($doc, $expected); } public function testCreateHLine() { $doc =<< doc; $expected =<<   doc; $this->assertSameDocuments($doc, $expected); } protected function assertSameDocuments($doc, $expectedS) { $expected = new DOMDocument(); $expected->loadHTML($expectedS); $result = transformString($doc); $result->formatOutput = true; $this->assertXmlStringEqualsXmlString($expected->saveXML(), $result->saveXML()); } } pinky-1.0.5/tests/GridTest.php000066400000000000000000000205621353777652300162760ustar00rootroot00000000000000 doc; $expected =<<
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateAContainerTable() { $doc = "Something"; $expected =<< Something doc; $this->assertSameDocuments($doc, $expected); } public function testCreateARow() { $doc = ""; $expected =<< doc; $this->assertSameDocuments($doc, $expected); } public function testCreateSingleColumnHasPositionClasses() { $doc = << One doc; $expected =<<
One
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateColumnNoExpander() { $doc = 'One'; $expected =<<
One
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateColumnNoExpanderTrue() { $doc = 'One'; $expected =<<
One
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateColumnNoExpanderFalse() { $doc = 'One'; $expected =<<
One
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateTwoColumns() { $doc =<< One Two doc; $expected =<<
One
Two
doc; $this->assertSameDocuments($doc, $expected); } public function testCreateThreeColumns() { $doc =<< One Two Three doc; $expected =<<
One
Two
Three
doc; $this->assertSameDocuments($doc, $expected); } public function testAutomaticLargeSizeWhenMissing() { $doc =<<One Two doc; $expected =<<
One
Two
doc; $this->assertSameDocuments($doc, $expected); } public function testNestedGrid() { $doc =<< doc; $expected =<<
doc; $this->assertSameDocuments($doc, $expected); } public function testAttributesAreTransferred() { $doc =<<One doc; $expected =<<
One
doc; $this->assertSameDocuments($doc, $expected); } public function testBlockGridSyntax() { $doc =<< doc; $expected =<< doc; $this->assertSameDocuments($doc, $expected); } public function testBlockCopyClassesToFinalOutput() { $doc =<< doc; $expected =<< doc; $this->assertSameDocuments($doc, $expected); } protected function assertSameDocuments($doc, $expectedS) { $expected = new DOMDocument(); $expected->loadHTML($expectedS); $result = transformString($doc); $this->assertXmlStringEqualsXmlString($expected->saveXML(), $result->saveXML()); } }