From f48e9f8b46b9d0aafc6332a5b9938b6c39195db4 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 13 Jun 2017 19:54:56 +0100 Subject: [PATCH] Local sync commit --- .editorconfig | 18 + .gitattributes | 42 + .gitignore | 3 +- .travis.yml | 30 + README.md | 0 bin/cake.bat | 54 +- composer.json | 53 + composer.lock | 2737 +++++++++++++++++++ phpunit.xml.dist | 40 + sql/lbryexplorer.aux.sql | 18 + sql/lbryexplorer.ddl.sql | 186 ++ src/Model/Behavior/SimpleAuditBehavior.php | 132 +- src/Model/Entity/Address.php | 20 +- src/Model/Entity/Input.php | 20 +- src/Model/Entity/Output.php | 20 +- src/Model/Entity/Transaction.php | 20 +- src/Model/Table/TagAddressRequestsTable.php | 34 +- src/View/Helper/AmountHelper.php | 86 +- 18 files changed, 3319 insertions(+), 194 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 phpunit.xml.dist create mode 100644 sql/lbryexplorer.aux.sql create mode 100644 sql/lbryexplorer.ddl.sql diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7061901 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +; 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 + +[*.bat] +end_of_line = crlf + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e16b4b4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,42 @@ +# Define the line ending behavior of the different file extensions +# Set default behaviour, in case users don't have core.autocrlf set. +* text=auto +* text eol=lf + +# Explicitly declare text files we want to always be normalized and converted +# to native line endings on checkout. +*.php text +*.default text +*.ctp text +*.sql text +*.md text +*.po text +*.js text +*.css text +*.ini text +*.properties text +*.txt text +*.xml text +*.svg text +*.yml text +.htaccess text + +# Declare files that will always have CRLF line endings on checkout. +*.bat eol=crlf + +# Declare files that will always have LF line endings on checkout. +*.pem eol=lf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary +*.gif binary +*.ico binary +*.mo binary +*.pdf binary +*.phar binary +*.woff binary +*.woff2 binary +*.ttf binary +*.otf binary +*.eot binary diff --git a/.gitignore b/.gitignore index 8d599e3..87b42b4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ /tmp/* /logs/* lbryexplorer.zip - +lbryexplorer.komodoproject +.komodotools diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..befdb98 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: php + +dist: trusty + +sudo: false + +php: + - 5.6 + - 7.0 + - 7.1 + +matrix: + fast_finish: true + + include: + - php: 7.0 + env: PHPCS=1 + +before_script: + - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.1; fi + - if [[ $PHPCS != 1 ]]; then composer install; fi + - if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi + - if [[ $PHPCS != 1 ]]; then composer run-script post-install-cmd --no-interaction; fi + +script: + - if [[ $PHPCS != 1 ]]; then vendor/bin/phpunit; fi + - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot; fi + +notifications: + email: false diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/bin/cake.bat b/bin/cake.bat index d63fa83..d4512db 100644 --- a/bin/cake.bat +++ b/bin/cake.bat @@ -1,27 +1,27 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Cake is a Windows batch script for invoking CakePHP shell commands -:: -:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) -:: -:: Licensed under The MIT License -:: Redistributions of files must retain the above copyright notice. -:: -:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) -:: @link http://cakephp.org CakePHP(tm) Project -:: @since 2.0.0 -:: @license http://www.opensource.org/licenses/mit-license.php MIT License -:: -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -@echo off - -SET app=%0 -SET lib=%~dp0 - -php "%lib%cake.php" %* - -echo. - -exit /B %ERRORLEVEL% +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Cake is a Windows batch script for invoking CakePHP shell commands +:: +:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +:: +:: Licensed under The MIT License +:: Redistributions of files must retain the above copyright notice. +:: +:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +:: @link http://cakephp.org CakePHP(tm) Project +:: @since 2.0.0 +:: @license http://www.opensource.org/licenses/mit-license.php MIT License +:: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +@echo off + +SET app=%0 +SET lib=%~dp0 + +php "%lib%cake.php" %* + +echo. + +exit /B %ERRORLEVEL% diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..79d60c9 --- /dev/null +++ b/composer.json @@ -0,0 +1,53 @@ +{ + "name": "cakephp/app", + "description": "CakePHP skeleton app", + "homepage": "http://cakephp.org", + "type": "project", + "license": "MIT", + "require": { + "php": ">=5.6", + "cakephp/cakephp": "3.4.*", + "mobiledetect/mobiledetectlib": "2.*", + "cakephp/migrations": "~1.0", + "cakephp/plugin-installer": "~1.0", + "mdanter/ecc": "^0.4.2", + "nesbot/carbon": "~1.18", + "endroid/qrcode": "^2.2.2", + "predis/predis": "^1.1.1" + }, + "require-dev": { + "psy/psysh": "@stable", + "cakephp/debug_kit": "~3.2", + "cakephp/bake": "~1.1" + }, + "suggest": { + "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.", + "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.", + "phpunit/phpunit": "Allows automated tests to be run without system-wide install.", + "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP." + }, + "autoload": { + "psr-4": { + "App\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Test\\": "tests", + "Cake\\Test\\": "./vendor/cakephp/cakephp/tests" + } + }, + "scripts": { + "post-install-cmd": "App\\Console\\Installer::postInstall", + "post-create-project-cmd": "App\\Console\\Installer::postInstall", + "post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump", + "check": [ + "@test", + "@cs-check" + ], + "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests", + "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests", + "test": "phpunit --colors=always" + }, + "prefer-stable": true +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..4634ac9 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2737 @@ +{ + "_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": "8508af8cab1d6513078a10e84e5a8833", + "packages": [ + { + "name": "aura/intl", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/auraphp/Aura.Intl.git", + "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/auraphp/Aura.Intl/zipball/7fce228980b19bf4dee2d7bbd6202a69b0dde926", + "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Aura\\Intl\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aura.Intl Contributors", + "homepage": "https://github.com/auraphp/Aura.Intl/contributors" + } + ], + "description": "The Aura Intl package provides internationalization tools, specifically message translation.", + "homepage": "https://github.com/auraphp/Aura.Intl", + "keywords": [ + "g11n", + "globalization", + "i18n", + "internationalization", + "intl", + "l10n", + "localization" + ], + "time": "2017-01-20T05:00:11+00:00" + }, + { + "name": "bacon/bacon-qr-code", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "031a2ce68c5794064b49d11775b2daf45c96e21c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/031a2ce68c5794064b49d11775b2daf45c96e21c", + "reference": "031a2ce68c5794064b49d11775b2daf45c96e21c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-gd": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-0": { + "BaconQrCode": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "time": "2016-01-09T22:55:35+00:00" + }, + { + "name": "cakephp/cakephp", + "version": "3.4.7", + "source": { + "type": "git", + "url": "https://github.com/cakephp/cakephp.git", + "reference": "b1aaa094894c020cd49d093bf5d6111fe26f5c45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/b1aaa094894c020cd49d093bf5d6111fe26f5c45", + "reference": "b1aaa094894c020cd49d093bf5d6111fe26f5c45", + "shasum": "" + }, + "require": { + "aura/intl": "^3.0.0", + "cakephp/chronos": "~1.0", + "ext-intl": "*", + "ext-mbstring": "*", + "php": ">=5.6.0", + "psr/log": "^1.0", + "zendframework/zend-diactoros": "^1.4" + }, + "conflict": { + "phpunit/phpunit": "<5.7" + }, + "replace": { + "cakephp/cache": "self.version", + "cakephp/collection": "self.version", + "cakephp/core": "self.version", + "cakephp/database": "self.version", + "cakephp/datasource": "self.version", + "cakephp/event": "self.version", + "cakephp/filesystem": "self.version", + "cakephp/form": "self.version", + "cakephp/i18n": "self.version", + "cakephp/log": "self.version", + "cakephp/orm": "self.version", + "cakephp/utility": "self.version", + "cakephp/validation": "self.version" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^3.0", + "phpunit/phpunit": "^5.7|^6.0" + }, + "suggest": { + "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cake\\": "src" + }, + "files": [ + "src/Core/functions.php", + "src/Collection/functions.php", + "src/I18n/functions.php", + "src/Utility/bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/cakephp/graphs/contributors" + } + ], + "description": "The CakePHP framework", + "homepage": "https://cakephp.org", + "keywords": [ + "framework" + ], + "time": "2017-05-20T03:32:05+00:00" + }, + { + "name": "cakephp/chronos", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/cakephp/chronos.git", + "reference": "0621b191334d8dcb56907688986dd24eb8c38234" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/0621b191334d8dcb56907688986dd24eb8c38234", + "reference": "0621b191334d8dcb56907688986dd24eb8c38234", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "athletic/athletic": "~0.1", + "cakephp/cakephp-codesniffer": "~2.3", + "phpbench/phpbench": "@dev", + "phpstan/phpstan": "^0.6.4", + "phpunit/phpunit": "<6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cake\\Chronos\\": "src" + }, + "files": [ + "src/carbon_compat.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + }, + { + "name": "The CakePHP Team", + "homepage": "http://cakephp.org" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://cakephp.org", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2017-04-27T01:27:49+00:00" + }, + { + "name": "cakephp/migrations", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/cakephp/migrations.git", + "reference": "f2a5e2915f8924bd36979a1001edeef7cd455f89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/migrations/zipball/f2a5e2915f8924bd36979a1001edeef7cd455f89", + "reference": "f2a5e2915f8924bd36979a1001edeef7cd455f89", + "shasum": "" + }, + "require": { + "cakephp/cakephp": "~3.1", + "php": ">=5.4", + "robmorgan/phinx": "0.6.5" + }, + "require-dev": { + "cakephp/bake": "@stable", + "phpunit/phpunit": "*" + }, + "suggest": { + "cakephp/bake": "Required if you want to generate migrations." + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "Migrations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/migrations/graphs/contributors" + } + ], + "description": "Database Migration plugin for CakePHP 3.0 based on Phinx", + "homepage": "https://github.com/cakephp/migrations", + "keywords": [ + "cakephp", + "migrations" + ], + "time": "2017-01-07T16:45:31+00:00" + }, + { + "name": "cakephp/plugin-installer", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/cakephp/plugin-installer.git", + "reference": "3449cb3251e3e741b123237765e278005565d8de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/plugin-installer/zipball/3449cb3251e3e741b123237765e278005565d8de", + "reference": "3449cb3251e3e741b123237765e278005565d8de", + "shasum": "" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "dev-master", + "composer/composer": "1.0.*@dev", + "phpunit/phpunit": "^4.8|^5.7|^6.0" + }, + "type": "composer-installer", + "extra": { + "class": "Cake\\Composer\\Installer\\PluginInstaller" + }, + "autoload": { + "psr-4": { + "Cake\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "http://cakephp.org" + } + ], + "description": "A composer installer for CakePHP 3.0+ plugins.", + "time": "2017-03-21T13:48:47+00:00" + }, + { + "name": "endroid/qrcode", + "version": "2.2.2", + "source": { + "type": "git", + "url": "https://github.com/endroid/QrCode.git", + "reference": "daa07e11249362e0fc0edf97f83719794d87726b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/QrCode/zipball/daa07e11249362e0fc0edf97f83719794d87726b", + "reference": "daa07e11249362e0fc0edf97f83719794d87726b", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^1.0", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^0.0.1", + "myclabs/php-enum": "^1.5", + "php": ">=5.6", + "symfony/options-resolver": "^2.7|^3.0", + "symfony/property-access": "^2.7|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7|^6.0", + "sensio/framework-extra-bundle": "^3.0", + "symfony/asset": "^2.7|^3.0", + "symfony/browser-kit": "^2.7|^3.0", + "symfony/finder": "^2.7|^3.0", + "symfony/framework-bundle": "^2.7|^3.0", + "symfony/http-kernel": "^2.7|^3.0", + "symfony/templating": "^2.7|^3.0", + "symfony/twig-bundle": "^2.7|^3.0", + "symfony/yaml": "^2.7|^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl", + "homepage": "http://endroid.nl/" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/QrCode", + "keywords": [ + "bundle", + "code", + "endroid", + "qr", + "qrcode", + "symfony" + ], + "time": "2017-05-30T13:53:47+00:00" + }, + { + "name": "fgrosse/phpasn1", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/fgrosse/PHPASN1.git", + "reference": "a18b162eca6aa70f8f15615f4ac8c852dffbc7dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/a18b162eca6aa70f8f15615f4ac8c852dffbc7dd", + "reference": "a18b162eca6aa70f8f15615f4ac8c852dffbc7dd", + "shasum": "" + }, + "require": { + "ext-gmp": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5", + "satooshi/php-coveralls": "dev-master" + }, + "suggest": { + "php-curl": "For loading OID information from the web if they have not bee defined statically" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "FG\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Friedrich Große", + "email": "friedrich.grosse@gmail.com", + "homepage": "https://github.com/FGrosse", + "role": "Author" + }, + { + "name": "All contributors", + "homepage": "https://github.com/FGrosse/PHPASN1/contributors" + } + ], + "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", + "homepage": "https://github.com/FGrosse/PHPASN1", + "keywords": [ + "DER", + "asn.1", + "asn1", + "ber", + "binary", + "decoding", + "encoding", + "x.509", + "x.690", + "x509", + "x690" + ], + "time": "2016-10-29T15:46:46+00:00" + }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "0.0.1", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "96d5f80680b04803c4f1b69d6e01735e876b80c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/96d5f80680b04803c4f1b69d6e01735e876b80c7", + "reference": "96d5f80680b04803c4f1b69d6e01735e876b80c7", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ], + "files": [ + "lib/common/customFunctions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "description": "QR code decoder / reader", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder", + "keywords": [ + "barcode", + "qr", + "zxing" + ], + "time": "2017-01-13T09:11:46+00:00" + }, + { + "name": "mdanter/ecc", + "version": "v0.4.2", + "source": { + "type": "git", + "url": "https://github.com/phpecc/phpecc.git", + "reference": "fdd1fa9be8184c9f319433437cb1d9f9d4294164" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpecc/phpecc/zipball/fdd1fa9be8184c9f319433437cb1d9f9d4294164", + "reference": "fdd1fa9be8184c9f319433437cb1d9f9d4294164", + "shasum": "" + }, + "require": { + "ext-gmp": "*", + "fgrosse/phpasn1": "~1.5", + "paragonie/random_compat": "^1|^2", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.1|~5.0", + "squizlabs/php_codesniffer": "~2", + "symfony/yaml": "~2.6|~3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mdanter\\Ecc\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matyas Danter", + "homepage": "http://matejdanter.com/", + "role": "Author" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io", + "homepage": "http://aztech.io", + "role": "Maintainer" + } + ], + "description": "PHP Elliptic Curve Cryptography library", + "homepage": "https://github.com/phpecc/phpecc", + "keywords": [ + "Diffie", + "ECDSA", + "Hellman", + "curve", + "ecdh", + "elliptic", + "nistp192", + "nistp224", + "nistp256", + "nistp521", + "phpecc", + "secp256k1" + ], + "time": "2017-01-04T12:13:24+00:00" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.25", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "f0896b5c7274d1450023b0b376240be902c3251c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/f0896b5c7274d1450023b0b376240be902c3251c", + "reference": "f0896b5c7274d1450023b0b376240be902c3251c", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "Mobile_Detect.php" + ], + "psr-0": { + "Detection": "namespaced/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "time": "2017-03-29T13:59:30+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "61f4a24da5be216301447f3278ea6562609d61f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/61f4a24da5be216301447f3278ea6562609d61f5", + "reference": "61f4a24da5be216301447f3278ea6562609d61f5", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2017-03-26T10:24:21+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.22.1", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6 || ~3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "~4.0 || ~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.23-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2017-01-16T07:55:07+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-03-13T16:27:32+00:00" + }, + { + "name": "predis/predis", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/nrk/predis.git", + "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", + "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-curl": "Allows access to Webdis when paired with phpiredis", + "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" + }, + "type": "library", + "autoload": { + "psr-4": { + "Predis\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniele Alessandri", + "email": "suppakilla@gmail.com", + "homepage": "http://clorophilla.net" + } + ], + "description": "Flexible and feature-complete Redis client for PHP and HHVM", + "homepage": "http://github.com/nrk/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "time": "2016-06-16T16:22:20+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "robmorgan/phinx", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/robmorgan/phinx.git", + "reference": "6943cb4bb78bf9d3964967a032220b7c793b97b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/robmorgan/phinx/zipball/6943cb4bb78bf9d3964967a032220b7c793b97b7", + "reference": "6943cb4bb78bf9d3964967a032220b7c793b97b7", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.26|^5.0" + }, + "bin": [ + "bin/phinx" + ], + "type": "library", + "autoload": { + "psr-4": { + "Phinx\\": "src/Phinx" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "homepage": "http://shadowhand.me", + "role": "Developer" + }, + { + "name": "Rob Morgan", + "email": "robbym@gmail.com", + "homepage": "https://robmorgan.id.au", + "role": "Lead Developer" + }, + { + "name": "Richard Quadling", + "email": "rquadling@gmail.com", + "role": "Developer" + } + ], + "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", + "homepage": "https://phinx.org", + "keywords": [ + "database", + "database migrations", + "db", + "migrations", + "phinx" + ], + "time": "2016-10-27T10:16:12+00:00" + }, + { + "name": "symfony/config", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/35716d4904e0506a7a5a9bcf23f854aeb5719bca", + "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3", + "symfony/yaml": "~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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 Config Component", + "homepage": "https://symfony.com", + "time": "2017-06-02T18:07:20+00:00" + }, + { + "name": "symfony/console", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e", + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3", + "symfony/dependency-injection": "~3.3", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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 Console Component", + "homepage": "https://symfony.com", + "time": "2017-06-02T19:24:58+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d", + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 Debug Component", + "homepage": "https://symfony.com", + "time": "2017-06-01T21:01:25+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "c709670bf64721202ddbe4162846f250735842c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c709670bf64721202ddbe4162846f250735842c0", + "reference": "c709670bf64721202ddbe4162846f250735842c0", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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 Filesystem Component", + "homepage": "https://symfony.com", + "time": "2017-05-28T14:08:56+00:00" + }, + { + "name": "symfony/inflector", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/inflector.git", + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/inflector/zipball/aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" + ], + "time": "2017-04-12T14:14:56+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "ff48982d295bcac1fd861f934f041ebc73ae40f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/ff48982d295bcac1fd861f934f041ebc73ae40f0", + "reference": "ff48982d295bcac1fd861f934f041ebc73ae40f0", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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 OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2017-04-12T14:14:56+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T14:24:12+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T14:24:12+00:00" + }, + { + "name": "symfony/property-access", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/70bbfe28f77070d41957495bc6fed34f139fe6f7", + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/inflector": "~3.1", + "symfony/polyfill-php70": "~1.0" + }, + "require-dev": { + "symfony/cache": "~3.1" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "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 PropertyAccess Component", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" + ], + "time": "2017-06-02T09:51:43+00:00" + }, + { + "name": "symfony/translation", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543", + "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/yaml": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~3.3" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "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 Translation Component", + "homepage": "https://symfony.com", + "time": "2017-05-22T07:42:36+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063", + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-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": "2017-06-02T22:05:06+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "b03f285a333f51e58c95cce54109a4a9ed691436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/b03f285a333f51e58c95cce54109a4a9ed691436", + "reference": "b03f285a333f51e58c95cce54109a4a9ed691436", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "phpunit/phpunit": "^4.6 || ^5.5", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev", + "dev-develop": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "time": "2017-04-06T16:18:34+00:00" + } + ], + "packages-dev": [ + { + "name": "cakephp/bake", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://github.com/cakephp/bake.git", + "reference": "6fe5dc1bcdd321ffc35e847ae0e0ab1effde2278" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/bake/zipball/6fe5dc1bcdd321ffc35e847ae0e0ab1effde2278", + "reference": "6fe5dc1bcdd321ffc35e847ae0e0ab1effde2278", + "shasum": "" + }, + "require": { + "cakephp/cakephp": ">=3.4.0 <4.0.0", + "cakephp/plugin-installer": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^3.0", + "phpunit/phpunit": "~5.7 | ~6.0" + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "Bake\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/bake/graphs/contributors" + } + ], + "description": "Bake plugin for CakePHP 3.0", + "homepage": "https://github.com/cakephp/bake", + "keywords": [ + "bake", + "cakephp" + ], + "time": "2017-06-05T23:32:05+00:00" + }, + { + "name": "cakephp/debug_kit", + "version": "3.10.2", + "source": { + "type": "git", + "url": "https://github.com/cakephp/debug_kit.git", + "reference": "a0583e2cb58e80940fd4aeb026be48d5f0000ff2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/a0583e2cb58e80940fd4aeb026be48d5f0000ff2", + "reference": "a0583e2cb58e80940fd4aeb026be48d5f0000ff2", + "shasum": "" + }, + "require": { + "cakephp/cakephp": "^3.4.0", + "cakephp/chronos": "^1.0.0", + "cakephp/plugin-installer": "^1.0.0", + "composer/composer": "^1.3.0", + "jdorn/sql-formatter": "^1.2.0" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^3.0", + "phpunit/phpunit": "<6.0" + }, + "suggest": { + "ext-sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." + }, + "type": "cakephp-plugin", + "autoload": { + "psr-4": { + "DebugKit\\": "src", + "DebugKit\\Test\\Fixture\\": "tests\\Fixture" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Story", + "homepage": "http://mark-story.com", + "role": "Author" + }, + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/debug_kit/graphs/contributors" + } + ], + "description": "CakePHP Debug Kit", + "homepage": "https://github.com/cakephp/debug_kit", + "keywords": [ + "cakephp", + "debug", + "kit" + ], + "time": "2017-05-12T16:10:13+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0" + }, + "suggest": { + "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2017-03-06T11:59:08+00:00" + }, + { + "name": "composer/composer", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "489e09ee6c3ba431fbeeef9147afdaeb6f91b647" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/489e09ee6c3ba431fbeeef9147afdaeb6f91b647", + "reference": "489e09ee6c3ba431fbeeef9147afdaeb6f91b647", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/semver": "^1.0", + "composer/spdx-licenses": "^1.0", + "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0", + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0", + "seld/cli-prompt": "^1.0", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.7 || ^3.0", + "symfony/filesystem": "^2.7 || ^3.0", + "symfony/finder": "^2.7 || ^3.0", + "symfony/process": "^2.7 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "time": "2017-05-17T06:17:53+00:00" + }, + { + "name": "composer/semver", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2016-08-30T16:08:34+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "2603a0d7ddc00a015deb576fa5297ca43dee6b1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/2603a0d7ddc00a015deb576fa5297ca43dee6b1c", + "reference": "2603a0d7ddc00a015deb576fa5297ca43dee6b1c", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "time": "2017-04-03T19:08:52+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24T07:27:01+00:00" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08T15:00:19+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20T18:58:01+00:00" + }, + { + "name": "jdorn/sql-formatter", + "version": "v1.2.17", + "source": { + "type": "git", + "url": "https://github.com/jdorn/sql-formatter.git", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/jdorn/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "time": "2014-01-12T16:20:24+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "429be236f296ca249d61c65649cdf2652f4a5e80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/429be236f296ca249d61c65649cdf2652f4a5e80", + "reference": "429be236f296ca249d61c65649cdf2652f4a5e80", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpdocumentor/phpdocumentor": "^2.7", + "phpunit/phpunit": "^4.8.22" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2017-05-16T21:06:09+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v3.0.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2017-03-05T18:23:57+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.8.6", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "7028d6d525fb183d50b249b7c07598e3d386b27d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7028d6d525fb183d50b249b7c07598e3d386b27d", + "reference": "7028d6d525fb183d50b249b7c07598e3d386b27d", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "~1.3|~2.0|~3.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "hoa/console": "~3.16|~1.14", + "phpunit/phpunit": "~4.4|~5.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2017-06-04T10:34:20+00:00" + }, + { + "name": "seld/cli-prompt", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/cli-prompt.git", + "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/cli-prompt/zipball/a19a7376a4689d4d94cab66ab4f3c816019ba8dd", + "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\CliPrompt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Allows you to prompt for user input on the command line, and optionally hide the characters they type", + "keywords": [ + "cli", + "console", + "hidden", + "input", + "prompt" + ], + "time": "2017-03-18T11:32:45+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/791f8c594f300d246cdf01c6b3e1e19611e301d8", + "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2017-03-06T16:42:24+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phra" + ], + "time": "2015-10-13T18:44:15+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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 Finder Component", + "homepage": "https://symfony.com", + "time": "2017-06-01T21:01:25+00:00" + }, + { + "name": "symfony/process", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", + "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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 Process Component", + "homepage": "https://symfony.com", + "time": "2017-05-22T12:32:03+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/347c4247a3e40018810b476fcd5dec36d46d08dc", + "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "ext-iconv": "*", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2017-06-02T09:10:29+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "psy/psysh": 0 + }, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=5.6" + }, + "platform-dev": [] +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..77c784b --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,40 @@ + + + + + + + + + + + ./tests/TestCase + + + + + + + + + + + + + + + + + ./src/ + ./plugins/*/src/ + + + diff --git a/sql/lbryexplorer.aux.sql b/sql/lbryexplorer.aux.sql new file mode 100644 index 0000000..f44f853 --- /dev/null +++ b/sql/lbryexplorer.aux.sql @@ -0,0 +1,18 @@ +-- Address Tagging TX tracking +CREATE TABLE `TagAddressRequests` +( + `Id` SERIAL, + `Address` VARCHAR(35) NOT NULL, + `VerificationAmount` DECIMAL(18,8) NOT NULL, + `Tag` VARCHAR(30) NOT NULL, + `TagUrl` VARCHAR(200) NULL, + `IsVerified` TINYINT(1) DEFAULT 0 NOT NULL, + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + PRIMARY KEY `PK_TagAddressRequest` (`Id`), + UNIQUE KEY `Idx_TagAddressRequestId` (`Address`, `VerificationAmount`), + INDEX `Idx_TagAddressRequestVerificationAmount` (`VerificationAmount`), + INDEX `Idx_TagAddressRequestAddress` (`Address`), + INDEX `Idx_TagAddressRequestCreated` (`Created`), + INDEX `Idx_TagAddressRequestModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; \ No newline at end of file diff --git a/sql/lbryexplorer.ddl.sql b/sql/lbryexplorer.ddl.sql new file mode 100644 index 0000000..4328d56 --- /dev/null +++ b/sql/lbryexplorer.ddl.sql @@ -0,0 +1,186 @@ +--DROP DATABASE IF EXISTS lbry; +CREATE DATABASE lbry DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; +USE lbry; + +CREATE TABLE `Blocks` +( + `Id` SERIAL, + + `Bits` VARCHAR(20) NOT NULL, + `Chainwork` VARCHAR(70) NOT NULL, + `Confirmations` INTEGER UNSIGNED NOT NULL, + `Difficulty` DECIMAL(18,8) NOT NULL, + `Hash` VARCHAR(70) NOT NULL, + `Height` BIGINT UNSIGNED NOT NULL, + `MedianTime` BIGINT UNSIGNED NOT NULL, + `MerkleRoot` VARCHAR(70) NOT NULL, + `NameClaimRoot` VARCHAR(70) NOT NULL, + `Nonce` BIGINT UNSIGNED NOT NULL, + `PreviousBlockHash` VARCHAR(70), + `NextBlockHash` VARCHAR(70), + `BlockSize` BIGINT UNSIGNED NOT NULL, + `Target` VARCHAR(70) NOT NULL, + `BlockTime` BIGINT UNSIGNED NOT NULL, + `Version` BIGINT UNSIGNED NOT NULL, + `VersionHex` VARCHAR(10) NOT NULL, + `TransactionHashes` TEXT, + `TransactionsProcessed` TINYINT(1) DEFAULT 0 NOT NULL, + + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + + PRIMARY KEY `PK_Block` (`Id`), + UNIQUE KEY `Idx_BlockHash` (`Hash`), + CONSTRAINT `Cnt_TransactionHashesValidJson` CHECK(`TransactionHashes` IS NULL OR JSON_VALID(`TransactionHashes`)), + INDEX `Idx_BlockHeight` (`Height`), + INDEX `Idx_BlockTime` (`BlockTime`), + INDEX `Idx_MedianTime` (`MedianTime`), + INDEX `Idx_PreviousBlockHash` (`PreviousBlockHash`), + INDEX `Idx_BlockCreated` (`Created`), + INDEX `Idx_BlockModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `Transactions` +( + `Id` SERIAL, + `BlockHash` VARCHAR(70), + `InputCount` INTEGER UNSIGNED NOT NULL, + `OutputCount` INTEGER UNSIGNED NOT NULL, + `Value` DECIMAL(18,8) NOT NULL, + `Fee` DECIMAL(18,8) DEFAULT 0 NOT NULL, + `TransactionTime` BIGINT UNSIGNED, + `TransactionSize` BIGINT UNSIGNED NOT NULL, + `Hash` VARCHAR(70) NOT NULL, + `Version` INTEGER NOT NULL, + `LockTime` INTEGER UNSIGNED NOT NULL, + `Raw` TEXT, + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + `CreatedTime` INTEGER UNSIGNED DEFAULT UNIX_TIMESTAMP() NOT NULL, + PRIMARY KEY `PK_Transaction` (`Id`), + FOREIGN KEY `FK_TransactionBlockHash` (`BlockHash`) REFERENCES `Blocks` (`Hash`), + UNIQUE KEY `Idx_TransactionHash` (`Hash`), + INDEX `Idx_TransactionTime` (`TransactionTime`), + INDEX `Idx_TransactionCreatedTime` (`CreatedTime`), + INDEX `Idx_TransactionCreated` (`Created`), + INDEX `Idx_TransactionModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `Addresses` +( + `Id` SERIAL, + `Address` VARCHAR(40) NOT NULL, + `FirstSeen` DATETIME, + `TotalReceived` DECIMAL(18,8) DEFAULT 0 NOT NULL, + `TotalSent` DECIMAL(18,8) DEFAULT 0 NOT NULL, + `Tag` VARCHAR(30) NOT NULL, + `TagUrl` VARCHAR(200), + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + PRIMARY KEY `PK_Address` (`Id`), + UNIQUE KEY `Idx_AddressAddress` (`Address`), + UNIQUE KEY `Idx_AddressTag` (`Tag`), + INDEX `Idx_AddressTotalReceived` (`TotalReceived`), + INDEX `Idx_AddressTotalSent` (`TotalSent`), + INDEX `Idx_AddressCreated` (`Created`), + INDEX `Idx_AddressModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `Inputs` +( + `Id` SERIAL, + `TransactionId` BIGINT UNSIGNED NOT NULL, + `TransactionHash` VARCHAR(70) NOT NULL, + `AddressId` BIGINT UNSIGNED, + `IsCoinbase` TINYINT(1) DEFAULT 0 NOT NULL, + `Coinbase` VARCHAR(70), + `PrevoutHash` VARCHAR(70), + `PrevoutN` INTEGER UNSIGNED, + `PrevoutSpendUpdated` TINYINT(1) DEFAULT 0 NOT NULL, + `Sequence` INTEGER UNSIGNED, + `Value` DECIMAL(18,8), + `ScriptSigAsm` TEXT, + `ScriptSigHex` TEXT, + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + PRIMARY KEY `PK_Input` (`Id`), + FOREIGN KEY `FK_InputAddress` (`AddressId`) REFERENCES `Addresses` (`Id`), + FOREIGN KEY `FK_InputTransaction` (`TransactionId`) REFERENCES `Transactions` (`Id`), + INDEX `Idx_InputValue` (`Value`), + INDEX `Idx_PrevoutHash` (`PrevoutHash`), + INDEX `Idx_InputCreated` (`Created`), + INDEX `Idx_InputModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `InputsAddresses` +( + `InputId` BIGINT UNSIGNED NOT NULL, + `AddressId` BIGINT UNSIGNED NOT NULL, + PRIMARY KEY `PK_InputAddress` (`InputId`, `AddressId`), + FOREIGN KEY `Idx_InputsAddressesInput` (`InputId`) REFERENCES `Inputs` (`Id`), + FOREIGN KEY `Idx_InputsAddressesAddress` (`AddressId`) REFERENCES `Addresses` (`Id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `Outputs` +( + `Id` SERIAL, + `TransactionId` BIGINT UNSIGNED NOT NULL, + `Value` DECIMAL(18,8), + `Vout` INTEGER UNSIGNED, + `Type` VARCHAR(20), + `ScriptPubKeyAsm` TEXT, + `ScriptPubKeyHex` TEXT, + `RequiredSignatures` INTEGER UNSIGNED, + `Hash160` VARCHAR(50), + `Addresses` TEXT, + `IsSpent` TINYINT(1) DEFAULT 0 NOT NULL, + `SpentByInputId` BIGINT UNSIGNED, + `Created` DATETIME NOT NULL, + `Modified` DATETIME NOT NULL, + PRIMARY KEY `PK_Output` (`Id`), + FOREIGN KEY `FK_OutputTransaction` (`TransactionId`) REFERENCES `Transactions` (`Id`), + FOREIGN KEY `FK_OutputSpentByInput` (`SpentByInputId`) REFERENCES `Inputs` (`Id`), + CONSTRAINT `Cnt_AddressesValidJson` CHECK(`Addresses` IS NULL OR JSON_VALID(`Addresses`)), + INDEX `Idx_OutputValue` (`Value`), + INDEX `Idx_OuptutCreated` (`Created`), + INDEX `Idx_OutputModified` (`Modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `OutputsAddresses` +( + `OutputId` BIGINT UNSIGNED NOT NULL, + `AddressId` BIGINT UNSIGNED NOT NULL, + PRIMARY KEY `PK_OutputAddress` (`OutputId`, `AddressId`), + FOREIGN KEY `Idx_OutputsAddressesOutput` (`OutputId`) REFERENCES `Outputs` (`Id`), + FOREIGN KEY `Idx_OutputsAddressesAddress` (`AddressId`) REFERENCES `Addresses` (`Id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +CREATE TABLE `TransactionsAddresses` +( + `TransactionId` BIGINT UNSIGNED NOT NULL, + `AddressId` BIGINT UNSIGNED NOT NULL, + `DebitAmount` DECIMAL(18,8) DEFAULT 0 NOT NULL COMMENT 'Sum of the inputs to this address for the tx', + `CreditAmount` DECIMAL(18,8) DEFAULT 0 NOT NULL COMMENT 'Sum of the outputs to this address for the tx', + `TransactionTime` DATETIME DEFAULT UTC_TIMESTAMP() NOT NULL, + PRIMARY KEY `PK_TransactionAddress` (`TransactionId`, `AddressId`), + FOREIGN KEY `Idx_TransactionsAddressesTransaction` (`TransactionId`) REFERENCES `Transactions` (`Id`), + FOREIGN KEY `Idx_TransactionsAddressesAddress` (`AddressId`) REFERENCES `Addresses` (`Id`), + INDEX `Idx_TransactionsAddressesLatestTransactionTime` (`LatestTransactionTime`), + INDEX `Idx_TransactionsAddressesDebit` (`DebitAmount`), + INDEX `Idx_TransactionsAddressesCredit` (`CreditAmount`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; + +ALTER TABLE TransactionsAddresses ADD COLUMN TransactionTime DATETIME DEFAULT UTC_TIMESTAMP() NOT NULL AFTER CreditAmount; +ALTER TABLE TransactionsAddresses ADD INDEX `Idx_TransactionsAddressesTransactionTime` (`TransactionTime`); + +ALTER TABLE Addresses ADD COLUMN TotalReceived DECIMAL(18,8) DEFAULT 0 NOT NULL AFTER FirstSeen; +ALTER TABLE Addresses ADD COLUMN TotalSent DECIMAL(18,8) DEFAULT 0 NOT NULL AFTER TotalReceived; +ALTER TABLE Addresses ADD INDEX Idx_AddressTotalReceived (TotalReceived); +ALTER TABLE Addresses ADD INDEX Idx_AddressTotalSent (TotalSent); + +ALTER TABLE Addresses ADD COLUMN `Tag` VARCHAR(30) AFTER TotalSent; +ALTER TABLE Addresses ADD COLUMN `TagUrl` VARCHAR(200) AFTER Tag; +ALTER TABLE Addresses ADD UNIQUE KEY `Idx_AddressTag` (`Tag`); + + +ALTER TABLE Transactions ADD INDEX `Idx_TransactionSize` (`TransactionSize`); \ No newline at end of file diff --git a/src/Model/Behavior/SimpleAuditBehavior.php b/src/Model/Behavior/SimpleAuditBehavior.php index 9f8a5b9..8d20b5b 100644 --- a/src/Model/Behavior/SimpleAuditBehavior.php +++ b/src/Model/Behavior/SimpleAuditBehavior.php @@ -1,67 +1,67 @@ - false, - 'implementedMethods' => ['audit' => 'audit'], - 'fieldMap' => [ - 'CreatedOn' => 'Created', - 'ModifiedOn' => 'Modified', - 'CreatedBy' => 'CreatedBy', - 'ModifiedBy' => 'ModifiedBy' - ] - ]; - - public function audit(Entity $entity, $systemOperation = false) { - $time = $this->_currentUtcTime()->format('Y-m-d H:i:s'); - $user = ($systemOperation) ? self::$DefaultUser : $this->_currentUser(); - - if (!$systemOperation - && $this->_config['abortOnUserInvalid'] - && $user == self::$DefaultUser) - { - return false; - } - - $fieldMap = $this->_config['fieldMap']; - - if ($entity->isNew()) { - $entity->set($fieldMap['CreatedOn'], $time); - $entity->set($fieldMap['CreatedBy'], $user); - } - - $entity->set($fieldMap['ModifiedOn'], $time); - $entity->set($fieldMap['ModifiedBy'], $user); - return true; - } - - public function beforeSave(Event $event, Entity $entity) { - return $this->audit($entity); - } - - private function _currentUtcTime() { - return new \DateTime('now', new \DateTimeZone('UTC')); - } - - private function _currentUser() { - $request = Router::getRequest(true); - if ($request) { - $session = $request->session(); - $fieldValue = $session->read(sprintf('Auth.User.' . $this->_userField)); - return (intval($fieldValue) > 0) ? $fieldValue : self::$DefaultUser; - } - } -} - + false, + 'implementedMethods' => ['audit' => 'audit'], + 'fieldMap' => [ + 'CreatedOn' => 'Created', + 'ModifiedOn' => 'Modified', + 'CreatedBy' => 'CreatedBy', + 'ModifiedBy' => 'ModifiedBy' + ] + ]; + + public function audit(Entity $entity, $systemOperation = false) { + $time = $this->_currentUtcTime()->format('Y-m-d H:i:s'); + $user = ($systemOperation) ? self::$DefaultUser : $this->_currentUser(); + + if (!$systemOperation + && $this->_config['abortOnUserInvalid'] + && $user == self::$DefaultUser) + { + return false; + } + + $fieldMap = $this->_config['fieldMap']; + + if ($entity->isNew()) { + $entity->set($fieldMap['CreatedOn'], $time); + $entity->set($fieldMap['CreatedBy'], $user); + } + + $entity->set($fieldMap['ModifiedOn'], $time); + $entity->set($fieldMap['ModifiedBy'], $user); + return true; + } + + public function beforeSave(Event $event, Entity $entity) { + return $this->audit($entity); + } + + private function _currentUtcTime() { + return new \DateTime('now', new \DateTimeZone('UTC')); + } + + private function _currentUser() { + $request = Router::getRequest(true); + if ($request) { + $session = $request->session(); + $fieldValue = $session->read(sprintf('Auth.User.' . $this->_userField)); + return (intval($fieldValue) > 0) ? $fieldValue : self::$DefaultUser; + } + } +} + ?> \ No newline at end of file diff --git a/src/Model/Entity/Address.php b/src/Model/Entity/Address.php index d5b900a..fbae83e 100644 --- a/src/Model/Entity/Address.php +++ b/src/Model/Entity/Address.php @@ -1,11 +1,11 @@ - \ No newline at end of file diff --git a/src/Model/Entity/Input.php b/src/Model/Entity/Input.php index c6f7d89..2cfebd1 100644 --- a/src/Model/Entity/Input.php +++ b/src/Model/Entity/Input.php @@ -1,11 +1,11 @@ - \ No newline at end of file diff --git a/src/Model/Entity/Output.php b/src/Model/Entity/Output.php index 5ad3732..e1142a5 100644 --- a/src/Model/Entity/Output.php +++ b/src/Model/Entity/Output.php @@ -1,11 +1,11 @@ - \ No newline at end of file diff --git a/src/Model/Entity/Transaction.php b/src/Model/Entity/Transaction.php index 99f5aab..631f08c 100644 --- a/src/Model/Entity/Transaction.php +++ b/src/Model/Entity/Transaction.php @@ -1,11 +1,11 @@ - \ No newline at end of file diff --git a/src/Model/Table/TagAddressRequestsTable.php b/src/Model/Table/TagAddressRequestsTable.php index f8dc755..51af76e 100644 --- a/src/Model/Table/TagAddressRequestsTable.php +++ b/src/Model/Table/TagAddressRequestsTable.php @@ -1,18 +1,18 @@ -primaryKey('Id'); - $this->table('TagAddressRequests'); - - $this->addBehavior('SimpleAudit'); - } -} - +primaryKey('Id'); + $this->table('TagAddressRequests'); + + $this->addBehavior('SimpleAudit'); + } +} + ?> \ No newline at end of file diff --git a/src/View/Helper/AmountHelper.php b/src/View/Helper/AmountHelper.php index ee6bcbb..2378206 100644 --- a/src/View/Helper/AmountHelper.php +++ b/src/View/Helper/AmountHelper.php @@ -1,44 +1,44 @@ - 0) { - $value .= '.' . rtrim($right, '0'); - } - } - - return $value; - } - - public function formatCurrency($value) { - $dotIdx = strpos($value, '.'); - if ($dotIdx !== false) { - $left = substr($value, 0, $dotIdx); - $right = substr($value, $dotIdx + 1); - - $value = number_format($left, 0, '', ','); - if ((int) $right > 0) { - if (strlen($right) === 1) { - $value .= '.' . $right . '0'; - } else { - $value .= '.' . substr($right, 0, 2); - } - } - } - - return $value; - } -} - + 0) { + $value .= '.' . rtrim($right, '0'); + } + } + + return $value; + } + + public function formatCurrency($value) { + $dotIdx = strpos($value, '.'); + if ($dotIdx !== false) { + $left = substr($value, 0, $dotIdx); + $right = substr($value, $dotIdx + 1); + + $value = number_format($left, 0, '', ','); + if ((int) $right > 0) { + if (strlen($right) === 1) { + $value .= '.' . $right . '0'; + } else { + $value .= '.' . substr($right, 0, 2); + } + } + } + + return $value; + } +} + ?> \ No newline at end of file