inital Commit
This commit is contained in:
parent
7238e1c827
commit
e5786bdd19
21
composer.json
Normal file
21
composer.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "psc/calc",
|
||||
"type": "library",
|
||||
"description": "Calc Lib",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PSC\\Library\\Calc\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"PSC\\Library\\Calc\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.7"
|
||||
}
|
||||
}
|
||||
971
composer.lock
generated
Normal file
971
composer.lock
generated
Normal file
@ -0,0 +1,971 @@
|
||||
{
|
||||
"_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"
|
||||
],
|
||||
"hash": "b9da4001e3942b87f110cd4dfebcb541",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3,<8.0-DEV"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.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": "2015-06-14 21:17:01"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
||||
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"phpDocumentor": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"time": "2015-02-03 12:10:50"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
|
||||
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"phpdocumentor/reflection-docblock": "~2.0",
|
||||
"sebastian/comparator": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.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": "2015-08-13 10:07:40"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "2.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "~1.3",
|
||||
"sebastian/environment": "^1.3.2",
|
||||
"sebastian/version": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-xdebug": ">=2.1.4",
|
||||
"phpunit/phpunit": "~4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.2.1",
|
||||
"ext-xmlwriter": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.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": "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": "2015-10-06 15:47:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
||||
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
||||
"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": "2015-06-21 13:08:43"
|
||||
},
|
||||
{
|
||||
"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-21 13:50:34"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
||||
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
||||
"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": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2015-06-21 08:01:12"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "1.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
||||
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"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": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Wrapper around PHP's tokenizer extension.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2015-09-15 10:49:45"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "4.8.21",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "ea76b17bced0500a28098626b84eda12dbcf119c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c",
|
||||
"reference": "ea76b17bced0500a28098626b84eda12dbcf119c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpspec/prophecy": "^1.3.1",
|
||||
"phpunit/php-code-coverage": "~2.1",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": ">=1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "~2.3",
|
||||
"sebastian/comparator": "~1.1",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "~1.3",
|
||||
"sebastian/exporter": "~1.2",
|
||||
"sebastian/global-state": "~1.0",
|
||||
"sebastian/version": "~1.0",
|
||||
"symfony/yaml": "~2.1|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.8.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": "2015-12-12 07:45:58"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "2.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"sebastian/exporter": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3.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": "2015-10-02 06:51:40"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
|
||||
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/exporter": "~1.2"
|
||||
},
|
||||
"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": "2015-07-26 15:48:44"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
|
||||
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.8"
|
||||
},
|
||||
"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": "2015-12-08 07:14:41"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "6e7133793a8e5a5714a551a8324337374be209df"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df",
|
||||
"reference": "6e7133793a8e5a5714a551a8324337374be209df",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.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": "2015-12-02 08:37:27"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
|
||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/recursion-context": "~1.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"
|
||||
},
|
||||
{
|
||||
"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": "2015-06-21 07:55:53"
|
||||
},
|
||||
{
|
||||
"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-12 03:26:01"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "913401df809e99e4f47b27cdd781f4a258d58791"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
|
||||
"reference": "913401df809e99e4f47b27cdd781f4a258d58791",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"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": "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": "2015-11-11 19:50:13"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
"version": "1.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/version.git",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"shasum": ""
|
||||
},
|
||||
"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": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2015-06-21 13:59:46"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "3df409958a646dad2bc5046c3fb671ee24a1a691"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691",
|
||||
"reference": "3df409958a646dad2bc5046c3fb671ee24a1a691",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.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": "2015-12-26 13:39:53"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
22
phpunit.xml.dist
Normal file
22
phpunit.xml.dist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
|
||||
<phpunit
|
||||
backupGlobals = "false"
|
||||
backupStaticAttributes = "false"
|
||||
colors = "true"
|
||||
convertErrorsToExceptions = "true"
|
||||
convertNoticesToExceptions = "true"
|
||||
convertWarningsToExceptions = "true"
|
||||
processIsolation = "false"
|
||||
stopOnFailure = "false"
|
||||
syntaxCheck = "false"
|
||||
bootstrap = "vendor/autoload.php" >
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Docker PHP Tests Suite">
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
</phpunit>
|
||||
73
src/Article.php
Normal file
73
src/Article.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc;
|
||||
|
||||
class Article
|
||||
{
|
||||
/** @var string $name */
|
||||
protected $name;
|
||||
|
||||
/** @var \ArrayIterator $options */
|
||||
protected $options;
|
||||
|
||||
public function __construct($name)
|
||||
{
|
||||
$this->options = new \ArrayIterator();
|
||||
$this->setName($name);
|
||||
}
|
||||
|
||||
public function addOption($option)
|
||||
{
|
||||
$this->options->append($option);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params Array
|
||||
*/
|
||||
public function setParams($params)
|
||||
{
|
||||
/** @var Option\Type\Base $option */
|
||||
foreach($this->options as $option)
|
||||
{
|
||||
if(isset($params[$option->getId()])) {
|
||||
$option->setRawValue($params[$option->getId()]);
|
||||
$option->processValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getOptionById($id)
|
||||
{
|
||||
if($id === false) {
|
||||
throw new \Exception('No id provided');
|
||||
}
|
||||
|
||||
/** @var Option\Type\Base $options */
|
||||
foreach($this->options as $options)
|
||||
{
|
||||
if($options->getId() == $id) {
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
||||
if($id === false) {
|
||||
throw new \Exception('Option not found: ' . $id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
75
src/Engine.php
Normal file
75
src/Engine.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc;
|
||||
|
||||
|
||||
class Engine
|
||||
{
|
||||
|
||||
/** @var \SimpleXMLElement $xml */
|
||||
protected $xml;
|
||||
|
||||
/** @var \ArrayIterator $articles */
|
||||
protected $articles;
|
||||
|
||||
|
||||
/**
|
||||
* Load XML From String
|
||||
*
|
||||
* @param $string XML String
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function loadString($string)
|
||||
{
|
||||
$this->articles = new \ArrayIterator();
|
||||
$this->xml = simplexml_load_string($string);
|
||||
$this->parse();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse Xml
|
||||
*/
|
||||
protected function parse()
|
||||
{
|
||||
$parser = new Parser();
|
||||
|
||||
foreach ($this->xml as $article) {
|
||||
$this->articles->append($parser->parse($article));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \ArrayIterator
|
||||
*/
|
||||
public function getArticles()
|
||||
{
|
||||
return $this->articles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $name
|
||||
* @return Article
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getArticleByName($name = false)
|
||||
{
|
||||
if($name === false) {
|
||||
throw new \Exception('No Name provided');
|
||||
}
|
||||
|
||||
/** @var Article $article */
|
||||
foreach($this->articles as $article)
|
||||
{
|
||||
if($article->getName() == $name) {
|
||||
return $article;
|
||||
}
|
||||
}
|
||||
|
||||
if($name === false) {
|
||||
throw new \Exception('Article not found: ' . $name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
33
src/Option/Parser.php
Normal file
33
src/Option/Parser.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option;
|
||||
|
||||
use PSC\Library\Calc\Option\Parser\Input;
|
||||
use PSC\Library\Calc\Option\Parser\Select;
|
||||
|
||||
class Parser
|
||||
{
|
||||
protected $node;
|
||||
|
||||
public function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$this->node = $node;
|
||||
|
||||
$obj = false;
|
||||
|
||||
switch(strtolower((string)$node['type'])) {
|
||||
case 'input':
|
||||
$obj = new Input();
|
||||
break;
|
||||
case 'select':
|
||||
$obj = new Select();
|
||||
break;
|
||||
}
|
||||
|
||||
if($obj) {
|
||||
$obj = $obj->parse($node);
|
||||
}
|
||||
|
||||
return $obj;
|
||||
|
||||
}
|
||||
}
|
||||
42
src/Option/Parser/Base.php
Normal file
42
src/Option/Parser/Base.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Parser;
|
||||
|
||||
class Base
|
||||
{
|
||||
/** @var \PSC\Library\Calc\Option\Type\Base $element */
|
||||
protected $element;
|
||||
|
||||
/** @var \SimpleXMLElement $node */
|
||||
protected $node;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$this->node = $node;
|
||||
$this->element->setId((string)$node['id']);
|
||||
$this->element->setName((string)$node['name']);
|
||||
|
||||
if(isset($node['default'])) {
|
||||
$this->element->setDefault((string)$node['default']);
|
||||
}
|
||||
if(isset($node['require'])) {
|
||||
$this->element->setRequire($this->getBoolean($node['require']));
|
||||
}
|
||||
if(isset($node['help'])) {
|
||||
$this->element->setHelp((string)$node['help']);
|
||||
}
|
||||
}
|
||||
|
||||
private function getBoolean($value)
|
||||
{
|
||||
if((string)$value == 'true' || (string)$value == '1') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
22
src/Option/Parser/Input.php
Normal file
22
src/Option/Parser/Input.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Parser;
|
||||
|
||||
class Input extends Base
|
||||
{
|
||||
|
||||
protected $element;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$this->element = new \PSC\Library\Calc\Option\Type\Input();
|
||||
|
||||
parent::parse($node);
|
||||
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
}
|
||||
35
src/Option/Parser/Select.php
Normal file
35
src/Option/Parser/Select.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Parser;
|
||||
|
||||
use PSC\Library\Calc\Option\Parser\Select\Opt;
|
||||
|
||||
class Select extends Base
|
||||
{
|
||||
|
||||
protected $element;
|
||||
|
||||
/** @var \SimpleXMLElement $node */
|
||||
protected $node;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$this->element = new \PSC\Library\Calc\Option\Type\Select();
|
||||
|
||||
parent::parse($node);
|
||||
|
||||
$optParser = new Opt();
|
||||
|
||||
foreach ($this->node->opt as $opt) {
|
||||
|
||||
$this->element->addOption($optParser->parse($opt));
|
||||
}
|
||||
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
}
|
||||
24
src/Option/Parser/Select/Opt.php
Normal file
24
src/Option/Parser/Select/Opt.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Parser\Select;
|
||||
|
||||
use PSC\Library\Calc\Option\Parser\Base;
|
||||
|
||||
class Opt extends Base
|
||||
{
|
||||
|
||||
protected $element;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$this->element = new \PSC\Library\Calc\Option\Type\Select\Opt();
|
||||
|
||||
parent::parse($node);
|
||||
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
}
|
||||
170
src/Option/Type/Base.php
Normal file
170
src/Option/Type/Base.php
Normal file
@ -0,0 +1,170 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Type;
|
||||
|
||||
class Base
|
||||
{
|
||||
/** @var string $name */
|
||||
protected $name;
|
||||
|
||||
/** @var string $id */
|
||||
protected $id;
|
||||
|
||||
/** @var string $default */
|
||||
protected $default = '';
|
||||
|
||||
/** @var string $help */
|
||||
protected $help = '';
|
||||
|
||||
/** @var boolean $require */
|
||||
protected $require = false;
|
||||
|
||||
/** @var string $type */
|
||||
static public $type = 'base';
|
||||
|
||||
/** @var string $rawValue */
|
||||
protected $rawValue = '';
|
||||
|
||||
/** @var string $value */
|
||||
protected $value = '';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRequire()
|
||||
{
|
||||
return $this->require;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $require
|
||||
*/
|
||||
public function setRequire($require)
|
||||
{
|
||||
$this->require = $require;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
return $this->default;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $default
|
||||
*/
|
||||
public function setDefault($default)
|
||||
{
|
||||
$this->default = $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHelp()
|
||||
{
|
||||
return $this->help;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $help
|
||||
*/
|
||||
public function setHelp($help)
|
||||
{
|
||||
$this->help = $help;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRawValue()
|
||||
{
|
||||
return $this->rawValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $rawValue
|
||||
*/
|
||||
public function setRawValue($rawValue)
|
||||
{
|
||||
$this->rawValue = $rawValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verarbeitet das Value
|
||||
*/
|
||||
public function processValue()
|
||||
{
|
||||
$this->setValue($this->getRawValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
}
|
||||
9
src/Option/Type/Input.php
Normal file
9
src/Option/Type/Input.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Type;
|
||||
|
||||
class Input extends Base
|
||||
{
|
||||
|
||||
static public $type = 'input';
|
||||
|
||||
}
|
||||
39
src/Option/Type/Select.php
Normal file
39
src/Option/Type/Select.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Type;
|
||||
|
||||
use PSC\Library\Calc\Option\Type\Select\Opt;
|
||||
|
||||
class Select extends Base
|
||||
{
|
||||
|
||||
/** @var \ArrayIterator $options */
|
||||
protected $options;
|
||||
|
||||
static public $type = 'select';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->options = new \ArrayIterator();
|
||||
}
|
||||
|
||||
public function addOption($option)
|
||||
{
|
||||
$this->options->append($option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verarbeitet das Value
|
||||
*/
|
||||
public function processValue()
|
||||
{
|
||||
/** @var Opt $opt */
|
||||
foreach($this->options as $opt)
|
||||
{
|
||||
if($opt->getId() == $this->getRawValue()) {
|
||||
$this->setValue($opt->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
10
src/Option/Type/Select/Opt.php
Normal file
10
src/Option/Type/Select/Opt.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Option\Type\Select;
|
||||
|
||||
use PSC\Library\Calc\Option\Type\Base;
|
||||
|
||||
class Opt extends Base
|
||||
{
|
||||
static public $type = 'opt';
|
||||
|
||||
}
|
||||
24
src/Parser.php
Normal file
24
src/Parser.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc;
|
||||
|
||||
class Parser
|
||||
{
|
||||
protected $article;
|
||||
|
||||
public function parse(\SimpleXMLElement $node)
|
||||
{
|
||||
$optionParser = new \PSC\Library\Calc\Option\Parser();
|
||||
|
||||
$this->article = new Article((string)$node->name);
|
||||
|
||||
foreach ($node->option as $option) {
|
||||
$obj = $optionParser->parse($option);
|
||||
if($obj) {
|
||||
$this->article->addOption($obj);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->article;
|
||||
}
|
||||
|
||||
}
|
||||
83
tests/Article/CalendarXmlTest.php
Normal file
83
tests/Article/CalendarXmlTest.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Tests\Article;
|
||||
|
||||
use PSC\Library\Calc\Article;
|
||||
use PSC\Library\Calc\Engine;
|
||||
use PSC\Library\Calc\Option\Type\Select;
|
||||
|
||||
class CalendarXmlTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testIfArticleCountInXmlCorrect()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$this->assertTrue($parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/calendar.xml')));
|
||||
|
||||
$this->assertEquals(1, $parser->getArticles()->Count());
|
||||
}
|
||||
|
||||
public function testGetArticleByName()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/calendar.xml'));
|
||||
|
||||
/** @var Article $article */
|
||||
$article = $parser->getArticleByName('Kalender');
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Article', $article);
|
||||
$this->assertEquals('Kalender', $article->getName());
|
||||
}
|
||||
|
||||
public function testGetOptionById()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/calendar.xml'));
|
||||
/** @var Article $article */
|
||||
$article = $parser->getArticleByName('Kalender');
|
||||
|
||||
/** @var Select $option */
|
||||
$option = $article->getOptionById('size');
|
||||
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $option);
|
||||
|
||||
}
|
||||
|
||||
public function testGetPrintableValuesFromSavedParamsWithCleaning()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/calendar.xml'));
|
||||
|
||||
/** @var Article $article */
|
||||
$article = $parser->getArticleByName('Kalender');
|
||||
|
||||
$article->setParams(array(
|
||||
"motive" => 0,
|
||||
"motivepaid" => 0,
|
||||
"auflage" => "1",
|
||||
"size" => "a4h",
|
||||
"papier" => "bdm250",
|
||||
"seiten" => "13",
|
||||
"schutzfolie" => "glanz",
|
||||
"abschluss" => "mitkarton",
|
||||
"produktion" => "std",
|
||||
"hinweis" => "Produktionszeit + 3 Tage Versand",
|
||||
"datenformat" => "pdf",
|
||||
"musterdruck" => "keinmuster",
|
||||
"info" => "Textfeld zur freien Eingabe",
|
||||
"reload" => 0,
|
||||
"kalk_artikel" => "Kalender",
|
||||
));
|
||||
|
||||
/** @var Select $option */
|
||||
$option = $article->getOptionById('size');
|
||||
|
||||
$this->assertEquals('a4h', $option->getRawValue());
|
||||
$this->assertEquals('DIN A4 Hochformat (297 x 210 mm)', $option->getValue());
|
||||
|
||||
$option = $article->getOptionById('seiten');
|
||||
|
||||
$this->assertEquals('13', $option->getRawValue());
|
||||
$this->assertEquals('13 Seiten Monatskalender mit Deckblatt', $option->getValue());
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
34
tests/Article/SimpleXmlTest.php
Normal file
34
tests/Article/SimpleXmlTest.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Tests\Article;
|
||||
|
||||
use PSC\Library\Calc\Engine;
|
||||
|
||||
class SimpleXmlTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testIfArticleCountInXmlCorrect()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$this->assertTrue($parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/simple.xml')));
|
||||
|
||||
$this->assertEquals(1, $parser->getArticles()->Count());
|
||||
}
|
||||
|
||||
public function testIfArticleCountInXmlCorrectWith2Article()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$this->assertTrue($parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/simple2articles.xml')));
|
||||
|
||||
$this->assertEquals(2, $parser->getArticles()->Count());
|
||||
}
|
||||
|
||||
public function testGetArticleByName()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/simple2articles.xml'));
|
||||
|
||||
$article = $parser->getArticleByName('Blocks A5 25blatt geleimt');
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Article', $article);
|
||||
$this->assertEquals('Blocks A5 25blatt geleimt', $article->getName());
|
||||
}
|
||||
|
||||
}
|
||||
14
tests/General/LoadTest.php
Normal file
14
tests/General/LoadTest.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Tests\General;
|
||||
|
||||
use PSC\Library\Calc\Engine;
|
||||
|
||||
class LoadTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testSimpleLoadXmlFromString()
|
||||
{
|
||||
$parser = new Engine();
|
||||
$this->assertTrue($parser->loadString(file_get_contents(__DIR__ .'/../TestFiles/General/simple.xml')));
|
||||
}
|
||||
|
||||
}
|
||||
31
tests/Option/Type/InputTest.php
Normal file
31
tests/Option/Type/InputTest.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||
|
||||
use PSC\Library\Calc\Option\Parser;
|
||||
use PSC\Library\Calc\Option\Type\Input;
|
||||
|
||||
class InputTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testIfCorrectType()
|
||||
{
|
||||
$parser = new Parser();
|
||||
/** @var Input $obj */
|
||||
$obj = $parser->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/input.xml')));
|
||||
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Option\Type\Input', $obj);
|
||||
}
|
||||
|
||||
public function testIfCorrectAttributes()
|
||||
{
|
||||
$parser = new Parser();
|
||||
/** @var Input $obj */
|
||||
$obj = $parser->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/input.xml')));
|
||||
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Option\Type\Input', $obj);
|
||||
$this->assertTrue($obj->isRequire());
|
||||
$this->assertEquals(5, $obj->getDefault());
|
||||
$this->assertEquals('auflage', $obj->getId());
|
||||
$this->assertEquals('Auflage', $obj->getName());
|
||||
}
|
||||
|
||||
}
|
||||
31
tests/Option/Type/SelectTest.php
Normal file
31
tests/Option/Type/SelectTest.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc\Tests\Option\Type;
|
||||
|
||||
use PSC\Library\Calc\Option\Parser;
|
||||
use PSC\Library\Calc\Option\Type\Select;
|
||||
|
||||
class SelectTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testIfCorrectType()
|
||||
{
|
||||
$parser = new Parser();
|
||||
/** @var Select $obj */
|
||||
$obj = $parser->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/select.xml')));
|
||||
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $obj);
|
||||
}
|
||||
|
||||
public function testIfCorrectAttributes()
|
||||
{
|
||||
$parser = new Parser();
|
||||
/** @var Select $obj */
|
||||
$obj = $parser->parse(simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Option/select.xml')));
|
||||
|
||||
$this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $obj);
|
||||
$this->assertTrue($obj->isRequire());
|
||||
$this->assertEquals('a4h', $obj->getDefault());
|
||||
$this->assertEquals('size', $obj->getId());
|
||||
$this->assertEquals('Wählen Sie eine Größe', $obj->getName());
|
||||
}
|
||||
|
||||
}
|
||||
143
tests/TestFiles/General/calendar.xml
Normal file
143
tests/TestFiles/General/calendar.xml
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<kalkulation>
|
||||
<artikel>
|
||||
<name>Kalender</name>
|
||||
<kommentar>Kalender</kommentar>
|
||||
<uploads>
|
||||
<upload id="booklet" name="Druckdaten" description="Bitte laden sie eine PDF für den Druck hoch"/>
|
||||
</uploads>
|
||||
<option id="auflage" name="Auflage" type="Input" width="3" default="1" require="true" help="Geben Sie hier bitte Ihre Auflage ein">
|
||||
<auflage>
|
||||
<grenze formel="((($Vauflage$V*1)))">1-5</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.9)))">6-10</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.8)))">11-20</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.7)))">21-</grenze>
|
||||
</auflage>
|
||||
</option>
|
||||
<option id="size" name="Wählen Sie eine Größe" type="Select" width="3" default="a4h" require="true" help="Wählen Sie eine Größe">
|
||||
<opt id="a5h" name="DIN A5 Hochformat (210x148mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera5$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a5q" name="DIN A5 Querformat (148x210mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera5$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a4h" name="DIN A4 Hochformat (297 x 210 mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera4$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a4q" name="DIN A4 Querformat (210x297mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera4$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a3h" name="DIN A3 Hochformat (420x297mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera3$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a3q" name="DIN A3 Querformat (297x420mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera3$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="papier" name="Material" type="Select" mode="papierdb" container="fk" default="bdm250" help="Aus welchem Material soll Ihr Produkt bestehen?">
|
||||
<auflage>
|
||||
<grenze formel="(0)">1-</grenze>
|
||||
</auflage>
|
||||
</option>
|
||||
<option id="seiten" name="Wählen Sie die Seitenzahl" type="Select" width="3" default="13" require="true" help="Geben sie hier dieSeitenzahl an">
|
||||
<opt id="12" name="12 Seiten Monatskalender"/>
|
||||
<opt id="13" name="13 Seiten Monatskalender mit Deckblatt"/>
|
||||
<opt id="24" name="24 Seiten Monatskalender 12 Blatt doppelseitig"/>
|
||||
<opt id="26" name="26 Seiten Monatskalender mit Deckblatt 13 Blatt doppelseitig"/>
|
||||
</option>
|
||||
<option id="schutzfolie" name="Schutzfolie vorne" type="Select" width="3" default="glanz" require="true" help="Ihr Kalender kann mit einer Schutzfolie nach Wahl als Vorderblatt geschützt werden">
|
||||
<opt id="matt" name="matte Folie">
|
||||
<size>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a5h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a4h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a5q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a4q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3q</grenze>
|
||||
</size>
|
||||
</opt>
|
||||
<opt id="glanz" name="glänzende Folie">
|
||||
<size>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a5h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a4h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a5q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a4q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3q</grenze>
|
||||
</size>
|
||||
</opt>
|
||||
<opt id="ohne" name="keine Folie">
|
||||
<auflage>
|
||||
<grenze formel="((($Vauflage$V*0)))">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="abschluss" name="Abschlusskarton" type="Select" width="3" default="mitkarton" require="true" help="Ihr Kalender kann mit einer Schutzfolie nach Wahl als Vorderblatt geschützt werden">
|
||||
<opt id="mitkarton" name="Graupappe als Abschlusskarton">
|
||||
<size>
|
||||
<grenze formel="((($Vauflage$V*0.10)))">a5h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a4h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.20)))">a3h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.10)))">a5q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.15)))">a4q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.20)))">a3q</grenze>
|
||||
</size>
|
||||
</opt>
|
||||
<opt id="mitChromolux" name="weißer Chromoluxkarton als Abschluss">
|
||||
<size>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a5h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.35)))">a4h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3h</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.25)))">a5q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.35)))">a4q</grenze>
|
||||
<grenze formel="((($Vauflage$V*0.45)))">a3q</grenze>
|
||||
</size>
|
||||
</opt>
|
||||
<opt id="keinkarton" name="ohne Abschlusskarton">
|
||||
<auflage>
|
||||
<grenze formel="((($Vauflage$V*0)))">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="produktion" name="Produktionszeit" type="Select" default="std" help="Entscheiden Sie, wieviel Tage wir für Ihren Auftrag einplanen dürfen - Dateneingang bis 10 Uhr">
|
||||
<opt id="std" name="Standard: 3 Werktage">
|
||||
<auflage>
|
||||
<grenze pauschale="0">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="hinweis" name="Lieferzeit" type="Text" default="Produktionszeit + 3 Tage Versand"/>
|
||||
<option id="datenformat" name="Datenformat" type="Select" default="pdf" help="In welchem Dateiformat liefern Sie uns Ihre druckfertigen Daten?">
|
||||
<opt id="pdf" name="PDF">
|
||||
<auflage>
|
||||
<grenze pauschale="0">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="musterdruck" name="Musterdruck" type="Select" default="keinmuster" help="Sie haben hier die Möglichkeit zur Endkontrolle von Ihrem Produkt ein Muster vorab per Post zu bekommen">
|
||||
<opt id="keinmuster" name="Ohne Vorabmuster">
|
||||
<auflage>
|
||||
<grenze pauschale="0">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="muster" name="Musterdruck vorab zum Betrachten im xyz ">
|
||||
<auflage>
|
||||
<grenze pauschale="5">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
<option id="info" name="Zusatzangaben..." type="Input" default="Textfeld zur freien Eingabe" help="Ihre Wünsche"/>
|
||||
</artikel>
|
||||
</kalkulation>
|
||||
10
tests/TestFiles/General/simple.xml
Executable file
10
tests/TestFiles/General/simple.xml
Executable file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<kalkulation>
|
||||
<artikel>
|
||||
<name>Blocks A5 25blatt geleimt</name>
|
||||
<kommentar>kein</kommentar>
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="1"/>
|
||||
|
||||
</artikel>
|
||||
</kalkulation>
|
||||
17
tests/TestFiles/General/simple2articles.xml
Executable file
17
tests/TestFiles/General/simple2articles.xml
Executable file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<kalkulation>
|
||||
<artikel>
|
||||
<name>Blocks A4 25blatt geleimt</name>
|
||||
<kommentar>kein</kommentar>
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="1"/>
|
||||
|
||||
</artikel>
|
||||
<artikel>
|
||||
<name>Blocks A5 25blatt geleimt</name>
|
||||
<kommentar>kein</kommentar>
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="1"/>
|
||||
|
||||
</artikel>
|
||||
</kalkulation>
|
||||
2
tests/TestFiles/Option/input.xml
Normal file
2
tests/TestFiles/Option/input.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<option id="auflage" name="Auflage" type="Input" width="3" require="true" default="5"/>
|
||||
33
tests/TestFiles/Option/select.xml
Normal file
33
tests/TestFiles/Option/select.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<option id="size" name="Wählen Sie eine Größe" type="Select" width="3" default="a4h" require="true" help="Wählen Sie eine Größe">
|
||||
<opt id="a5h" name="DIN A5 Hochformat (210x148mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera5$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a5q" name="DIN A5 Querformat (148x210mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera5$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a4h" name="DIN A4 Hochformat (297 x 210 mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera4$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a4q" name="DIN A4 Querformat (210x297mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera4$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a3h" name="DIN A3 Hochformat (420x297mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera3$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
<opt id="a3q" name="DIN A3 Querformat (297x420mm)">
|
||||
<auflage>
|
||||
<grenze formel="($Fkalendera3$F)">1-</grenze>
|
||||
</auflage>
|
||||
</opt>
|
||||
</option>
|
||||
Loading…
Reference in New Issue
Block a user