mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-24 22:39:31 +00:00
Update Framework packages
This commit is contained in:
parent
e3fb27ea76
commit
09347f4fee
188
composer.lock
generated
188
composer.lock
generated
|
@ -297,12 +297,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/application.git",
|
||||
"reference": "13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27"
|
||||
"reference": "9fc3da51bedebaece1d32cb5a1923633b1932953"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/application/zipball/13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27",
|
||||
"reference": "13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27",
|
||||
"url": "https://api.github.com/repos/joomla-framework/application/zipball/9fc3da51bedebaece1d32cb5a1923633b1932953",
|
||||
"reference": "9fc3da51bedebaece1d32cb5a1923633b1932953",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -348,7 +348,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-19T22:07:50+00:00"
|
||||
"time": "2018-03-15T01:47:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/archive",
|
||||
|
@ -461,12 +461,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/console.git",
|
||||
"reference": "13a8498930831b88c5ece0327a1c46e331a54fb8"
|
||||
"reference": "b625aebe2dcc572facded26e552130517919b8de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/console/zipball/13a8498930831b88c5ece0327a1c46e331a54fb8",
|
||||
"reference": "13a8498930831b88c5ece0327a1c46e331a54fb8",
|
||||
"url": "https://api.github.com/repos/joomla-framework/console/zipball/b625aebe2dcc572facded26e552130517919b8de",
|
||||
"reference": "b625aebe2dcc572facded26e552130517919b8de",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -506,7 +506,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-21T22:25:10+00:00"
|
||||
"time": "2018-03-18T01:08:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/controller",
|
||||
|
@ -514,12 +514,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/controller.git",
|
||||
"reference": "eef984467f698ba8187763c4e4ac64c19595c4c7"
|
||||
"reference": "fad0742b56ed085fee7699f01ae90d54ac9e83a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/controller/zipball/eef984467f698ba8187763c4e4ac64c19595c4c7",
|
||||
"reference": "eef984467f698ba8187763c4e4ac64c19595c4c7",
|
||||
"url": "https://api.github.com/repos/joomla-framework/controller/zipball/fad0742b56ed085fee7699f01ae90d54ac9e83a2",
|
||||
"reference": "fad0742b56ed085fee7699f01ae90d54ac9e83a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -527,9 +527,9 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"joomla/application": "~1.0|~2.0",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/input": "~1.0|~2.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"joomla/application": "The joomla/application package is required to use Joomla\\Controller\\AbstractController",
|
||||
|
@ -557,7 +557,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-30T01:56:37+00:00"
|
||||
"time": "2018-02-10T00:30:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/crypt",
|
||||
|
@ -565,12 +565,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/crypt.git",
|
||||
"reference": "fdc81318aef68d887ef45ecc403ef266d442fcec"
|
||||
"reference": "68532f41fd62c96987e7b264f59b31355efb0f7e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/crypt/zipball/fdc81318aef68d887ef45ecc403ef266d442fcec",
|
||||
"reference": "fdc81318aef68d887ef45ecc403ef266d442fcec",
|
||||
"url": "https://api.github.com/repos/joomla-framework/crypt/zipball/68532f41fd62c96987e7b264f59b31355efb0f7e",
|
||||
"reference": "68532f41fd62c96987e7b264f59b31355efb0f7e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -578,9 +578,9 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"defuse/php-encryption": "~2.0",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"paragonie/sodium_compat": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"symfony/phpunit-bridge": "~3.3",
|
||||
"symfony/polyfill-util": "~1.0"
|
||||
},
|
||||
|
@ -610,7 +610,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-02-03T18:21:14+00:00"
|
||||
"time": "2018-03-13T01:30:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/data",
|
||||
|
@ -618,12 +618,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/data.git",
|
||||
"reference": "68e8a777a504a46b473219770e2b43d400b45ccf"
|
||||
"reference": "b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/data/zipball/68e8a777a504a46b473219770e2b43d400b45ccf",
|
||||
"reference": "68e8a777a504a46b473219770e2b43d400b45ccf",
|
||||
"url": "https://api.github.com/repos/joomla-framework/data/zipball/b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa",
|
||||
"reference": "b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -631,9 +631,9 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -657,7 +657,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-30T01:59:28+00:00"
|
||||
"time": "2018-02-10T00:54:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/database",
|
||||
|
@ -665,12 +665,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/database.git",
|
||||
"reference": "9a3f41f6579e00209b808027e53616cbdaeebf9c"
|
||||
"reference": "17e831cf4b0648551b8be82c9cadc83c1d2263d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/database/zipball/9a3f41f6579e00209b808027e53616cbdaeebf9c",
|
||||
"reference": "9a3f41f6579e00209b808027e53616cbdaeebf9c",
|
||||
"url": "https://api.github.com/repos/joomla-framework/database/zipball/17e831cf4b0648551b8be82c9cadc83c1d2263d7",
|
||||
"reference": "17e831cf4b0648551b8be82c9cadc83c1d2263d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -679,12 +679,12 @@
|
|||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/di": "~1.0|~2.0",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"joomla/test": "~1.2",
|
||||
"phpunit/dbunit": "~3.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mysqli": "To connect to a MySQL database via MySQLi",
|
||||
|
@ -716,7 +716,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-30T01:59:43+00:00"
|
||||
"time": "2018-03-18T16:26:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/di",
|
||||
|
@ -724,12 +724,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/di.git",
|
||||
"reference": "dfb066cb3a95754722377c77285df4383710c3c0"
|
||||
"reference": "f20cbb40dadac88004f96cd10a73617a9596b2e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/di/zipball/dfb066cb3a95754722377c77285df4383710c3c0",
|
||||
"reference": "dfb066cb3a95754722377c77285df4383710c3c0",
|
||||
"url": "https://api.github.com/repos/joomla-framework/di/zipball/f20cbb40dadac88004f96cd10a73617a9596b2e2",
|
||||
"reference": "f20cbb40dadac88004f96cd10a73617a9596b2e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -740,8 +740,8 @@
|
|||
"psr/container-implementation": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -768,7 +768,7 @@
|
|||
"ioc",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-27T23:43:54+00:00"
|
||||
"time": "2018-02-25T16:34:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/event",
|
||||
|
@ -776,20 +776,20 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/event.git",
|
||||
"reference": "0fe395087d3158745aa49f4993ef1e00bec8daf0"
|
||||
"reference": "71d0e41338a9e6cf8682f171fb483c7efb591876"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/event/zipball/0fe395087d3158745aa49f4993ef1e00bec8daf0",
|
||||
"reference": "0fe395087d3158745aa49f4993ef1e00bec8daf0",
|
||||
"url": "https://api.github.com/repos/joomla-framework/event/zipball/71d0e41338a9e6cf8682f171fb483c7efb591876",
|
||||
"reference": "71d0e41338a9e6cf8682f171fb483c7efb591876",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -813,7 +813,7 @@
|
|||
"framework",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-02-06T09:30:41+00:00"
|
||||
"time": "2018-02-10T16:18:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/filesystem",
|
||||
|
@ -920,12 +920,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/http.git",
|
||||
"reference": "bb348880069a81c7ca61adc781756b7aae4dabfe"
|
||||
"reference": "a9ac5f74c1825518d8cb6096f7513b512172da72"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/http/zipball/bb348880069a81c7ca61adc781756b7aae4dabfe",
|
||||
"reference": "bb348880069a81c7ca61adc781756b7aae4dabfe",
|
||||
"url": "https://api.github.com/repos/joomla-framework/http/zipball/a9ac5f74c1825518d8cb6096f7513b512172da72",
|
||||
"reference": "a9ac5f74c1825518d8cb6096f7513b512172da72",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -936,9 +936,9 @@
|
|||
"zendframework/zend-diactoros": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "To use cURL for HTTP connections"
|
||||
|
@ -965,7 +965,7 @@
|
|||
"http",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-30T02:02:27+00:00"
|
||||
"time": "2018-03-13T01:52:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/image",
|
||||
|
@ -973,12 +973,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/image.git",
|
||||
"reference": "6041ea0c688f816e9861fbfc3a5256f3a201f86f"
|
||||
"reference": "20cf764c62927364ce40478e55b7d6c09581f079"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/image/zipball/6041ea0c688f816e9861fbfc3a5256f3a201f86f",
|
||||
"reference": "6041ea0c688f816e9861fbfc3a5256f3a201f86f",
|
||||
"url": "https://api.github.com/repos/joomla-framework/image/zipball/20cf764c62927364ce40478e55b7d6c09581f079",
|
||||
"reference": "20cf764c62927364ce40478e55b7d6c09581f079",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -987,9 +987,9 @@
|
|||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -1013,7 +1013,7 @@
|
|||
"image",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2018-01-30T02:02:36+00:00"
|
||||
"time": "2018-02-18T19:04:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/input",
|
||||
|
@ -1069,12 +1069,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/ldap.git",
|
||||
"reference": "ac65aaca9657cfa664d4f7519eec3796514532ed"
|
||||
"reference": "19f504133108dc84b31872014f5a961e683b35b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/ldap/zipball/ac65aaca9657cfa664d4f7519eec3796514532ed",
|
||||
"reference": "ac65aaca9657cfa664d4f7519eec3796514532ed",
|
||||
"url": "https://api.github.com/repos/joomla-framework/ldap/zipball/19f504133108dc84b31872014f5a961e683b35b4",
|
||||
"reference": "19f504133108dc84b31872014f5a961e683b35b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1082,9 +1082,9 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -1108,7 +1108,7 @@
|
|||
"joomla",
|
||||
"ldap"
|
||||
],
|
||||
"time": "2018-01-30T02:04:26+00:00"
|
||||
"time": "2018-02-18T19:25:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/oauth1",
|
||||
|
@ -1116,12 +1116,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/oauth1.git",
|
||||
"reference": "3b4f8fbc80c8c7c39c8848c760fbf7c97901662f"
|
||||
"reference": "bd0c1c9b4b85d6de84c495e17ac6449ae3573e03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/oauth1/zipball/3b4f8fbc80c8c7c39c8848c760fbf7c97901662f",
|
||||
"reference": "3b4f8fbc80c8c7c39c8848c760fbf7c97901662f",
|
||||
"url": "https://api.github.com/repos/joomla-framework/oauth1/zipball/bd0c1c9b4b85d6de84c495e17ac6449ae3573e03",
|
||||
"reference": "bd0c1c9b4b85d6de84c495e17ac6449ae3573e03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1129,12 +1129,12 @@
|
|||
"joomla/http": "^1.2.2|~2.0",
|
||||
"joomla/input": "~1.2|~2.0",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"joomla/session": "~1.0|~2.0",
|
||||
"joomla/session": "~2.0",
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/event": "~1.0",
|
||||
"joomla/event": "~2.0",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
|
@ -1160,7 +1160,7 @@
|
|||
"joomla",
|
||||
"oauth1"
|
||||
],
|
||||
"time": "2018-01-30T02:09:32+00:00"
|
||||
"time": "2018-03-15T00:28:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/oauth2",
|
||||
|
@ -1217,12 +1217,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/registry.git",
|
||||
"reference": "819539a928ea8115901e34593deaf1d8968d58e6"
|
||||
"reference": "6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/819539a928ea8115901e34593deaf1d8968d58e6",
|
||||
"reference": "819539a928ea8115901e34593deaf1d8968d58e6",
|
||||
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5",
|
||||
"reference": "6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1230,8 +1230,8 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"symfony/yaml": "~2.7|~3.0|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
@ -1259,7 +1259,7 @@
|
|||
"joomla",
|
||||
"registry"
|
||||
],
|
||||
"time": "2018-01-30T02:10:15+00:00"
|
||||
"time": "2018-03-15T00:35:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/session",
|
||||
|
@ -1267,12 +1267,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/session.git",
|
||||
"reference": "fae9b43f5d6b2dee4efcc634545196ae418f8b53"
|
||||
"reference": "a222020ccd6399cf3838f32cc8f916d7ed51193b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/session/zipball/fae9b43f5d6b2dee4efcc634545196ae418f8b53",
|
||||
"reference": "fae9b43f5d6b2dee4efcc634545196ae418f8b53",
|
||||
"url": "https://api.github.com/repos/joomla-framework/session/zipball/a222020ccd6399cf3838f32cc8f916d7ed51193b",
|
||||
"reference": "a222020ccd6399cf3838f32cc8f916d7ed51193b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1318,7 +1318,7 @@
|
|||
"joomla",
|
||||
"session"
|
||||
],
|
||||
"time": "2018-03-13T00:03:35+00:00"
|
||||
"time": "2018-03-13T00:22:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/string",
|
||||
|
@ -1326,12 +1326,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/string.git",
|
||||
"reference": "2208db80464df670b4b9aeb7e0c2de5211783869"
|
||||
"reference": "03610c2577bf2f71013c2a8ad587842d6f66507f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/string/zipball/2208db80464df670b4b9aeb7e0c2de5211783869",
|
||||
"reference": "2208db80464df670b4b9aeb7e0c2de5211783869",
|
||||
"url": "https://api.github.com/repos/joomla-framework/string/zipball/03610c2577bf2f71013c2a8ad587842d6f66507f",
|
||||
"reference": "03610c2577bf2f71013c2a8ad587842d6f66507f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1339,9 +1339,9 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/inflector": "~1.2",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/inflector": "To use the string inflector",
|
||||
|
@ -1386,7 +1386,7 @@
|
|||
"joomla",
|
||||
"string"
|
||||
],
|
||||
"time": "2018-01-28T01:11:48+00:00"
|
||||
"time": "2018-02-25T21:52:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/uri",
|
||||
|
@ -1394,21 +1394,21 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/uri.git",
|
||||
"reference": "d11c66b44882caef4543e365499839542fcc1913"
|
||||
"reference": "9459faee3cfbe4062d95fb9eb3d2c3d661d853f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/uri/zipball/d11c66b44882caef4543e365499839542fcc1913",
|
||||
"reference": "d11c66b44882caef4543e365499839542fcc1913",
|
||||
"url": "https://api.github.com/repos/joomla-framework/uri/zipball/9459faee3cfbe4062d95fb9eb3d2c3d661d853f5",
|
||||
"reference": "9459faee3cfbe4062d95fb9eb3d2c3d661d853f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -1432,7 +1432,7 @@
|
|||
"joomla",
|
||||
"uri"
|
||||
],
|
||||
"time": "2018-01-30T02:11:25+00:00"
|
||||
"time": "2018-02-25T22:52:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/utilities",
|
||||
|
@ -1440,12 +1440,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/utilities.git",
|
||||
"reference": "059dd377f51de547f0d92082448404fda46f0e81"
|
||||
"reference": "da30b6c890811ddab6eeca29d6148caa866242f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/utilities/zipball/059dd377f51de547f0d92082448404fda46f0e81",
|
||||
"reference": "059dd377f51de547f0d92082448404fda46f0e81",
|
||||
"url": "https://api.github.com/repos/joomla-framework/utilities/zipball/da30b6c890811ddab6eeca29d6148caa866242f6",
|
||||
"reference": "da30b6c890811ddab6eeca29d6148caa866242f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1453,8 +1453,8 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
|
@ -1478,7 +1478,7 @@
|
|||
"joomla",
|
||||
"utilities"
|
||||
],
|
||||
"time": "2018-01-30T02:11:34+00:00"
|
||||
"time": "2018-03-15T00:43:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mso/idna-convert",
|
||||
|
|
|
@ -617,6 +617,8 @@ return array(
|
|||
'Joomla\\Database\\QueryInterface' => $vendorDir . '/joomla/database/src/QueryInterface.php',
|
||||
'Joomla\\Database\\QueryMonitorInterface' => $vendorDir . '/joomla/database/src/QueryMonitorInterface.php',
|
||||
'Joomla\\Database\\Query\\LimitableInterface' => $vendorDir . '/joomla/database/src/Query/LimitableInterface.php',
|
||||
'Joomla\\Database\\Query\\MysqlQueryBuilder' => $vendorDir . '/joomla/database/src/Query/MysqlQueryBuilder.php',
|
||||
'Joomla\\Database\\Query\\PostgresqlQueryBuilder' => $vendorDir . '/joomla/database/src/Query/PostgresqlQueryBuilder.php',
|
||||
'Joomla\\Database\\Query\\PreparableInterface' => $vendorDir . '/joomla/database/src/Query/PreparableInterface.php',
|
||||
'Joomla\\Database\\Query\\QueryElement' => $vendorDir . '/joomla/database/src/Query/QueryElement.php',
|
||||
'Joomla\\Database\\Service\\DatabaseProvider' => $vendorDir . '/joomla/database/src/Service/DatabaseProvider.php',
|
||||
|
|
|
@ -882,6 +882,8 @@ class ComposerStaticInit8462306b3e4ab2d2c9bfd5cc383e4b0c
|
|||
'Joomla\\Database\\QueryInterface' => __DIR__ . '/..' . '/joomla/database/src/QueryInterface.php',
|
||||
'Joomla\\Database\\QueryMonitorInterface' => __DIR__ . '/..' . '/joomla/database/src/QueryMonitorInterface.php',
|
||||
'Joomla\\Database\\Query\\LimitableInterface' => __DIR__ . '/..' . '/joomla/database/src/Query/LimitableInterface.php',
|
||||
'Joomla\\Database\\Query\\MysqlQueryBuilder' => __DIR__ . '/..' . '/joomla/database/src/Query/MysqlQueryBuilder.php',
|
||||
'Joomla\\Database\\Query\\PostgresqlQueryBuilder' => __DIR__ . '/..' . '/joomla/database/src/Query/PostgresqlQueryBuilder.php',
|
||||
'Joomla\\Database\\Query\\PreparableInterface' => __DIR__ . '/..' . '/joomla/database/src/Query/PreparableInterface.php',
|
||||
'Joomla\\Database\\Query\\QueryElement' => __DIR__ . '/..' . '/joomla/database/src/Query/QueryElement.php',
|
||||
'Joomla\\Database\\Service\\DatabaseProvider' => __DIR__ . '/..' . '/joomla/database/src/Service/DatabaseProvider.php',
|
||||
|
|
188
libraries/vendor/composer/installed.json
vendored
188
libraries/vendor/composer/installed.json
vendored
|
@ -301,12 +301,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/application.git",
|
||||
"reference": "13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27"
|
||||
"reference": "9fc3da51bedebaece1d32cb5a1923633b1932953"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/application/zipball/13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27",
|
||||
"reference": "13e829e24dd1f510044fd2bfd2c5f3a40e0f5d27",
|
||||
"url": "https://api.github.com/repos/joomla-framework/application/zipball/9fc3da51bedebaece1d32cb5a1923633b1932953",
|
||||
"reference": "9fc3da51bedebaece1d32cb5a1923633b1932953",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -330,7 +330,7 @@
|
|||
"joomla/session": "To use AbstractWebApplication with session support, install joomla/session",
|
||||
"joomla/uri": "To use AbstractWebApplication, install joomla/uri"
|
||||
},
|
||||
"time": "2018-01-19T22:07:50+00:00",
|
||||
"time": "2018-03-15T01:47:40+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -471,12 +471,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/console.git",
|
||||
"reference": "13a8498930831b88c5ece0327a1c46e331a54fb8"
|
||||
"reference": "b625aebe2dcc572facded26e552130517919b8de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/console/zipball/13a8498930831b88c5ece0327a1c46e331a54fb8",
|
||||
"reference": "13a8498930831b88c5ece0327a1c46e331a54fb8",
|
||||
"url": "https://api.github.com/repos/joomla-framework/console/zipball/b625aebe2dcc572facded26e552130517919b8de",
|
||||
"reference": "b625aebe2dcc572facded26e552130517919b8de",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -494,7 +494,7 @@
|
|||
"suggest": {
|
||||
"psr/container": "To use the ContainerLoader"
|
||||
},
|
||||
"time": "2018-01-21T22:25:10+00:00",
|
||||
"time": "2018-03-18T01:08:13+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -526,12 +526,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/controller.git",
|
||||
"reference": "eef984467f698ba8187763c4e4ac64c19595c4c7"
|
||||
"reference": "fad0742b56ed085fee7699f01ae90d54ac9e83a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/controller/zipball/eef984467f698ba8187763c4e4ac64c19595c4c7",
|
||||
"reference": "eef984467f698ba8187763c4e4ac64c19595c4c7",
|
||||
"url": "https://api.github.com/repos/joomla-framework/controller/zipball/fad0742b56ed085fee7699f01ae90d54ac9e83a2",
|
||||
"reference": "fad0742b56ed085fee7699f01ae90d54ac9e83a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -539,15 +539,15 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"joomla/application": "~1.0|~2.0",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/input": "~1.0|~2.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"joomla/application": "The joomla/application package is required to use Joomla\\Controller\\AbstractController",
|
||||
"joomla/input": "The joomla/input package is required to use Joomla\\Controller\\AbstractController"
|
||||
},
|
||||
"time": "2018-01-30T01:56:37+00:00",
|
||||
"time": "2018-02-10T00:30:21+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -579,12 +579,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/crypt.git",
|
||||
"reference": "fdc81318aef68d887ef45ecc403ef266d442fcec"
|
||||
"reference": "68532f41fd62c96987e7b264f59b31355efb0f7e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/crypt/zipball/fdc81318aef68d887ef45ecc403ef266d442fcec",
|
||||
"reference": "fdc81318aef68d887ef45ecc403ef266d442fcec",
|
||||
"url": "https://api.github.com/repos/joomla-framework/crypt/zipball/68532f41fd62c96987e7b264f59b31355efb0f7e",
|
||||
"reference": "68532f41fd62c96987e7b264f59b31355efb0f7e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -592,9 +592,9 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"defuse/php-encryption": "~2.0",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"paragonie/sodium_compat": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"symfony/phpunit-bridge": "~3.3",
|
||||
"symfony/polyfill-util": "~1.0"
|
||||
},
|
||||
|
@ -602,7 +602,7 @@
|
|||
"defuse/php-encryption": "To use Crypto cipher",
|
||||
"paragonie/sodium_compat": "To use Sodium cipher"
|
||||
},
|
||||
"time": "2018-02-03T18:21:14+00:00",
|
||||
"time": "2018-03-13T01:30:39+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -634,12 +634,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/data.git",
|
||||
"reference": "68e8a777a504a46b473219770e2b43d400b45ccf"
|
||||
"reference": "b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/data/zipball/68e8a777a504a46b473219770e2b43d400b45ccf",
|
||||
"reference": "68e8a777a504a46b473219770e2b43d400b45ccf",
|
||||
"url": "https://api.github.com/repos/joomla-framework/data/zipball/b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa",
|
||||
"reference": "b5bec55e6d85b2d7df1fec6817d0ed9f509e49aa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -647,11 +647,11 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T01:59:28+00:00",
|
||||
"time": "2018-02-10T00:54:38+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -683,12 +683,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/database.git",
|
||||
"reference": "9a3f41f6579e00209b808027e53616cbdaeebf9c"
|
||||
"reference": "17e831cf4b0648551b8be82c9cadc83c1d2263d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/database/zipball/9a3f41f6579e00209b808027e53616cbdaeebf9c",
|
||||
"reference": "9a3f41f6579e00209b808027e53616cbdaeebf9c",
|
||||
"url": "https://api.github.com/repos/joomla-framework/database/zipball/17e831cf4b0648551b8be82c9cadc83c1d2263d7",
|
||||
"reference": "17e831cf4b0648551b8be82c9cadc83c1d2263d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -697,12 +697,12 @@
|
|||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/di": "~1.0|~2.0",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"joomla/test": "~1.2",
|
||||
"phpunit/dbunit": "~3.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mysqli": "To connect to a MySQL database via MySQLi",
|
||||
|
@ -712,7 +712,7 @@
|
|||
"joomla/di": "To use the Database ServiceProviderInterface objects, install joomla/di.",
|
||||
"joomla/registry": "To use the Database ServiceProviderInterface objects, install joomla/registry."
|
||||
},
|
||||
"time": "2018-01-30T01:59:43+00:00",
|
||||
"time": "2018-03-18T16:26:22+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -744,12 +744,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/di.git",
|
||||
"reference": "dfb066cb3a95754722377c77285df4383710c3c0"
|
||||
"reference": "f20cbb40dadac88004f96cd10a73617a9596b2e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/di/zipball/dfb066cb3a95754722377c77285df4383710c3c0",
|
||||
"reference": "dfb066cb3a95754722377c77285df4383710c3c0",
|
||||
"url": "https://api.github.com/repos/joomla-framework/di/zipball/f20cbb40dadac88004f96cd10a73617a9596b2e2",
|
||||
"reference": "f20cbb40dadac88004f96cd10a73617a9596b2e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -760,10 +760,10 @@
|
|||
"psr/container-implementation": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-27T23:43:54+00:00",
|
||||
"time": "2018-02-25T16:34:27+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -798,22 +798,22 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/event.git",
|
||||
"reference": "0fe395087d3158745aa49f4993ef1e00bec8daf0"
|
||||
"reference": "71d0e41338a9e6cf8682f171fb483c7efb591876"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/event/zipball/0fe395087d3158745aa49f4993ef1e00bec8daf0",
|
||||
"reference": "0fe395087d3158745aa49f4993ef1e00bec8daf0",
|
||||
"url": "https://api.github.com/repos/joomla-framework/event/zipball/71d0e41338a9e6cf8682f171fb483c7efb591876",
|
||||
"reference": "71d0e41338a9e6cf8682f171fb483c7efb591876",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-02-06T09:30:41+00:00",
|
||||
"time": "2018-02-10T16:18:57+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -948,12 +948,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/http.git",
|
||||
"reference": "bb348880069a81c7ca61adc781756b7aae4dabfe"
|
||||
"reference": "a9ac5f74c1825518d8cb6096f7513b512172da72"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/http/zipball/bb348880069a81c7ca61adc781756b7aae4dabfe",
|
||||
"reference": "bb348880069a81c7ca61adc781756b7aae4dabfe",
|
||||
"url": "https://api.github.com/repos/joomla-framework/http/zipball/a9ac5f74c1825518d8cb6096f7513b512172da72",
|
||||
"reference": "a9ac5f74c1825518d8cb6096f7513b512172da72",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -964,14 +964,14 @@
|
|||
"zendframework/zend-diactoros": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "To use cURL for HTTP connections"
|
||||
},
|
||||
"time": "2018-01-30T02:02:27+00:00",
|
||||
"time": "2018-03-13T01:52:54+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1003,12 +1003,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/image.git",
|
||||
"reference": "6041ea0c688f816e9861fbfc3a5256f3a201f86f"
|
||||
"reference": "20cf764c62927364ce40478e55b7d6c09581f079"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/image/zipball/6041ea0c688f816e9861fbfc3a5256f3a201f86f",
|
||||
"reference": "6041ea0c688f816e9861fbfc3a5256f3a201f86f",
|
||||
"url": "https://api.github.com/repos/joomla-framework/image/zipball/20cf764c62927364ce40478e55b7d6c09581f079",
|
||||
"reference": "20cf764c62927364ce40478e55b7d6c09581f079",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1017,11 +1017,11 @@
|
|||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T02:02:36+00:00",
|
||||
"time": "2018-02-18T19:04:48+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1103,12 +1103,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/ldap.git",
|
||||
"reference": "ac65aaca9657cfa664d4f7519eec3796514532ed"
|
||||
"reference": "19f504133108dc84b31872014f5a961e683b35b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/ldap/zipball/ac65aaca9657cfa664d4f7519eec3796514532ed",
|
||||
"reference": "ac65aaca9657cfa664d4f7519eec3796514532ed",
|
||||
"url": "https://api.github.com/repos/joomla-framework/ldap/zipball/19f504133108dc84b31872014f5a961e683b35b4",
|
||||
"reference": "19f504133108dc84b31872014f5a961e683b35b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1116,11 +1116,11 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T02:04:26+00:00",
|
||||
"time": "2018-02-18T19:25:51+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1152,12 +1152,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/oauth1.git",
|
||||
"reference": "3b4f8fbc80c8c7c39c8848c760fbf7c97901662f"
|
||||
"reference": "bd0c1c9b4b85d6de84c495e17ac6449ae3573e03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/oauth1/zipball/3b4f8fbc80c8c7c39c8848c760fbf7c97901662f",
|
||||
"reference": "3b4f8fbc80c8c7c39c8848c760fbf7c97901662f",
|
||||
"url": "https://api.github.com/repos/joomla-framework/oauth1/zipball/bd0c1c9b4b85d6de84c495e17ac6449ae3573e03",
|
||||
"reference": "bd0c1c9b4b85d6de84c495e17ac6449ae3573e03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1165,16 +1165,16 @@
|
|||
"joomla/http": "^1.2.2|~2.0",
|
||||
"joomla/input": "~1.2|~2.0",
|
||||
"joomla/registry": "^1.4.5|~2.0",
|
||||
"joomla/session": "~1.0|~2.0",
|
||||
"joomla/session": "~2.0",
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/event": "~1.0",
|
||||
"joomla/event": "~2.0",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T02:09:32+00:00",
|
||||
"time": "2018-03-15T00:28:53+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1257,12 +1257,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/registry.git",
|
||||
"reference": "819539a928ea8115901e34593deaf1d8968d58e6"
|
||||
"reference": "6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/819539a928ea8115901e34593deaf1d8968d58e6",
|
||||
"reference": "819539a928ea8115901e34593deaf1d8968d58e6",
|
||||
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5",
|
||||
"reference": "6bf7d79111c98fb6a0fd1a35c3e7316caefe97b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1270,14 +1270,14 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"symfony/yaml": "~2.7|~3.0|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "Install symfony/yaml if you require YAML support."
|
||||
},
|
||||
"time": "2018-01-30T02:10:15+00:00",
|
||||
"time": "2018-03-15T00:35:24+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1309,12 +1309,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/session.git",
|
||||
"reference": "fae9b43f5d6b2dee4efcc634545196ae418f8b53"
|
||||
"reference": "a222020ccd6399cf3838f32cc8f916d7ed51193b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/session/zipball/fae9b43f5d6b2dee4efcc634545196ae418f8b53",
|
||||
"reference": "fae9b43f5d6b2dee4efcc634545196ae418f8b53",
|
||||
"url": "https://api.github.com/repos/joomla-framework/session/zipball/a222020ccd6399cf3838f32cc8f916d7ed51193b",
|
||||
"reference": "a222020ccd6399cf3838f32cc8f916d7ed51193b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1338,7 +1338,7 @@
|
|||
"joomla/event": "The joomla/event package is required to use Joomla\\Session\\Session.",
|
||||
"joomla/input": "The joomla/input package is required to use Address and Forwarded session validators."
|
||||
},
|
||||
"time": "2018-03-13T00:03:35+00:00",
|
||||
"time": "2018-03-13T00:22:33+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1370,12 +1370,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/string.git",
|
||||
"reference": "2208db80464df670b4b9aeb7e0c2de5211783869"
|
||||
"reference": "03610c2577bf2f71013c2a8ad587842d6f66507f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/string/zipball/2208db80464df670b4b9aeb7e0c2de5211783869",
|
||||
"reference": "2208db80464df670b4b9aeb7e0c2de5211783869",
|
||||
"url": "https://api.github.com/repos/joomla-framework/string/zipball/03610c2577bf2f71013c2a8ad587842d6f66507f",
|
||||
"reference": "03610c2577bf2f71013c2a8ad587842d6f66507f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1383,15 +1383,15 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"doctrine/inflector": "~1.2",
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/inflector": "To use the string inflector",
|
||||
"ext-mbstring": "For improved processing"
|
||||
},
|
||||
"time": "2018-01-28T01:11:48+00:00",
|
||||
"time": "2018-02-25T21:52:07+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1440,23 +1440,23 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/uri.git",
|
||||
"reference": "d11c66b44882caef4543e365499839542fcc1913"
|
||||
"reference": "9459faee3cfbe4062d95fb9eb3d2c3d661d853f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/uri/zipball/d11c66b44882caef4543e365499839542fcc1913",
|
||||
"reference": "d11c66b44882caef4543e365499839542fcc1913",
|
||||
"url": "https://api.github.com/repos/joomla-framework/uri/zipball/9459faee3cfbe4062d95fb9eb3d2c3d661d853f5",
|
||||
"reference": "9459faee3cfbe4062d95fb9eb3d2c3d661d853f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"joomla/test": "~1.0",
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T02:11:25+00:00",
|
||||
"time": "2018-02-25T22:52:21+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1488,12 +1488,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-framework/utilities.git",
|
||||
"reference": "059dd377f51de547f0d92082448404fda46f0e81"
|
||||
"reference": "da30b6c890811ddab6eeca29d6148caa866242f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-framework/utilities/zipball/059dd377f51de547f0d92082448404fda46f0e81",
|
||||
"reference": "059dd377f51de547f0d92082448404fda46f0e81",
|
||||
"url": "https://api.github.com/repos/joomla-framework/utilities/zipball/da30b6c890811ddab6eeca29d6148caa866242f6",
|
||||
"reference": "da30b6c890811ddab6eeca29d6148caa866242f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1501,10 +1501,10 @@
|
|||
"php": "~7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"squizlabs/php_codesniffer": "1.*"
|
||||
"joomla/coding-standards": "~2.0@alpha",
|
||||
"phpunit/phpunit": "~6.3"
|
||||
},
|
||||
"time": "2018-01-30T02:11:34+00:00",
|
||||
"time": "2018-03-15T00:43:07+00:00",
|
||||
"type": "joomla-package",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
|
|
@ -290,6 +290,7 @@ abstract class AbstractWebApplication extends AbstractApplication
|
|||
|
||||
// Set the encoding headers.
|
||||
$this->setHeader('Content-Encoding', $encoding);
|
||||
$this->setHeader('Vary', 'Accept-Encoding');
|
||||
$this->setHeader('X-Content-Encoded-By', 'Joomla');
|
||||
|
||||
// Replace the output with the encoded data.
|
||||
|
@ -416,7 +417,7 @@ abstract class AbstractWebApplication extends AbstractApplication
|
|||
echo "<script>document.location.href='$url';</script>\n";
|
||||
}
|
||||
// We have to use a JavaScript redirect here because MSIE doesn't play nice with UTF-8 URLs.
|
||||
elseif (($this->client->engine == Web\WebClient::TRIDENT) && !$this->isAscii($url))
|
||||
elseif (($this->client->engine == Web\WebClient::TRIDENT) && !static::isAscii($url))
|
||||
{
|
||||
$html = '<html><head>';
|
||||
$html .= '<meta http-equiv="content-type" content="text/html; charset=' . $this->charSet . '" />';
|
||||
|
@ -997,11 +998,9 @@ abstract class AbstractWebApplication extends AbstractApplication
|
|||
/**
|
||||
* Checks for a form token in the request.
|
||||
*
|
||||
* Use in conjunction with getFormToken.
|
||||
*
|
||||
* @param string $method The request method in which to look for the token key.
|
||||
*
|
||||
* @return boolean True if found and valid, false otherwise.
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
|
@ -1009,18 +1008,19 @@ abstract class AbstractWebApplication extends AbstractApplication
|
|||
{
|
||||
$token = $this->getFormToken();
|
||||
|
||||
if (!$this->input->$method->get($token, '', 'alnum'))
|
||||
{
|
||||
if ($this->getSession()->isNew())
|
||||
{
|
||||
// Redirect to login screen.
|
||||
$this->redirect('index.php');
|
||||
}
|
||||
// Support a token sent via the X-CSRF-Token header, then fall back to a token in the request
|
||||
$requestToken = $this->input->server->get(
|
||||
'HTTP_X_CSRF_TOKEN',
|
||||
$this->input->$method->get($token, '', 'alnum'),
|
||||
'alnum'
|
||||
);
|
||||
|
||||
if (!$requestToken)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $this->getSession()->hasToken($token);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1032,7 +1032,10 @@ abstract class AbstractWebApplication extends AbstractApplication
|
|||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
abstract public function getFormToken($forceNew = false);
|
||||
public function getFormToken($forceNew = false)
|
||||
{
|
||||
return $this->getSession()->getToken($forceNew);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests whether a string contains only 7bit ASCII bytes.
|
||||
|
|
|
@ -72,7 +72,7 @@ class ConsoleErrorEvent extends ConsoleEvent
|
|||
*/
|
||||
public function getExitCode(): int
|
||||
{
|
||||
return $this->exitCode ?: ($this->error->getCode() ?: 1);
|
||||
return $this->exitCode ?: (is_int($this->error->getCode()) && $this->error->getCode() !== 0 ? $this->error->getCode() : 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Crypt Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
namespace Joomla\Crypt\Cipher;
|
||||
|
||||
use Joomla\Crypt\CipherInterface;
|
||||
use Joomla\Crypt\Exception\InvalidKeyTypeException;
|
||||
use Joomla\Crypt\Key;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Crypt Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -16,7 +16,7 @@ use ParagonIE\Sodium\Compat;
|
|||
/**
|
||||
* Cipher for sodium algorithm encryption, decryption and key generation.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
*/
|
||||
class Sodium implements CipherInterface
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ class Sodium implements CipherInterface
|
|||
* The message nonce to be used with encryption/decryption
|
||||
*
|
||||
* @var string
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
*/
|
||||
private $nonce;
|
||||
|
||||
|
@ -36,7 +36,7 @@ class Sodium implements CipherInterface
|
|||
*
|
||||
* @return string The decrypted data string.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function decrypt($data, Key $key)
|
||||
|
@ -74,7 +74,7 @@ class Sodium implements CipherInterface
|
|||
*
|
||||
* @return string The encrypted data string.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function encrypt($data, Key $key)
|
||||
|
@ -104,7 +104,7 @@ class Sodium implements CipherInterface
|
|||
*
|
||||
* @return Key
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function generateKey(array $options = array())
|
||||
|
@ -134,7 +134,7 @@ class Sodium implements CipherInterface
|
|||
*
|
||||
* @return void
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
*/
|
||||
public function setNonce($nonce)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Crypt Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
2
libraries/vendor/joomla/crypt/src/Crypt.php
vendored
2
libraries/vendor/joomla/crypt/src/Crypt.php
vendored
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Crypt Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Crypt Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -11,7 +11,7 @@ namespace Joomla\Crypt\Exception;
|
|||
/**
|
||||
* Exception representing an invalid Joomla\Crypt\Key type for a cipher
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
*/
|
||||
class InvalidKeyTypeException extends \InvalidArgumentException
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class InvalidKeyTypeException extends \InvalidArgumentException
|
|||
* @param string $expectedKeyType The expected key type.
|
||||
* @param string $actualKeyType The actual key type.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.4.0
|
||||
*/
|
||||
public function __construct($expectedKeyType, $actualKeyType)
|
||||
{
|
||||
|
|
12
libraries/vendor/joomla/data/src/DataSet.php
vendored
12
libraries/vendor/joomla/data/src/DataSet.php
vendored
|
@ -215,9 +215,9 @@ class DataSet implements DumpableInterface, \ArrayAccess, \Countable, \Iterator
|
|||
|
||||
foreach ($this->objects as $object)
|
||||
{
|
||||
$object_vars = json_decode(json_encode($object), true);
|
||||
$objectVars = json_decode(json_encode($object), true);
|
||||
|
||||
$keys = (is_null($keys)) ? $object_vars : $function($keys, $object_vars);
|
||||
$keys = (is_null($keys)) ? $objectVars : $function($keys, $objectVars);
|
||||
}
|
||||
|
||||
return array_keys($keys);
|
||||
|
@ -249,7 +249,7 @@ class DataSet implements DumpableInterface, \ArrayAccess, \Countable, \Iterator
|
|||
|
||||
foreach ($this->objects as $key => $object)
|
||||
{
|
||||
$array_item = [];
|
||||
$arrayItem = [];
|
||||
|
||||
$key = ($associative) ? $key : $i++;
|
||||
|
||||
|
@ -257,11 +257,11 @@ class DataSet implements DumpableInterface, \ArrayAccess, \Countable, \Iterator
|
|||
|
||||
foreach ($keys as $property)
|
||||
{
|
||||
$property_key = ($associative) ? $property : $j++;
|
||||
$array_item[$property_key] = (isset($object->$property)) ? $object->$property : null;
|
||||
$propertyKey = ($associative) ? $property : $j++;
|
||||
$arrayItem[$propertyKey] = (isset($object->$property)) ? $object->$property : null;
|
||||
}
|
||||
|
||||
$return[$key] = $array_item;
|
||||
$return[$key] = $arrayItem;
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
|
|
@ -165,6 +165,7 @@ abstract class DatabaseDriver implements DatabaseInterface, DispatcherAwareInter
|
|||
*
|
||||
* @var DatabaseDriver[]
|
||||
* @since 1.0
|
||||
* @deprecated 3.0 Singleton storage will no longer be supported.
|
||||
*/
|
||||
protected static $instances = [];
|
||||
|
||||
|
@ -266,9 +267,19 @@ abstract class DatabaseDriver implements DatabaseInterface, DispatcherAwareInter
|
|||
*
|
||||
* @since 1.0
|
||||
* @throws \RuntimeException
|
||||
* @deprecated 3.0 Use DatabaseFactory::getDriver() instead
|
||||
*/
|
||||
public static function getInstance(array $options = [])
|
||||
{
|
||||
@trigger_error(
|
||||
sprintf(
|
||||
'%1$s() is deprecated and will be removed in 3.0, use %2$s::getDriver() instead.',
|
||||
__METHOD__,
|
||||
DatabaseFactory::class
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
// Sanitize the database connector options.
|
||||
$options['driver'] = isset($options['driver']) ? preg_replace('/[^A-Z0-9_\.-]/i', '', $options['driver']) : 'mysqli';
|
||||
$options['database'] = isset($options['database']) ? $options['database'] : null;
|
||||
|
@ -876,9 +887,9 @@ abstract class DatabaseDriver implements DatabaseInterface, DispatcherAwareInter
|
|||
/**
|
||||
* Inserts a row into a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
|
@ -1572,10 +1583,10 @@ abstract class DatabaseDriver implements DatabaseInterface, DispatcherAwareInter
|
|||
/**
|
||||
* Updates a row in a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
|
|
|
@ -262,9 +262,9 @@ interface DatabaseInterface
|
|||
/**
|
||||
* Inserts a row into a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
|
@ -515,10 +515,10 @@ interface DatabaseInterface
|
|||
/**
|
||||
* Updates a row in a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
|
|
|
@ -66,16 +66,16 @@ class MysqlExporter extends DatabaseExporter
|
|||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$buffer[] = ' <field Field="' . $field->Field . '"' . ' Type="' . $field->Type . '"' . ' Null="' . $field->Null . '"' . ' Key="' .
|
||||
$buffer[] = ' <field Field="' . $field->Field . '" Type="' . $field->Type . '" Null="' . $field->Null . '" Key="' .
|
||||
$field->Key . '"' . (isset($field->Default) ? ' Default="' . $field->Default . '"' : '') . ' Extra="' . $field->Extra . '"' .
|
||||
' />';
|
||||
}
|
||||
|
||||
foreach ($keys as $key)
|
||||
{
|
||||
$buffer[] = ' <key Table="' . $table . '"' . ' Non_unique="' . $key->Non_unique . '"' . ' Key_name="' . $key->Key_name . '"' .
|
||||
' Seq_in_index="' . $key->Seq_in_index . '"' . ' Column_name="' . $key->Column_name . '"' . ' Collation="' . $key->Collation . '"' .
|
||||
' Null="' . $key->Null . '"' . ' Index_type="' . $key->Index_type . '"' .
|
||||
$buffer[] = ' <key Table="' . $table . '" Non_unique="' . $key->Non_unique . '" Key_name="' . $key->Key_name . '"' .
|
||||
' Seq_in_index="' . $key->Seq_in_index . '" Column_name="' . $key->Column_name . '" Collation="' . $key->Collation . '"' .
|
||||
' Null="' . $key->Null . '" Index_type="' . $key->Index_type . '"' .
|
||||
' Comment="' . htmlspecialchars($key->Comment, ENT_COMPAT, 'UTF-8') . '"' .
|
||||
' />';
|
||||
}
|
||||
|
|
|
@ -8,222 +8,56 @@
|
|||
|
||||
namespace Joomla\Database\Mysql;
|
||||
|
||||
use Joomla\Database\DatabaseQuery;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
use Joomla\Database\Pdo\PdoQuery;
|
||||
use Joomla\Database\Query\MysqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* MySQL Query Building Class.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class MysqlQuery extends DatabaseQuery implements LimitableInterface, PreparableInterface
|
||||
class MysqlQuery extends PdoQuery
|
||||
{
|
||||
/**
|
||||
* The offset for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $offset;
|
||||
use MysqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* The limit for the result set.
|
||||
* Magic function to convert the query to a string.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
* @return string The completed query.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $limit;
|
||||
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
*
|
||||
* @var mixed
|
||||
* @since 1.5.0
|
||||
*/
|
||||
protected $bounded = array();
|
||||
|
||||
/**
|
||||
* Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
|
||||
* removes a variable that has been bounded from the internal bounded array when the passed in value is null.
|
||||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
* @param array $driverOptions Optional driver options to be used.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function bind($key = null, &$value = null, $dataType = \PDO::PARAM_STR, $length = 0, $driverOptions = array())
|
||||
public function __toString()
|
||||
{
|
||||
// Case 1: Empty Key (reset $bounded array)
|
||||
if (empty($key))
|
||||
switch ($this->type)
|
||||
{
|
||||
$this->bounded = [];
|
||||
case 'select':
|
||||
if ($this->selectRowNumber)
|
||||
{
|
||||
$orderBy = $this->selectRowNumber['orderBy'];
|
||||
$tmpOffset = $this->offset;
|
||||
$tmpLimit = $this->limit;
|
||||
$this->offset = 0;
|
||||
$this->limit = 0;
|
||||
$tmpOrder = $this->order;
|
||||
$this->order = null;
|
||||
$query = parent::__toString();
|
||||
$this->order = $tmpOrder;
|
||||
$this->offset = $tmpOffset;
|
||||
$this->limit = $tmpLimit;
|
||||
|
||||
return $this;
|
||||
// Add support for second order by, offset and limit
|
||||
$query = PHP_EOL . 'SELECT * FROM (' . $query . PHP_EOL . "ORDER BY $orderBy" . PHP_EOL . ') w';
|
||||
|
||||
if ($this->order)
|
||||
{
|
||||
$query .= (string) $this->order;
|
||||
}
|
||||
|
||||
return $this->processLimit($query, $this->limit, $this->offset);
|
||||
}
|
||||
}
|
||||
|
||||
// Case 2: Key Provided, null value (unset key from $bounded array)
|
||||
if (is_null($value))
|
||||
{
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
unset($this->bounded[$key]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$obj = new \stdClass;
|
||||
|
||||
$obj->value = &$value;
|
||||
$obj->dataType = $dataType;
|
||||
$obj->length = $length;
|
||||
$obj->driverOptions = $driverOptions;
|
||||
|
||||
// Case 3: Simply add the Key/Value into the bounded array
|
||||
$this->bounded[$key] = $obj;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is
|
||||
* returned.
|
||||
*
|
||||
* @param mixed $key The bounded variable key to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function &getBounded($key = null)
|
||||
{
|
||||
if (empty($key))
|
||||
{
|
||||
return $this->bounded;
|
||||
}
|
||||
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
return $this->bounded[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear data from the query or a specific clause of the query.
|
||||
*
|
||||
* @param string $clause Optionally, the name of the clause to clear, or nothing to clear the whole query.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function clear($clause = null)
|
||||
{
|
||||
switch ($clause)
|
||||
{
|
||||
case null:
|
||||
$this->bounded = array();
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::clear($clause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
*
|
||||
* @param string $query The query in string format
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit > 0 && $offset > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||
}
|
||||
elseif ($limit > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
* @param array $values An array of values to concatenate.
|
||||
* @param string $separator As separator to place between each value.
|
||||
*
|
||||
* @return string The concatenated values.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function concatenate($values, $separator = null)
|
||||
{
|
||||
if ($separator)
|
||||
{
|
||||
$concat_string = 'CONCAT_WS(' . $this->quote($separator);
|
||||
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$concat_string .= ', ' . $value;
|
||||
}
|
||||
|
||||
return $concat_string . ')';
|
||||
}
|
||||
|
||||
return 'CONCAT(' . implode(',', $values) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the function to return a random floating-point value
|
||||
*
|
||||
* Usage:
|
||||
* $query->rand();
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function rand()
|
||||
{
|
||||
return ' RANDOM() ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
* Usage:
|
||||
* $query->setLimit(100, 0); (retrieve 100 rows, starting at first record)
|
||||
* $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
|
||||
*
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function setLimit($limit = 0, $offset = 0)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
$this->offset = (int) $offset;
|
||||
|
||||
return $this;
|
||||
return parent::__toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ class MysqliDriver extends DatabaseDriver implements UTF8MB4SupportInterface
|
|||
'/^(?P<host>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:(?P<port>.+))?$/',
|
||||
$this->options['host'],
|
||||
$matches
|
||||
))
|
||||
))
|
||||
{
|
||||
// It's an IPv4 address with or without port
|
||||
$this->options['host'] = $matches['host'];
|
||||
|
|
|
@ -66,16 +66,16 @@ class MysqliExporter extends DatabaseExporter
|
|||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$buffer[] = ' <field Field="' . $field->Field . '"' . ' Type="' . $field->Type . '"' . ' Null="' . $field->Null . '"' . ' Key="' .
|
||||
$buffer[] = ' <field Field="' . $field->Field . '" Type="' . $field->Type . '" Null="' . $field->Null . '" Key="' .
|
||||
$field->Key . '"' . (isset($field->Default) ? ' Default="' . $field->Default . '"' : '') . ' Extra="' . $field->Extra . '"' .
|
||||
' />';
|
||||
}
|
||||
|
||||
foreach ($keys as $key)
|
||||
{
|
||||
$buffer[] = ' <key Table="' . $table . '"' . ' Non_unique="' . $key->Non_unique . '"' . ' Key_name="' . $key->Key_name . '"' .
|
||||
' Seq_in_index="' . $key->Seq_in_index . '"' . ' Column_name="' . $key->Column_name . '"' . ' Collation="' . $key->Collation . '"' .
|
||||
' Null="' . $key->Null . '"' . ' Index_type="' . $key->Index_type . '"' .
|
||||
$buffer[] = ' <key Table="' . $table . '" Non_unique="' . $key->Non_unique . '" Key_name="' . $key->Key_name . '"' .
|
||||
' Seq_in_index="' . $key->Seq_in_index . '" Column_name="' . $key->Column_name . '" Collation="' . $key->Collation . '"' .
|
||||
' Null="' . $key->Null . '" Index_type="' . $key->Index_type . '"' .
|
||||
' Comment="' . htmlspecialchars($key->Comment, ENT_COMPAT, 'UTF-8') . '"' .
|
||||
' />';
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace Joomla\Database\Mysqli;
|
|||
|
||||
use Joomla\Database\DatabaseQuery;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
use Joomla\Database\Query\MysqlQueryBuilder;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
|
||||
/**
|
||||
|
@ -19,6 +20,8 @@ use Joomla\Database\Query\PreparableInterface;
|
|||
*/
|
||||
class MysqliQuery extends DatabaseQuery implements LimitableInterface, PreparableInterface
|
||||
{
|
||||
use MysqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* The offset for the result set.
|
||||
*
|
||||
|
@ -90,7 +93,7 @@ class MysqliQuery extends DatabaseQuery implements LimitableInterface, Preparabl
|
|||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* @param mixed $value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param string $dataType The corresponding bind type.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters. (Unused)
|
||||
|
@ -175,59 +178,6 @@ class MysqliQuery extends DatabaseQuery implements LimitableInterface, Preparabl
|
|||
return parent::clear($clause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
*
|
||||
* @param string $query The query in string format
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit > 0 && $offset > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||
}
|
||||
elseif ($limit > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
* @param array $values An array of values to concatenate.
|
||||
* @param string $separator As separator to place between each value.
|
||||
*
|
||||
* @return string The concatenated values.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function concatenate($values, $separator = null)
|
||||
{
|
||||
if ($separator)
|
||||
{
|
||||
$concat_string = 'CONCAT_WS(' . $this->quote($separator);
|
||||
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$concat_string .= ', ' . $value;
|
||||
}
|
||||
|
||||
return $concat_string . ')';
|
||||
}
|
||||
|
||||
return 'CONCAT(' . implode(',', $values) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
|
@ -249,79 +199,4 @@ class MysqliQuery extends DatabaseQuery implements LimitableInterface, Preparabl
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the regular expression operator
|
||||
*
|
||||
* Usage:
|
||||
* $query->where('field ' . $query->regexp($search));
|
||||
*
|
||||
* @param string $value The regex pattern.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function regexp($value)
|
||||
{
|
||||
return ' REGEXP ' . $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the function to return a random floating-point value
|
||||
*
|
||||
* Usage:
|
||||
* $query->rand();
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function rand()
|
||||
{
|
||||
return ' RAND() ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a value in a varchar used like a set.
|
||||
*
|
||||
* Ensure that the value is an integer before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->findInSet((int) $parent->id, 'a.assigned_cat_ids')
|
||||
*
|
||||
* @param string $value The value to search for.
|
||||
* @param string $set The set of values.
|
||||
*
|
||||
* @return string A representation of the MySQL find_in_set() function for the driver.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function findInSet($value, $set)
|
||||
{
|
||||
return ' find_in_set(' . $value . ', ' . $set . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of the current row.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select('id');
|
||||
* $query->selectRowNumber('ordering,publish_up DESC', 'new_ordering');
|
||||
* $query->from('#__content');
|
||||
*
|
||||
* @param string $orderBy An expression of ordering for window function.
|
||||
* @param string $orderColumnAlias An alias for new ordering column.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function selectRowNumber($orderBy, $orderColumnAlias)
|
||||
{
|
||||
$this->validateRowNumber($orderBy, $orderColumnAlias);
|
||||
|
||||
return $this->select("(SELECT @rownum := @rownum + 1 FROM (SELECT @rownum := 0) AS r) AS $orderColumnAlias");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class OracleDriver extends PdoDriver
|
|||
public function __construct(array $options)
|
||||
{
|
||||
$options['driver'] = 'oci';
|
||||
$options['charset'] = isset($options['charset']) ? $options['charset'] : 'AL32UTF8';
|
||||
$options['charset'] = isset($options['charset']) ? $options['charset'] : 'AL32UTF8';
|
||||
$options['dateformat'] = isset($options['dateformat']) ? $options['dateformat'] : 'RRRR-MM-DD HH24:MI:SS';
|
||||
|
||||
$this->charset = $options['charset'];
|
||||
|
@ -143,7 +143,7 @@ class OracleDriver extends PdoDriver
|
|||
{
|
||||
$this->connect();
|
||||
|
||||
/** @type OracleQuery $query */
|
||||
/** @var OracleQuery $query */
|
||||
$query = $this->getQuery(true);
|
||||
$query->setQuery('DROP TABLE :tableName');
|
||||
$query->bind(':tableName', $tableName);
|
||||
|
@ -226,12 +226,13 @@ class OracleDriver extends PdoDriver
|
|||
|
||||
$result = [];
|
||||
|
||||
/** @type OracleQuery $query */
|
||||
/** @var OracleQuery $query */
|
||||
$query = $this->getQuery(true)
|
||||
->select('dbms_metadata.get_ddl(:type, :tableName)')
|
||||
->from('dual');
|
||||
|
||||
$query->bind(':type', 'TABLE');
|
||||
$type = 'TABLE';
|
||||
$query->bind(':type', $type);
|
||||
|
||||
// Sanitize input to an array and iterate over the list.
|
||||
$tables = (array) $tables;
|
||||
|
@ -263,7 +264,7 @@ class OracleDriver extends PdoDriver
|
|||
|
||||
$columns = [];
|
||||
|
||||
/** @type OracleQuery $query */
|
||||
/** @var OracleQuery $query */
|
||||
$query = $this->getQuery(true);
|
||||
|
||||
$fieldCasing = $this->getOption(\PDO::ATTR_CASE);
|
||||
|
@ -315,7 +316,7 @@ class OracleDriver extends PdoDriver
|
|||
{
|
||||
$this->connect();
|
||||
|
||||
/** @type OracleQuery $query */
|
||||
/** @var OracleQuery $query */
|
||||
$query = $this->getQuery(true);
|
||||
|
||||
$fieldCasing = $this->getOption(\PDO::ATTR_CASE);
|
||||
|
@ -351,7 +352,7 @@ class OracleDriver extends PdoDriver
|
|||
{
|
||||
$this->connect();
|
||||
|
||||
/** @type OracleQuery $query */
|
||||
/** @var OracleQuery $query */
|
||||
$query = $this->getQuery(true);
|
||||
|
||||
$query->select('table_name');
|
||||
|
|
|
@ -9,133 +9,14 @@
|
|||
namespace Joomla\Database\Oracle;
|
||||
|
||||
use Joomla\Database\Pdo\PdoQuery;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
|
||||
/**
|
||||
* Oracle Query Building Class.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class OracleQuery extends PdoQuery implements PreparableInterface, LimitableInterface
|
||||
class OracleQuery extends PdoQuery
|
||||
{
|
||||
/**
|
||||
* The limit for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $limit;
|
||||
|
||||
/**
|
||||
* The offset for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $offset;
|
||||
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $bounded = [];
|
||||
|
||||
/**
|
||||
* Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
|
||||
* removes a variable that has been bounded from the internal bounded array when the passed in value is null.
|
||||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
* @param array $driverOptions Optional driver options to be used.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function bind($key = null, &$value = null, $dataType = \PDO::PARAM_STR, $length = 0, $driverOptions = [])
|
||||
{
|
||||
// Case 1: Empty Key (reset $bounded array)
|
||||
if (empty($key))
|
||||
{
|
||||
$this->bounded = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// Case 2: Key Provided, null value (unset key from $bounded array)
|
||||
if (is_null($value))
|
||||
{
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
unset($this->bounded[$key]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$obj = new \stdClass;
|
||||
|
||||
$obj->value = &$value;
|
||||
$obj->dataType = $dataType;
|
||||
$obj->length = $length;
|
||||
$obj->driverOptions = $driverOptions;
|
||||
|
||||
// Case 3: Simply add the Key/Value into the bounded array
|
||||
$this->bounded[$key] = $obj;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned.
|
||||
*
|
||||
* @param mixed $key The bounded variable key to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function &getBounded($key = null)
|
||||
{
|
||||
if (empty($key))
|
||||
{
|
||||
return $this->bounded;
|
||||
}
|
||||
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
return $this->bounded[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear data from the query or a specific clause of the query.
|
||||
*
|
||||
* @param string $clause Optionally, the name of the clause to clear, or nothing to clear the whole query.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function clear($clause = null)
|
||||
{
|
||||
switch ($clause)
|
||||
{
|
||||
case null:
|
||||
$this->bounded = [];
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::clear($clause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
|
@ -146,8 +27,6 @@ class OracleQuery extends PdoQuery implements PreparableInterface, LimitableInte
|
|||
*
|
||||
* @return string
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
|
@ -180,26 +59,4 @@ class OracleQuery extends PdoQuery implements PreparableInterface, LimitableInte
|
|||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
* Usage:
|
||||
* $query->setLimit(100, 0); (retrieve 100 rows, starting at first record)
|
||||
* $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
|
||||
*
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function setLimit($limit = 0, $offset = 0)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
$this->offset = (int) $offset;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -944,7 +944,7 @@ abstract class PdoDriver extends DatabaseDriver
|
|||
/**
|
||||
* Wake up after serialization
|
||||
*
|
||||
* @return array
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
|
|
|
@ -9,12 +9,152 @@
|
|||
namespace Joomla\Database\Pdo;
|
||||
|
||||
use Joomla\Database\DatabaseQuery;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
|
||||
/**
|
||||
* PDO Query Building Class.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class PdoQuery extends DatabaseQuery
|
||||
abstract class PdoQuery extends DatabaseQuery implements LimitableInterface, PreparableInterface
|
||||
{
|
||||
/**
|
||||
* The offset for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $offset;
|
||||
|
||||
/**
|
||||
* The limit for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $limit;
|
||||
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
*
|
||||
* @var mixed
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $bounded = [];
|
||||
|
||||
/**
|
||||
* Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
|
||||
* removes a variable that has been bounded from the internal bounded array when the passed in value is null.
|
||||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed $value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
* @param array $driverOptions Optional driver options to be used.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function bind($key = null, &$value = null, $dataType = \PDO::PARAM_STR, $length = 0, $driverOptions = [])
|
||||
{
|
||||
// Case 1: Empty Key (reset $bounded array)
|
||||
if (empty($key))
|
||||
{
|
||||
$this->bounded = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// Case 2: Key Provided, null value (unset key from $bounded array)
|
||||
if (is_null($value))
|
||||
{
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
unset($this->bounded[$key]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$obj = new \stdClass;
|
||||
|
||||
$obj->value = &$value;
|
||||
$obj->dataType = $dataType;
|
||||
$obj->length = $length;
|
||||
$obj->driverOptions = $driverOptions;
|
||||
|
||||
// Case 3: Simply add the Key/Value into the bounded array
|
||||
$this->bounded[$key] = $obj;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear data from the query or a specific clause of the query.
|
||||
*
|
||||
* @param string $clause Optionally, the name of the clause to clear, or nothing to clear the whole query.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function clear($clause = null)
|
||||
{
|
||||
switch ($clause)
|
||||
{
|
||||
case null:
|
||||
$this->bounded = array();
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::clear($clause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned.
|
||||
*
|
||||
* @param mixed $key The bounded variable key to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function &getBounded($key = null)
|
||||
{
|
||||
if (empty($key))
|
||||
{
|
||||
return $this->bounded;
|
||||
}
|
||||
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
return $this->bounded[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
* Usage:
|
||||
* $query->setLimit(100, 0); (retrieve 100 rows, starting at first record)
|
||||
* $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
|
||||
*
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function setLimit($limit = 0, $offset = 0)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
$this->offset = (int) $offset;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -348,7 +348,9 @@ class PgsqlDriver extends PdoDriver
|
|||
'info.minimum_value', 'info.maximum_value', 'info.increment', 'info.cycle_option', 'info.start_value'
|
||||
];
|
||||
|
||||
$as = ['sequence', 'schema', 'table', 'column', 'data_type', 'minimum_value', 'maximum_value', 'increment', 'cycle_option', 'start_value'];
|
||||
$as = [
|
||||
'sequence', 'schema', 'table', 'column', 'data_type', 'minimum_value', 'maximum_value', 'increment', 'cycle_option', 'start_value'
|
||||
];
|
||||
|
||||
// Get the details columns information.
|
||||
$query = $this->getQuery(true)
|
||||
|
@ -613,9 +615,9 @@ class PgsqlDriver extends PdoDriver
|
|||
/**
|
||||
* Inserts a row into a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
|
@ -662,35 +664,20 @@ class PgsqlDriver extends PdoDriver
|
|||
->columns($fields)
|
||||
->values(implode(',', $values));
|
||||
|
||||
$retVal = false;
|
||||
|
||||
if ($key)
|
||||
{
|
||||
$query->returning($key);
|
||||
|
||||
// Set the query and execute the insert.
|
||||
$this->setQuery($query);
|
||||
|
||||
$id = $this->loadResult();
|
||||
|
||||
if ($id)
|
||||
{
|
||||
$object->$key = $id;
|
||||
$retVal = true;
|
||||
}
|
||||
$object->$key = $this->setQuery($query)->loadResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the query and execute the insert.
|
||||
$this->setQuery($query);
|
||||
|
||||
if ($this->execute())
|
||||
{
|
||||
$retVal = true;
|
||||
}
|
||||
$this->setQuery($query)->execute();
|
||||
}
|
||||
|
||||
return $retVal;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -887,12 +874,12 @@ class PgsqlDriver extends PdoDriver
|
|||
/**
|
||||
* Updates a row in a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @throws \RuntimeException
|
||||
|
|
|
@ -8,95 +8,168 @@
|
|||
|
||||
namespace Joomla\Database\Pgsql;
|
||||
|
||||
use Joomla\Database\Postgresql\PostgresqlQuery;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
use Joomla\Database\Pdo\PdoQuery;
|
||||
use Joomla\Database\Query\PostgresqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* PDO PostgreSQL Query Building Class.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class PgsqlQuery extends PostgresqlQuery implements PreparableInterface
|
||||
class PgsqlQuery extends PdoQuery
|
||||
{
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
*
|
||||
* @var mixed
|
||||
* @since 1.5.0
|
||||
*/
|
||||
protected $bounded = [];
|
||||
use PostgresqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
|
||||
* removes a variable that has been bounded from the internal bounded array when the passed in value is null.
|
||||
* Magic function to convert the query to a string, only for PostgreSQL specific queries
|
||||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
* @param array $driverOptions Optional driver options to be used.
|
||||
* @return string The completed query.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function bind($key = null, &$value = null, $dataType = \PDO::PARAM_STR, $length = 0, $driverOptions = array())
|
||||
public function __toString()
|
||||
{
|
||||
// Case 1: Empty Key (reset $bounded array)
|
||||
if (empty($key))
|
||||
{
|
||||
$this->bounded = array();
|
||||
$query = '';
|
||||
|
||||
return $this;
|
||||
switch ($this->type)
|
||||
{
|
||||
case 'select':
|
||||
$query .= (string) $this->select;
|
||||
$query .= (string) $this->from;
|
||||
|
||||
if ($this->join)
|
||||
{
|
||||
// Special case for joins
|
||||
foreach ($this->join as $join)
|
||||
{
|
||||
$query .= (string) $join;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->where)
|
||||
{
|
||||
$query .= (string) $this->where;
|
||||
}
|
||||
|
||||
if ($this->selectRowNumber)
|
||||
{
|
||||
if ($this->order)
|
||||
{
|
||||
$query .= (string) $this->order;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ($this->group)
|
||||
{
|
||||
$query .= (string) $this->group;
|
||||
}
|
||||
|
||||
if ($this->having)
|
||||
{
|
||||
$query .= (string) $this->having;
|
||||
}
|
||||
|
||||
if ($this->order)
|
||||
{
|
||||
$query .= (string) $this->order;
|
||||
}
|
||||
|
||||
if ($this->forUpdate)
|
||||
{
|
||||
$query .= (string) $this->forUpdate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->forShare)
|
||||
{
|
||||
$query .= (string) $this->forShare;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->noWait)
|
||||
{
|
||||
$query .= (string) $this->noWait;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
$query .= (string) $this->update;
|
||||
$query .= (string) $this->set;
|
||||
|
||||
if ($this->join)
|
||||
{
|
||||
$tmpFrom = $this->from;
|
||||
$tmpWhere = $this->where ? clone $this->where : null;
|
||||
$this->from = null;
|
||||
|
||||
// Workaround for special case of JOIN with UPDATE
|
||||
foreach ($this->join as $join)
|
||||
{
|
||||
$joinElem = $join->getElements();
|
||||
|
||||
$joinArray = preg_split('/\sON\s/i', $joinElem[0], 2);
|
||||
|
||||
$this->from($joinArray[0]);
|
||||
|
||||
if (isset($joinArray[1]))
|
||||
{
|
||||
$this->where($joinArray[1]);
|
||||
}
|
||||
}
|
||||
|
||||
$query .= (string) $this->from;
|
||||
|
||||
if ($this->where)
|
||||
{
|
||||
$query .= (string) $this->where;
|
||||
}
|
||||
|
||||
$this->from = $tmpFrom;
|
||||
$this->where = $tmpWhere;
|
||||
}
|
||||
elseif ($this->where)
|
||||
{
|
||||
$query .= (string) $this->where;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'insert':
|
||||
$query .= (string) $this->insert;
|
||||
|
||||
if ($this->values)
|
||||
{
|
||||
if ($this->columns)
|
||||
{
|
||||
$query .= (string) $this->columns;
|
||||
}
|
||||
|
||||
$elements = $this->values->getElements();
|
||||
|
||||
if (!($elements[0] instanceof $this))
|
||||
{
|
||||
$query .= ' VALUES ';
|
||||
}
|
||||
|
||||
$query .= (string) $this->values;
|
||||
|
||||
if ($this->returning)
|
||||
{
|
||||
$query .= (string) $this->returning;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$query = parent::__toString();
|
||||
break;
|
||||
}
|
||||
|
||||
// Case 2: Key Provided, null value (unset key from $bounded array)
|
||||
if (is_null($value))
|
||||
{
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
unset($this->bounded[$key]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$obj = new \stdClass;
|
||||
|
||||
$obj->value = &$value;
|
||||
$obj->dataType = $dataType;
|
||||
$obj->length = $length;
|
||||
$obj->driverOptions = $driverOptions;
|
||||
|
||||
// Case 3: Simply add the Key/Value into the bounded array
|
||||
$this->bounded[$key] = $obj;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is
|
||||
* returned.
|
||||
*
|
||||
* @param mixed $key The bounded variable key to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function &getBounded($key = null)
|
||||
{
|
||||
if (empty($key))
|
||||
{
|
||||
return $this->bounded;
|
||||
}
|
||||
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
return $this->bounded[$key];
|
||||
}
|
||||
return $this->processLimit($query, $this->limit, $this->offset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -106,17 +179,62 @@ class PgsqlQuery extends PostgresqlQuery implements PreparableInterface
|
|||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 1.0
|
||||
*/
|
||||
public function clear($clause = null)
|
||||
{
|
||||
switch ($clause)
|
||||
{
|
||||
case null:
|
||||
$this->bounded = array();
|
||||
case 'limit':
|
||||
$this->limit = null;
|
||||
break;
|
||||
|
||||
case 'offset':
|
||||
$this->offset = null;
|
||||
break;
|
||||
|
||||
case 'forUpdate':
|
||||
$this->forUpdate = null;
|
||||
break;
|
||||
|
||||
case 'forShare':
|
||||
$this->forShare = null;
|
||||
break;
|
||||
|
||||
case 'noWait':
|
||||
$this->noWait = null;
|
||||
break;
|
||||
|
||||
case 'returning':
|
||||
$this->returning = null;
|
||||
break;
|
||||
|
||||
case 'select':
|
||||
case 'update':
|
||||
case 'delete':
|
||||
case 'insert':
|
||||
case 'from':
|
||||
case 'join':
|
||||
case 'set':
|
||||
case 'where':
|
||||
case 'group':
|
||||
case 'having':
|
||||
case 'order':
|
||||
case 'columns':
|
||||
case 'values':
|
||||
parent::clear($clause);
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->forUpdate = null;
|
||||
$this->forShare = null;
|
||||
$this->noWait = null;
|
||||
$this->returning = null;
|
||||
|
||||
parent::clear($clause);
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::clear($clause);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
}
|
||||
|
||||
/*
|
||||
* pg_connect() takes the port as separate argument. Therefore, we
|
||||
* The pg_connect() function takes the port as separate argument. Therefore, we
|
||||
* have to extract it from the host string (if povided).
|
||||
*/
|
||||
|
||||
|
@ -615,7 +615,7 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
$insertQuery = $this->getQuery();
|
||||
$table = $insertQuery->insert->getElements();
|
||||
|
||||
/* find sequence column name */
|
||||
// Find sequence column name
|
||||
$colNameQuery = $this->getQuery(true);
|
||||
$colNameQuery->select('column_default')
|
||||
->from('information_schema.columns')
|
||||
|
@ -779,7 +779,7 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
throw new \RuntimeException('Table not found in PostgreSQL database.');
|
||||
}
|
||||
|
||||
/* Rename indexes */
|
||||
// Rename indexes
|
||||
$this->setQuery(
|
||||
'SELECT relname
|
||||
FROM pg_class
|
||||
|
@ -800,7 +800,7 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
->execute();
|
||||
}
|
||||
|
||||
/* Rename sequence */
|
||||
// Rename sequence
|
||||
$this->setQuery(
|
||||
'SELECT relname
|
||||
FROM pg_class
|
||||
|
@ -824,7 +824,7 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
->execute();
|
||||
}
|
||||
|
||||
/* Rename table */
|
||||
// Rename table
|
||||
$this->setQuery('ALTER TABLE ' . $this->escape($oldTable) . ' RENAME TO ' . $this->escape($newTable))
|
||||
->execute();
|
||||
|
||||
|
@ -1110,11 +1110,11 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
/**
|
||||
* Inserts a row into a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.0
|
||||
* @throws \RuntimeException
|
||||
|
@ -1159,32 +1159,20 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
->columns($fields)
|
||||
->values(implode(',', $values));
|
||||
|
||||
$retVal = false;
|
||||
|
||||
if ($key)
|
||||
{
|
||||
$query->returning($key);
|
||||
|
||||
// Set the query and execute the insert.
|
||||
$this->setQuery($query);
|
||||
|
||||
$id = $this->loadResult();
|
||||
|
||||
if ($id)
|
||||
{
|
||||
$object->$key = $id;
|
||||
$retVal = true;
|
||||
}
|
||||
$object->$key = $this->setQuery($query)->loadResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the query and execute the insert.
|
||||
$this->setQuery($query)->execute();
|
||||
|
||||
$retVal = true;
|
||||
}
|
||||
|
||||
return $retVal;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1417,10 +1405,10 @@ class PostgresqlDriver extends DatabaseDriver
|
|||
/**
|
||||
* Updates a row in a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
* @param string $table The name of the database table to update.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param array $key The name of the primary key.
|
||||
* @param boolean $nulls True to update null fields or false to ignore them.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
|
|
|
@ -67,23 +67,23 @@ class PostgresqlExporter extends DatabaseExporter
|
|||
|
||||
foreach ($sequences as $sequence)
|
||||
{
|
||||
$buffer[] = ' <sequence Name="' . $sequence->sequence . '"' . ' Schema="' . $sequence->schema . '"' .
|
||||
' Table="' . $sequence->table . '"' . ' Column="' . $sequence->column . '"' . ' Type="' . $sequence->data_type . '"' .
|
||||
' Start_Value="' . $sequence->start_value . '"' . ' Min_Value="' . $sequence->minimum_value . '"' .
|
||||
' Max_Value="' . $sequence->maximum_value . '"' . ' Increment="' . $sequence->increment . '"' .
|
||||
$buffer[] = ' <sequence Name="' . $sequence->sequence . '" Schema="' . $sequence->schema . '"' .
|
||||
' Table="' . $sequence->table . '" Column="' . $sequence->column . '" Type="' . $sequence->data_type . '"' .
|
||||
' Start_Value="' . $sequence->start_value . '" Min_Value="' . $sequence->minimum_value . '"' .
|
||||
' Max_Value="' . $sequence->maximum_value . '" Increment="' . $sequence->increment . '"' .
|
||||
' Cycle_option="' . $sequence->cycle_option . '"' .
|
||||
' />';
|
||||
}
|
||||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$buffer[] = ' <field Field="' . $field->column_name . '"' . ' Type="' . $field->type . '"' . ' Null="' . $field->null . '"' .
|
||||
(isset($field->default) ? ' Default="' . $field->default . '"' : '') . ' Comments="' . $field->comments . '"' . ' />';
|
||||
$buffer[] = ' <field Field="' . $field->column_name . '" Type="' . $field->type . '" Null="' . $field->null . '"' .
|
||||
(isset($field->default) ? ' Default="' . $field->default . '"' : '') . ' Comments="' . $field->comments . '" />';
|
||||
}
|
||||
|
||||
foreach ($keys as $key)
|
||||
{
|
||||
$buffer[] = ' <key Index="' . $key->idxName . '"' . ' is_primary="' . $key->isPrimary . '"' . ' is_unique="' . $key->isUnique . '"'
|
||||
$buffer[] = ' <key Index="' . $key->idxName . '" is_primary="' . $key->isPrimary . '" is_unique="' . $key->isUnique . '"'
|
||||
. ' Query="' . $key->Query . '" />';
|
||||
}
|
||||
|
||||
|
|
|
@ -78,8 +78,11 @@ class PostgresqlImporter extends DatabaseImporter
|
|||
$newKeys = $structure->xpath('key');
|
||||
$newSequence = $structure->xpath('sequence');
|
||||
|
||||
/* Sequence section */
|
||||
$oldSeq = $this->getSeqLookup($oldSequence);
|
||||
/*
|
||||
* Sequence section
|
||||
*/
|
||||
|
||||
$oldSeq = $this->getSeqLookup($oldSequence);
|
||||
$newSequenceLook = $this->getSeqLookup($newSequence);
|
||||
|
||||
foreach ($newSequenceLook as $kSeqName => $vSeq)
|
||||
|
@ -123,7 +126,10 @@ class PostgresqlImporter extends DatabaseImporter
|
|||
$alters[] = $this->getDropSequenceSql($name);
|
||||
}
|
||||
|
||||
/* Field section */
|
||||
/*
|
||||
* Field section
|
||||
*/
|
||||
|
||||
// Loop through each field in the new structure.
|
||||
foreach ($newFields as $field)
|
||||
{
|
||||
|
@ -160,7 +166,10 @@ class PostgresqlImporter extends DatabaseImporter
|
|||
$alters[] = $this->getDropColumnSql($table, $name);
|
||||
}
|
||||
|
||||
/* Index section */
|
||||
/*
|
||||
* Index section
|
||||
*/
|
||||
|
||||
// Get the lookups for the old and new keys
|
||||
$oldLookup = $this->getKeyLookup($oldKeys);
|
||||
$newLookup = $this->getKeyLookup($newKeys);
|
||||
|
@ -347,9 +356,10 @@ class PostgresqlImporter extends DatabaseImporter
|
|||
// Sequence was created in other function, here is associated a default value but not yet owner
|
||||
if (strpos($fDefault, 'nextval') !== false)
|
||||
{
|
||||
$sql .= ";\nALTER SEQUENCE " . $this->db->quoteName($table . '_' . $fName . '_seq') . ' OWNED BY ' . $this->db->quoteName(
|
||||
$table . '.' . $fName
|
||||
);
|
||||
$sequence = $table . '_' . $fName . '_seq';
|
||||
$owner = $table . '.' . $fName;
|
||||
|
||||
$sql .= ";\nALTER SEQUENCE " . $this->db->quoteName($sequence) . ' OWNED BY ' . $this->db->quoteName($owner);
|
||||
}
|
||||
|
||||
return $sql;
|
||||
|
|
|
@ -9,10 +9,9 @@
|
|||
namespace Joomla\Database\Postgresql;
|
||||
|
||||
use Joomla\Database\DatabaseQuery;
|
||||
use Joomla\Database\Exception\ExecutionFailureException;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
use Joomla\Database\Query\QueryElement;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
use Joomla\Database\Query\PostgresqlQueryBuilder;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
|
||||
/**
|
||||
* PostgreSQL Query Building Class.
|
||||
|
@ -21,53 +20,7 @@ use Joomla\Database\Query\LimitableInterface;
|
|||
*/
|
||||
class PostgresqlQuery extends DatabaseQuery implements LimitableInterface, PreparableInterface
|
||||
{
|
||||
/**
|
||||
* The FOR UPDATE element used in "FOR UPDATE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $forUpdate = null;
|
||||
|
||||
/**
|
||||
* The FOR SHARE element used in "FOR SHARE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $forShare = null;
|
||||
|
||||
/**
|
||||
* The NOWAIT element used in "FOR SHARE" and "FOR UPDATE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $noWait = null;
|
||||
|
||||
/**
|
||||
* The LIMIT element
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $limit = null;
|
||||
|
||||
/**
|
||||
* The OFFSET element
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $offset = null;
|
||||
|
||||
/**
|
||||
* The RETURNING element of INSERT INTO
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $returning = null;
|
||||
use PostgresqlQueryBuilder;
|
||||
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
|
@ -83,7 +36,7 @@ class PostgresqlQuery extends DatabaseQuery implements LimitableInterface, Prepa
|
|||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* @param mixed $value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param string $dataType The corresponding bind type. (Unused)
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters. (Unused)
|
||||
|
@ -292,12 +245,7 @@ class PostgresqlQuery extends DatabaseQuery implements LimitableInterface, Prepa
|
|||
break;
|
||||
}
|
||||
|
||||
if ($this instanceof LimitableInterface)
|
||||
{
|
||||
$query = $this->processLimit($query, $this->limit, $this->offset);
|
||||
}
|
||||
|
||||
return $query;
|
||||
return $this->processLimit($query, $this->limit, $this->offset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -369,292 +317,6 @@ class PostgresqlQuery extends DatabaseQuery implements LimitableInterface, Prepa
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts a value to a char.
|
||||
*
|
||||
* Ensure that the value is properly quoted before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->castAsChar('a'));
|
||||
*
|
||||
* @param string $value The value to cast as a char.
|
||||
*
|
||||
* @return string Returns the cast value.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function castAsChar($value)
|
||||
{
|
||||
return $value . '::text';
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->concatenate(array('a', 'b')));
|
||||
*
|
||||
* @param array $values An array of values to concatenate.
|
||||
* @param string $separator As separator to place between each value.
|
||||
*
|
||||
* @return string The concatenated values.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function concatenate($values, $separator = null)
|
||||
{
|
||||
if ($separator)
|
||||
{
|
||||
return implode(' || ' . $this->quote($separator) . ' || ', $values);
|
||||
}
|
||||
|
||||
return implode(' || ', $values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current date and time.
|
||||
*
|
||||
* @return string Return string used in query to obtain
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function currentTimestamp()
|
||||
{
|
||||
return 'NOW()';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the FOR UPDATE lock on select's output row
|
||||
*
|
||||
* @param string $table_name The table to lock
|
||||
* @param string $glue The glue by which to join the conditions. Defaults to ',' .
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function forUpdate($table_name, $glue = ',')
|
||||
{
|
||||
$this->type = 'forUpdate';
|
||||
|
||||
if (is_null($this->forUpdate))
|
||||
{
|
||||
$glue = strtoupper($glue);
|
||||
$this->forUpdate = new QueryElement('FOR UPDATE', 'OF ' . $table_name, "$glue ");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->forUpdate->append($table_name);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the FOR SHARE lock on select's output row
|
||||
*
|
||||
* @param string $table_name The table to lock
|
||||
* @param string $glue The glue by which to join the conditions. Defaults to ',' .
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function forShare($table_name, $glue = ',')
|
||||
{
|
||||
$this->type = 'forShare';
|
||||
|
||||
if (is_null($this->forShare))
|
||||
{
|
||||
$glue = strtoupper($glue);
|
||||
$this->forShare = new QueryElement('FOR SHARE', 'OF ' . $table_name, "$glue ");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->forShare->append($table_name);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract year from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->year($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing year to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract year from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function year($date)
|
||||
{
|
||||
return 'EXTRACT (YEAR FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract month from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->month($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing month to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract month from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function month($date)
|
||||
{
|
||||
return 'EXTRACT (MONTH FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract day from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->day($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing day to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract day from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function day($date)
|
||||
{
|
||||
return 'EXTRACT (DAY FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract hour from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->hour($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing hour to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract hour from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function hour($date)
|
||||
{
|
||||
return 'EXTRACT (HOUR FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract minute from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->minute($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing minute to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract minute from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function minute($date)
|
||||
{
|
||||
return 'EXTRACT (MINUTE FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract seconds from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->second($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing second to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract second from a date.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function second($date)
|
||||
{
|
||||
return 'EXTRACT (SECOND FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the NOWAIT lock on select's output row
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function noWait()
|
||||
{
|
||||
$this->type = 'noWait';
|
||||
|
||||
if (is_null($this->noWait))
|
||||
{
|
||||
$this->noWait = new QueryElement('NOWAIT', null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the LIMIT clause to the query
|
||||
*
|
||||
* @param integer $limit Number of rows to return
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function limit($limit = 0)
|
||||
{
|
||||
if (is_null($this->limit))
|
||||
{
|
||||
$this->limit = new QueryElement('LIMIT', (int) $limit);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the OFFSET clause to the query
|
||||
*
|
||||
* @param integer $offset An integer for skipping rows
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function offset($offset = 0)
|
||||
{
|
||||
if (is_null($this->offset))
|
||||
{
|
||||
$this->offset = new QueryElement('OFFSET', (int) $offset);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the RETURNING element to INSERT INTO statement.
|
||||
*
|
||||
* @param mixed $pkCol The name of the primary key column.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function returning($pkCol)
|
||||
{
|
||||
if (is_null($this->returning))
|
||||
{
|
||||
$this->returning = new QueryElement('RETURNING', $pkCol);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
|
@ -676,112 +338,4 @@ class PostgresqlQuery extends DatabaseQuery implements LimitableInterface, Prepa
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
*
|
||||
* @param string $query The query in string format
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
if ($offset > 0)
|
||||
{
|
||||
$query .= ' OFFSET ' . $offset;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to the current date and time.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->dateAdd());
|
||||
*
|
||||
* Prefixing the interval with a - (negative sign) will cause subtraction to be used.
|
||||
*
|
||||
* @param datetime $date The date to add to
|
||||
* @param string $interval The string representation of the appropriate number of units
|
||||
* @param string $datePart The part of the date to perform the addition on
|
||||
*
|
||||
* @return string The string with the appropriate sql for addition of dates
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @link http://www.postgresql.org/docs/9.0/static/functions-datetime.html.
|
||||
*/
|
||||
public function dateAdd($date, $interval, $datePart)
|
||||
{
|
||||
if (substr($interval, 0, 1) !== '-')
|
||||
{
|
||||
return "timestamp '" . $date . "' + interval '" . $interval . ' ' . $datePart . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "timestamp '" . $date . "' - interval '" . ltrim($interval, '-') . ' ' . $datePart . "'";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the regular expression operator
|
||||
*
|
||||
* Usage:
|
||||
* $query->where('field ' . $query->regexp($search));
|
||||
*
|
||||
* @param string $value The regex pattern.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function regexp($value)
|
||||
{
|
||||
return ' ~* ' . $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the function to return a random floating-point value
|
||||
*
|
||||
* Usage:
|
||||
* $query->rand();
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function rand()
|
||||
{
|
||||
return ' RANDOM() ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a value in a varchar used like a set.
|
||||
*
|
||||
* Ensure that the value is an integer before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->findInSet((int) $parent->id, 'a.assigned_cat_ids')
|
||||
*
|
||||
* @param string $value The value to search for.
|
||||
* @param string $set The set of values.
|
||||
*
|
||||
* @return string A representation of the MySQL find_in_set() function for the driver.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function findInSet($value, $set)
|
||||
{
|
||||
return " $value = ANY (string_to_array($set, ',')::integer[]) ";
|
||||
}
|
||||
}
|
||||
|
|
168
libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php
vendored
Normal file
168
libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php
vendored
Normal file
|
@ -0,0 +1,168 @@
|
|||
<?php
|
||||
/**
|
||||
* Part of the Joomla Framework Database Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
namespace Joomla\Database\Query;
|
||||
|
||||
/**
|
||||
* Trait for MySQL Query Building.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
trait MysqlQueryBuilder
|
||||
{
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
*
|
||||
* @param string $query The query in string format
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit > 0 && $offset > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||
}
|
||||
elseif ($limit > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
* @param array $values An array of values to concatenate.
|
||||
* @param string $separator As separator to place between each value.
|
||||
*
|
||||
* @return string The concatenated values.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function concatenate($values, $separator = null)
|
||||
{
|
||||
if ($separator)
|
||||
{
|
||||
$concat_string = 'CONCAT_WS(' . $this->quote($separator);
|
||||
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$concat_string .= ', ' . $value;
|
||||
}
|
||||
|
||||
return $concat_string . ')';
|
||||
}
|
||||
|
||||
return 'CONCAT(' . implode(',', $values) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to quote and optionally escape a string to database requirements for insertion into the database.
|
||||
*
|
||||
* This method is provided for use where the query object is passed to a function for modification.
|
||||
* If you have direct access to the database object, it is recommended you use the quote method directly.
|
||||
*
|
||||
* Note that 'q' is an alias for this method as it is in DatabaseDriver.
|
||||
*
|
||||
* Usage:
|
||||
* $query->quote('fulltext');
|
||||
* $query->q('fulltext');
|
||||
* $query->q(array('option', 'fulltext'));
|
||||
*
|
||||
* @param array|string $text A string or an array of strings to quote.
|
||||
* @param boolean $escape True (default) to escape the string, false to leave it unchanged.
|
||||
*
|
||||
* @return string The quoted input string.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @throws \RuntimeException if the internal db property is not a valid object.
|
||||
*/
|
||||
abstract public function quote($text, $escape = true);
|
||||
|
||||
/**
|
||||
* Get the regular expression operator
|
||||
*
|
||||
* Usage:
|
||||
* $query->where('field ' . $query->regexp($search));
|
||||
*
|
||||
* @param string $value The regex pattern.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function regexp($value)
|
||||
{
|
||||
return ' REGEXP ' . $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the function to return a random floating-point value
|
||||
*
|
||||
* Usage:
|
||||
* $query->rand();
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function rand()
|
||||
{
|
||||
return ' RAND() ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a value in a varchar used like a set.
|
||||
*
|
||||
* Ensure that the value is an integer before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->findInSet((int) $parent->id, 'a.assigned_cat_ids')
|
||||
*
|
||||
* @param string $value The value to search for.
|
||||
* @param string $set The set of values.
|
||||
*
|
||||
* @return string A representation of the MySQL find_in_set() function for the driver.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function findInSet($value, $set)
|
||||
{
|
||||
return ' find_in_set(' . $value . ', ' . $set . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of the current row.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select('id');
|
||||
* $query->selectRowNumber('ordering,publish_up DESC', 'new_ordering');
|
||||
* $query->from('#__content');
|
||||
*
|
||||
* @param string $orderBy An expression of ordering for window function.
|
||||
* @param string $orderColumnAlias An alias for new ordering column.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function selectRowNumber($orderBy, $orderColumnAlias)
|
||||
{
|
||||
$this->validateRowNumber($orderBy, $orderColumnAlias);
|
||||
|
||||
return $this->select("(SELECT @rownum := @rownum + 1 FROM (SELECT @rownum := 0) AS r) AS $orderColumnAlias");
|
||||
}
|
||||
}
|
459
libraries/vendor/joomla/database/src/Query/PostgresqlQueryBuilder.php
vendored
Normal file
459
libraries/vendor/joomla/database/src/Query/PostgresqlQueryBuilder.php
vendored
Normal file
|
@ -0,0 +1,459 @@
|
|||
<?php
|
||||
/**
|
||||
* Part of the Joomla Framework Database Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
namespace Joomla\Database\Query;
|
||||
|
||||
/**
|
||||
* Trait for PostgreSQL Query Building.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
trait PostgresqlQueryBuilder
|
||||
{
|
||||
/**
|
||||
* The FOR UPDATE element used in "FOR UPDATE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $forUpdate = null;
|
||||
|
||||
/**
|
||||
* The FOR SHARE element used in "FOR SHARE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $forShare = null;
|
||||
|
||||
/**
|
||||
* The NOWAIT element used in "FOR SHARE" and "FOR UPDATE" lock
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $noWait = null;
|
||||
|
||||
/**
|
||||
* The LIMIT element
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $limit = null;
|
||||
|
||||
/**
|
||||
* The OFFSET element
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $offset = null;
|
||||
|
||||
/**
|
||||
* The RETURNING element of INSERT INTO
|
||||
*
|
||||
* @var QueryElement
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
protected $returning = null;
|
||||
|
||||
/**
|
||||
* Casts a value to a char.
|
||||
*
|
||||
* Ensure that the value is properly quoted before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->castAsChar('a'));
|
||||
*
|
||||
* @param string $value The value to cast as a char.
|
||||
*
|
||||
* @return string Returns the cast value.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function castAsChar($value)
|
||||
{
|
||||
return $value . '::text';
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->concatenate(array('a', 'b')));
|
||||
*
|
||||
* @param array $values An array of values to concatenate.
|
||||
* @param string $separator As separator to place between each value.
|
||||
*
|
||||
* @return string The concatenated values.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function concatenate($values, $separator = null)
|
||||
{
|
||||
if ($separator)
|
||||
{
|
||||
return implode(' || ' . $this->quote($separator) . ' || ', $values);
|
||||
}
|
||||
|
||||
return implode(' || ', $values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current date and time.
|
||||
*
|
||||
* @return string Return string used in query to obtain
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function currentTimestamp()
|
||||
{
|
||||
return 'NOW()';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the FOR UPDATE lock on select's output row
|
||||
*
|
||||
* @param string $table_name The table to lock
|
||||
* @param string $glue The glue by which to join the conditions. Defaults to ',' .
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function forUpdate($table_name, $glue = ',')
|
||||
{
|
||||
$this->type = 'forUpdate';
|
||||
|
||||
if (is_null($this->forUpdate))
|
||||
{
|
||||
$glue = strtoupper($glue);
|
||||
$this->forUpdate = new QueryElement('FOR UPDATE', 'OF ' . $table_name, "$glue ");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->forUpdate->append($table_name);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the FOR SHARE lock on select's output row
|
||||
*
|
||||
* @param string $table_name The table to lock
|
||||
* @param string $glue The glue by which to join the conditions. Defaults to ',' .
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function forShare($table_name, $glue = ',')
|
||||
{
|
||||
$this->type = 'forShare';
|
||||
|
||||
if (is_null($this->forShare))
|
||||
{
|
||||
$glue = strtoupper($glue);
|
||||
$this->forShare = new QueryElement('FOR SHARE', 'OF ' . $table_name, "$glue ");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->forShare->append($table_name);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract year from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->year($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing year to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract year from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function year($date)
|
||||
{
|
||||
return 'EXTRACT (YEAR FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract month from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->month($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing month to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract month from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function month($date)
|
||||
{
|
||||
return 'EXTRACT (MONTH FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract day from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->day($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing day to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract day from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function day($date)
|
||||
{
|
||||
return 'EXTRACT (DAY FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract hour from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->hour($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing hour to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract hour from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function hour($date)
|
||||
{
|
||||
return 'EXTRACT (HOUR FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract minute from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->minute($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing minute to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract minute from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function minute($date)
|
||||
{
|
||||
return 'EXTRACT (MINUTE FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a string to extract seconds from date column.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->second($query->quoteName('dateColumn')));
|
||||
*
|
||||
* @param string $date Date column containing second to be extracted.
|
||||
*
|
||||
* @return string Returns string to extract second from a date.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function second($date)
|
||||
{
|
||||
return 'EXTRACT (SECOND FROM ' . $date . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the NOWAIT lock on select's output row
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function noWait()
|
||||
{
|
||||
$this->type = 'noWait';
|
||||
|
||||
if (is_null($this->noWait))
|
||||
{
|
||||
$this->noWait = new QueryElement('NOWAIT', null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the LIMIT clause to the query
|
||||
*
|
||||
* @param integer $limit Number of rows to return
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function limit($limit = 0)
|
||||
{
|
||||
if (is_null($this->limit))
|
||||
{
|
||||
$this->limit = new QueryElement('LIMIT', (int) $limit);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the OFFSET clause to the query
|
||||
*
|
||||
* @param integer $offset An integer for skipping rows
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function offset($offset = 0)
|
||||
{
|
||||
if (is_null($this->offset))
|
||||
{
|
||||
$this->offset = new QueryElement('OFFSET', (int) $offset);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the RETURNING element to INSERT INTO statement.
|
||||
*
|
||||
* @param mixed $pkCol The name of the primary key column.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function returning($pkCol)
|
||||
{
|
||||
if (is_null($this->returning))
|
||||
{
|
||||
$this->returning = new QueryElement('RETURNING', $pkCol);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to modify a query already in string format with the needed additions to make the query limited to a particular number of
|
||||
* results, or start at a particular offset.
|
||||
*
|
||||
* @param string $query The query in string format
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function processLimit($query, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit > 0)
|
||||
{
|
||||
$query .= ' LIMIT ' . $limit;
|
||||
}
|
||||
|
||||
if ($offset > 0)
|
||||
{
|
||||
$query .= ' OFFSET ' . $offset;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to the current date and time.
|
||||
*
|
||||
* Usage:
|
||||
* $query->select($query->dateAdd());
|
||||
*
|
||||
* Prefixing the interval with a - (negative sign) will cause subtraction to be used.
|
||||
*
|
||||
* @param datetime $date The date to add to
|
||||
* @param string $interval The string representation of the appropriate number of units
|
||||
* @param string $datePart The part of the date to perform the addition on
|
||||
*
|
||||
* @return string The string with the appropriate sql for addition of dates
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @link http://www.postgresql.org/docs/9.0/static/functions-datetime.html.
|
||||
*/
|
||||
public function dateAdd($date, $interval, $datePart)
|
||||
{
|
||||
if (substr($interval, 0, 1) !== '-')
|
||||
{
|
||||
return "timestamp '" . $date . "' + interval '" . $interval . ' ' . $datePart . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "timestamp '" . $date . "' - interval '" . ltrim($interval, '-') . ' ' . $datePart . "'";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the regular expression operator
|
||||
*
|
||||
* Usage:
|
||||
* $query->where('field ' . $query->regexp($search));
|
||||
*
|
||||
* @param string $value The regex pattern.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function regexp($value)
|
||||
{
|
||||
return ' ~* ' . $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the function to return a random floating-point value
|
||||
*
|
||||
* Usage:
|
||||
* $query->rand();
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function rand()
|
||||
{
|
||||
return ' RANDOM() ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a value in a varchar used like a set.
|
||||
*
|
||||
* Ensure that the value is an integer before passing to the method.
|
||||
*
|
||||
* Usage:
|
||||
* $query->findInSet((int) $parent->id, 'a.assigned_cat_ids')
|
||||
*
|
||||
* @param string $value The value to search for.
|
||||
* @param string $set The set of values.
|
||||
*
|
||||
* @return string A representation of the MySQL find_in_set() function for the driver.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
*/
|
||||
public function findInSet($value, $set)
|
||||
{
|
||||
return " $value = ANY (string_to_array($set, ',')::integer[]) ";
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@ interface PreparableInterface
|
|||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* @param mixed $value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
|
|
|
@ -68,7 +68,7 @@ class SqliteDriver extends PdoDriver
|
|||
|
||||
$this->connection->sqliteCreateFunction(
|
||||
'ROW_NUMBER',
|
||||
function($init = null)
|
||||
function ($init = null)
|
||||
{
|
||||
static $rownum, $partition;
|
||||
|
||||
|
@ -308,7 +308,7 @@ class SqliteDriver extends PdoDriver
|
|||
|
||||
$type = 'table';
|
||||
|
||||
/** @type SqliteQuery $query */
|
||||
/** @var SqliteQuery $query */
|
||||
$query = $this->getQuery(true);
|
||||
$query->select('name');
|
||||
$query->from('sqlite_master');
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
namespace Joomla\Database\Sqlite;
|
||||
|
||||
use Joomla\Database\Pdo\PdoQuery;
|
||||
use Joomla\Database\Query\PreparableInterface;
|
||||
use Joomla\Database\Query\LimitableInterface;
|
||||
use Joomla\Database\Query\QueryElement;
|
||||
|
||||
/**
|
||||
|
@ -18,32 +16,8 @@ use Joomla\Database\Query\QueryElement;
|
|||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class SqliteQuery extends PdoQuery implements PreparableInterface, LimitableInterface
|
||||
class SqliteQuery extends PdoQuery
|
||||
{
|
||||
/**
|
||||
* The limit for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $limit;
|
||||
|
||||
/**
|
||||
* The offset for the result set.
|
||||
*
|
||||
* @var integer
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $offset;
|
||||
|
||||
/**
|
||||
* Holds key / value pair of bound objects.
|
||||
*
|
||||
* @var array
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $bounded = [];
|
||||
|
||||
/**
|
||||
* Magic function to convert the query to a string.
|
||||
*
|
||||
|
@ -149,78 +123,6 @@ class SqliteQuery extends PdoQuery implements PreparableInterface, LimitableInte
|
|||
return parent::__toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution. Also
|
||||
* removes a variable that has been bounded from the internal bounded array when the passed in value is null.
|
||||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param integer $dataType Constant corresponding to a SQL datatype.
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters.
|
||||
* @param array $driverOptions Optional driver options to be used.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function bind($key = null, &$value = null, $dataType = \PDO::PARAM_STR, $length = 0, $driverOptions = [])
|
||||
{
|
||||
// Case 1: Empty Key (reset $bounded array)
|
||||
if (empty($key))
|
||||
{
|
||||
$this->bounded = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// Case 2: Key Provided, null value (unset key from $bounded array)
|
||||
if (is_null($value))
|
||||
{
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
unset($this->bounded[$key]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$obj = new \stdClass;
|
||||
|
||||
$obj->value = &$value;
|
||||
$obj->dataType = $dataType;
|
||||
$obj->length = $length;
|
||||
$obj->driverOptions = $driverOptions;
|
||||
|
||||
// Case 3: Simply add the Key/Value into the bounded array
|
||||
$this->bounded[$key] = $obj;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned.
|
||||
*
|
||||
* @param mixed $key The bounded variable key to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function &getBounded($key = null)
|
||||
{
|
||||
if (empty($key))
|
||||
{
|
||||
return $this->bounded;
|
||||
}
|
||||
|
||||
if (isset($this->bounded[$key]))
|
||||
{
|
||||
return $this->bounded[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the number of characters in a string.
|
||||
*
|
||||
|
@ -242,27 +144,6 @@ class SqliteQuery extends PdoQuery implements PreparableInterface, LimitableInte
|
|||
return 'length(' . $field . ')' . (isset($operator) && isset($condition) ? ' ' . $operator . ' ' . $condition : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear data from the query or a specific clause of the query.
|
||||
*
|
||||
* @param string $clause Optionally, the name of the clause to clear, or nothing to clear the whole query.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function clear($clause = null)
|
||||
{
|
||||
switch ($clause)
|
||||
{
|
||||
case null:
|
||||
$this->bounded = [];
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::clear($clause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates an array of column names or values.
|
||||
*
|
||||
|
@ -308,28 +189,6 @@ class SqliteQuery extends PdoQuery implements PreparableInterface, LimitableInte
|
|||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the offset and limit for the result set, if the database driver supports it.
|
||||
*
|
||||
* Usage:
|
||||
* $query->setLimit(100, 0); (retrieve 100 rows, starting at first record)
|
||||
* $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
|
||||
*
|
||||
* @param integer $limit The limit for the result set
|
||||
* @param integer $offset The offset for the result set
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function setLimit($limit = 0, $offset = 0)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
$this->offset = (int) $offset;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of the current row.
|
||||
*
|
||||
|
|
|
@ -297,7 +297,8 @@ class SqlsrvDriver extends DatabaseDriver
|
|||
if ($ifExists)
|
||||
{
|
||||
$this->setQuery(
|
||||
'IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = ' . $this->quote($tableName) . ') DROP TABLE ' . $tableName
|
||||
'IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '
|
||||
. $query->quote($tableName) . ') DROP TABLE ' . $tableName
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -484,9 +485,9 @@ class SqlsrvDriver extends DatabaseDriver
|
|||
/**
|
||||
* Inserts a row into a table based on an object's properties.
|
||||
*
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object &$object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
* @param string $table The name of the database table to insert into.
|
||||
* @param object $object A reference to an object whose public properties match the table fields.
|
||||
* @param string $key The name of the primary key. If provided the object property is updated.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
|
@ -509,7 +510,7 @@ class SqlsrvDriver extends DatabaseDriver
|
|||
}
|
||||
|
||||
// Only process non-null scalars.
|
||||
if (is_array($v) or is_object($v) or $v === null)
|
||||
if (is_array($v) || is_object($v) || $v === null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -843,7 +844,7 @@ class SqlsrvDriver extends DatabaseDriver
|
|||
*/
|
||||
public function setUtf()
|
||||
{
|
||||
// TODO: Remove this?
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -234,7 +234,7 @@ class SqlsrvQuery extends DatabaseQuery implements PreparableInterface
|
|||
*
|
||||
* @param string|integer $key The key that will be used in your SQL query to reference the value. Usually of
|
||||
* the form ':key', but can also be an integer.
|
||||
* @param mixed &$value The value that will be bound. The value is passed by reference to support output
|
||||
* @param mixed $value The value that will be bound. The value is passed by reference to support output
|
||||
* parameters such as those possible with stored procedures.
|
||||
* @param string $dataType The corresponding bind type. (Unused)
|
||||
* @param integer $length The length of the variable. Usually required for OUTPUT parameters. (Unused)
|
||||
|
@ -436,7 +436,15 @@ class SqlsrvQuery extends DatabaseQuery implements PreparableInterface
|
|||
// Go through all joins and add them to the tables array
|
||||
foreach ($this->join as $join)
|
||||
{
|
||||
$joinTbl = str_replace('#__', $this->db->getPrefix(), str_replace(']', '', preg_replace("/.*(#.+\sAS\s[^\s]*).*/i", '$1', (string) $join)));
|
||||
$joinTbl = str_replace(
|
||||
'#__',
|
||||
$this->db->getPrefix(),
|
||||
str_replace(
|
||||
']',
|
||||
'',
|
||||
preg_replace("/.*(#.+\sAS\s[^\s]*).*/i", '$1', (string) $join)
|
||||
)
|
||||
);
|
||||
|
||||
list($table, $alias) = preg_split("/\sAS\s/i", $joinTbl);
|
||||
|
||||
|
@ -591,7 +599,8 @@ class SqlsrvQuery extends DatabaseQuery implements PreparableInterface
|
|||
|| $lastWord == 'END'
|
||||
|| is_numeric($lastWord))
|
||||
{
|
||||
/* Ends with:
|
||||
/*
|
||||
* Ends with:
|
||||
* - SQL function
|
||||
* - single static value like 'only '+'string'
|
||||
* - @@var
|
||||
|
|
94
libraries/vendor/joomla/di/src/Container.php
vendored
94
libraries/vendor/joomla/di/src/Container.php
vendored
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -44,11 +44,19 @@ class Container implements ContainerInterface
|
|||
*
|
||||
* In fact, this can be any PSR-11 compatible container, which gets decorated by this
|
||||
*
|
||||
* @var ContainerInterface
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @var Container|ContainerInterface
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* Holds the service tag mapping.
|
||||
*
|
||||
* @var array
|
||||
* @since 1.5.0
|
||||
*/
|
||||
protected $tags = array();
|
||||
|
||||
/**
|
||||
* Constructor for the DI Container
|
||||
*
|
||||
|
@ -95,7 +103,7 @@ class Container implements ContainerInterface
|
|||
*
|
||||
* @return boolean true if key is defined, false otherwise
|
||||
*
|
||||
* @since 1.0
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function has($resourceName)
|
||||
{
|
||||
|
@ -240,6 +248,60 @@ class Container implements ContainerInterface
|
|||
throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a tag to services.
|
||||
*
|
||||
* @param string $tag The tag name
|
||||
* @param array $keys The service keys to tag
|
||||
*
|
||||
* @return Container This object for chaining.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function tag($tag, array $keys)
|
||||
{
|
||||
foreach ($keys as $key)
|
||||
{
|
||||
$resolvedKey = $this->resolveAlias($key);
|
||||
|
||||
if (!isset($this->tags[$tag]))
|
||||
{
|
||||
$this->tags[$tag] = array();
|
||||
}
|
||||
|
||||
$this->tags[$tag][] = $resolvedKey;
|
||||
}
|
||||
|
||||
// Prune duplicates
|
||||
$this->tags[$tag] = array_unique($this->tags[$tag]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch all services registered to the given tag.
|
||||
*
|
||||
* @param string $tag The tag name
|
||||
*
|
||||
* @return array The resolved services for the given tag
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function getTagged($tag)
|
||||
{
|
||||
$services = array();
|
||||
|
||||
if (isset($this->tags[$tag]))
|
||||
{
|
||||
foreach ($this->tags[$tag] as $service)
|
||||
{
|
||||
$services[] = $this->get($service);
|
||||
}
|
||||
}
|
||||
|
||||
return $services;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an object of the requested class
|
||||
*
|
||||
|
@ -364,7 +426,7 @@ class Container implements ContainerInterface
|
|||
* @return void
|
||||
*
|
||||
* @since 1.0
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws KeyNotFoundException
|
||||
*/
|
||||
public function extend($resourceName, callable $callable)
|
||||
{
|
||||
|
@ -476,33 +538,33 @@ class Container implements ContainerInterface
|
|||
/**
|
||||
* Convenience method for creating protected keys.
|
||||
*
|
||||
* @param string $key Name of resources key to set.
|
||||
* @param callable $callback Callable function to run when requesting the specified $key.
|
||||
* @param boolean $shared True to create and store a shared instance.
|
||||
* @param string $key Name of dataStore key to set.
|
||||
* @param mixed $value Callable function to run or string to retrive when requesting the specified $key.
|
||||
* @param boolean $shared True to create and store a shared instance.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function protect($key, $callback, $shared = false)
|
||||
public function protect($key, $value, $shared = false)
|
||||
{
|
||||
return $this->set($key, $callback, $shared, true);
|
||||
return $this->set($key, $value, $shared, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for creating shared keys.
|
||||
*
|
||||
* @param string $key Name of resources key to set.
|
||||
* @param callable $callback Callable function to run when requesting the specified $key.
|
||||
* @param boolean $protected True to create and store a shared instance.
|
||||
* @param string $key Name of dataStore key to set.
|
||||
* @param mixed $value Callable function to run or string to retrive when requesting the specified $key.
|
||||
* @param boolean $protected True to protect this item from being overwritten. Useful for services.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function share($key, $callback, $protected = false)
|
||||
public function share($key, $value, $protected = false)
|
||||
{
|
||||
return $this->set($key, $callback, true, $protected);
|
||||
return $this->set($key, $value, true, $protected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -581,7 +643,7 @@ class Container implements ContainerInterface
|
|||
*
|
||||
* @return array
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function getKeys()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -13,7 +13,7 @@ use Psr\Container\NotFoundExceptionInterface;
|
|||
/**
|
||||
* No entry was found in the container.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class KeyNotFoundException extends \InvalidArgumentException implements NotFoundExceptionInterface
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -13,7 +13,7 @@ use Psr\Container\ContainerExceptionInterface;
|
|||
/**
|
||||
* Attempt to set the value of a protected key, which already is set
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class ProtectedKeyException extends \OutOfBoundsException implements ContainerExceptionInterface
|
||||
{
|
||||
|
|
2
libraries/vendor/joomla/di/src/Resource.php
vendored
2
libraries/vendor/joomla/di/src/Resource.php
vendored
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2014 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework DI Package
|
||||
*
|
||||
* @copyright Copyright (C) 2013 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
2
libraries/vendor/joomla/http/src/Http.php
vendored
2
libraries/vendor/joomla/http/src/Http.php
vendored
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -161,6 +161,12 @@ class Curl extends AbstractTransport
|
|||
$options[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;
|
||||
}
|
||||
|
||||
// Configure protocol version
|
||||
if ($protocolVersion = $this->getOption('protocolVersion'))
|
||||
{
|
||||
$options[CURLOPT_HTTP_VERSION] = $this->mapProtocolVersion($protocolVersion);
|
||||
}
|
||||
|
||||
// Set any custom transport options
|
||||
foreach ($this->getOption('transport.curl', []) as $key => $value)
|
||||
{
|
||||
|
@ -274,6 +280,36 @@ class Curl extends AbstractTransport
|
|||
return function_exists('curl_version') && curl_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cURL constant for a HTTP protocol version
|
||||
*
|
||||
* @param string $version The HTTP protocol version to use
|
||||
*
|
||||
* @return integer
|
||||
*
|
||||
* @since 1.3.1
|
||||
*/
|
||||
private function mapProtocolVersion($version)
|
||||
{
|
||||
switch ($version)
|
||||
{
|
||||
case '1.0':
|
||||
return CURL_HTTP_VERSION_1_0;
|
||||
|
||||
case '1.1':
|
||||
return CURL_HTTP_VERSION_1_1;
|
||||
|
||||
case '2.0':
|
||||
case '2':
|
||||
if (defined('CURL_HTTP_VERSION_2'))
|
||||
{
|
||||
return CURL_HTTP_VERSION_2;
|
||||
}
|
||||
}
|
||||
|
||||
return CURL_HTTP_VERSION_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if redirects are allowed
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -84,9 +84,12 @@ class Socket extends AbstractTransport
|
|||
$headers['Content-Length'] = strlen($data);
|
||||
}
|
||||
|
||||
// Configure protocol version, use transport's default if not set otherwise.
|
||||
$protocolVersion = $this->getOption('protocolVersion', '1.0');
|
||||
|
||||
// Build the request payload.
|
||||
$request = [];
|
||||
$request[] = strtoupper($method) . ' ' . ((empty($path)) ? '/' : $path) . ' HTTP/1.0';
|
||||
$request[] = strtoupper($method) . ' ' . ((empty($path)) ? '/' : $path) . ' HTTP/' . $protocolVersion;
|
||||
$request[] = 'Host: ' . $uri->getHost();
|
||||
|
||||
// If an explicit user agent is given use it.
|
||||
|
@ -270,7 +273,7 @@ class Socket extends AbstractTransport
|
|||
|
||||
// Capture PHP errors
|
||||
$php_errormsg = '';
|
||||
$track_errors = ini_get('track_errors');
|
||||
$trackErrors = ini_get('track_errors');
|
||||
ini_set('track_errors', true);
|
||||
|
||||
// PHP sends a warning if the uri does not exists; we silence it and throw an exception instead.
|
||||
|
@ -286,13 +289,13 @@ class Socket extends AbstractTransport
|
|||
}
|
||||
|
||||
// Restore error tracking to give control to the exception handler
|
||||
ini_set('track_errors', $track_errors);
|
||||
ini_set('track_errors', $trackErrors);
|
||||
|
||||
throw new \RuntimeException($php_errormsg);
|
||||
}
|
||||
|
||||
// Restore error tracking to what it was before.
|
||||
ini_set('track_errors', $track_errors);
|
||||
ini_set('track_errors', $trackErrors);
|
||||
|
||||
// Since the connection was successful let's store it in case we need to use it later.
|
||||
$this->connections[$key] = $connection;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -84,6 +84,9 @@ class Stream extends AbstractTransport
|
|||
// Follow redirects.
|
||||
$options['follow_location'] = (int) $this->getOption('follow_location', 1);
|
||||
|
||||
// Configure protocol version, use transport's default if not set otherwise.
|
||||
$options['follow_location'] = $this->getOption('protocolVersion', '1.0');
|
||||
|
||||
// Add the proxy configuration if enabled
|
||||
if ($this->getOption('proxy.enabled', false))
|
||||
{
|
||||
|
@ -170,7 +173,7 @@ class Stream extends AbstractTransport
|
|||
|
||||
// Capture PHP errors
|
||||
$php_errormsg = '';
|
||||
$track_errors = ini_get('track_errors');
|
||||
$trackErrors = ini_get('track_errors');
|
||||
ini_set('track_errors', true);
|
||||
|
||||
// Open the stream for reading.
|
||||
|
@ -186,13 +189,13 @@ class Stream extends AbstractTransport
|
|||
}
|
||||
|
||||
// Restore error tracking to give control to the exception handler
|
||||
ini_set('track_errors', $track_errors);
|
||||
ini_set('track_errors', $trackErrors);
|
||||
|
||||
throw new \RuntimeException($php_errormsg);
|
||||
}
|
||||
|
||||
// Restore error tracking to what it was before.
|
||||
ini_set('track_errors', $track_errors);
|
||||
ini_set('track_errors', $trackErrors);
|
||||
|
||||
// Get the metadata for the stream, including response headers.
|
||||
$metadata = stream_get_meta_data($stream);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Http Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
2
libraries/vendor/joomla/image/src/Image.php
vendored
2
libraries/vendor/joomla/image/src/Image.php
vendored
|
@ -567,7 +567,7 @@ class Image implements LoggerAwareInterface
|
|||
/**
|
||||
* Method to determine whether or not the image has transparency.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.0
|
||||
* @throws \LogicException
|
||||
|
|
14
libraries/vendor/joomla/ldap/src/LdapClient.php
vendored
14
libraries/vendor/joomla/ldap/src/LdapClient.php
vendored
|
@ -386,11 +386,11 @@ class LdapClient
|
|||
$dn = $this->base_dn;
|
||||
}
|
||||
|
||||
foreach ($filters as $search_filter)
|
||||
foreach ($filters as $searchFilter)
|
||||
{
|
||||
$search_result = ldap_search($this->resource, $dn, $search_filter, $attributes);
|
||||
$searchResult = ldap_search($this->resource, $dn, $searchFilter, $attributes);
|
||||
|
||||
if ($search_result && ($count = ldap_count_entries($this->resource, $search_result)) > 0)
|
||||
if ($searchResult && ($count = ldap_count_entries($this->resource, $searchResult)) > 0)
|
||||
{
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
{
|
||||
|
@ -398,7 +398,7 @@ class LdapClient
|
|||
|
||||
if (!$i)
|
||||
{
|
||||
$firstentry = ldap_first_entry($this->resource, $search_result);
|
||||
$firstentry = ldap_first_entry($this->resource, $searchResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -406,10 +406,10 @@ class LdapClient
|
|||
}
|
||||
|
||||
// Load user-specified attributes
|
||||
$result_array = ldap_get_attributes($this->resource, $firstentry);
|
||||
$attributeResult = ldap_get_attributes($this->resource, $firstentry);
|
||||
|
||||
// LDAP returns an array of arrays, fit this into attributes result array
|
||||
foreach ($result_array as $ki => $ai)
|
||||
foreach ($attributeResult as $ki => $ai)
|
||||
{
|
||||
if (is_array($ai))
|
||||
{
|
||||
|
@ -719,7 +719,7 @@ class LdapClient
|
|||
* @author Jay Burrell, Systems & Networks, Mississippi State University
|
||||
* @since 1.0
|
||||
*/
|
||||
public static function LdapNetAddr($networkaddress)
|
||||
public static function ldapNetAddr($networkaddress)
|
||||
{
|
||||
$addr = "";
|
||||
$addrtype = (int) substr($networkaddress, 0, 1);
|
||||
|
|
16
libraries/vendor/joomla/oauth1/src/Client.php
vendored
16
libraries/vendor/joomla/oauth1/src/Client.php
vendored
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework OAuth1 Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -168,7 +168,7 @@ abstract class Client
|
|||
*
|
||||
* @return void
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
* @throws \DomainException
|
||||
*/
|
||||
private function generateRequestToken()
|
||||
|
@ -205,7 +205,7 @@ abstract class Client
|
|||
*
|
||||
* @return void
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function authorise()
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ abstract class Client
|
|||
*
|
||||
* @return void
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function generateAccessToken()
|
||||
{
|
||||
|
@ -348,7 +348,7 @@ abstract class Client
|
|||
*
|
||||
* @return string The header.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function createHeader(array $parameters): string
|
||||
{
|
||||
|
@ -431,7 +431,7 @@ abstract class Client
|
|||
*
|
||||
* @return array The array containing the request parameters, including signature.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function signRequest(string $url, string $method, array $parameters): array
|
||||
{
|
||||
|
@ -456,7 +456,7 @@ abstract class Client
|
|||
*
|
||||
* @return string The base string.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function baseString(string $url, string $method, array $parameters): string
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ abstract class Client
|
|||
*
|
||||
* @return string The prepared signing key.
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.1.2
|
||||
*/
|
||||
private function prepareSigningKey(): string
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Ini implements FormatInterface
|
|||
$last = count($variables);
|
||||
|
||||
// Assume that the first element is in section
|
||||
$in_section = true;
|
||||
$inSection = true;
|
||||
|
||||
// Iterate over the object to set the properties.
|
||||
foreach ($variables as $key => $value)
|
||||
|
@ -73,7 +73,7 @@ class Ini implements FormatInterface
|
|||
if (is_object($value))
|
||||
{
|
||||
// Add an empty line if previous string wasn't in a section
|
||||
if (!$in_section)
|
||||
if (!$inSection)
|
||||
{
|
||||
$local[] = '';
|
||||
}
|
||||
|
@ -88,10 +88,10 @@ class Ini implements FormatInterface
|
|||
{
|
||||
$assoc = ArrayHelper::isAssociative($v);
|
||||
|
||||
foreach ($v as $array_key => $item)
|
||||
foreach ($v as $arrayKey => $item)
|
||||
{
|
||||
$array_key = $assoc ? $array_key : '';
|
||||
$local[] = $k . '[' . $array_key . ']=' . $this->getValueAsIni($item);
|
||||
$arrayKey = $assoc ? $arrayKey : '';
|
||||
$local[] = $k . '[' . $arrayKey . ']=' . $this->getValueAsIni($item);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -110,17 +110,17 @@ class Ini implements FormatInterface
|
|||
{
|
||||
$assoc = ArrayHelper::isAssociative($value);
|
||||
|
||||
foreach ($value as $array_key => $item)
|
||||
foreach ($value as $arrayKey => $item)
|
||||
{
|
||||
$array_key = $assoc ? $array_key : '';
|
||||
$global[] = $key . '[' . $array_key . ']=' . $this->getValueAsIni($item);
|
||||
$arrayKey = $assoc ? $arrayKey : '';
|
||||
$global[] = $key . '[' . $arrayKey . ']=' . $this->getValueAsIni($item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not in a section so add the property to the global array.
|
||||
$global[] = $key . '=' . $this->getValueAsIni($value);
|
||||
$in_section = false;
|
||||
$global[] = $key . '=' . $this->getValueAsIni($value);
|
||||
$inSection = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,21 +200,21 @@ class Ini implements FormatInterface
|
|||
list ($key, $value) = explode('=', $line, 2);
|
||||
|
||||
// If we have an array item
|
||||
if (substr($key, -1) === ']' && ($open_brace = strpos($key, '[', 1)) !== false)
|
||||
if (substr($key, -1) === ']' && ($openBrace = strpos($key, '[', 1)) !== false)
|
||||
{
|
||||
if ($options['supportArrayValues'])
|
||||
{
|
||||
$array = true;
|
||||
$array_key = substr($key, $open_brace + 1, -1);
|
||||
$array = true;
|
||||
$arrayKey = substr($key, $openBrace + 1, -1);
|
||||
|
||||
// If we have a multi-dimensional array or malformed key
|
||||
if (strpos($array_key, '[') !== false || strpos($array_key, ']') !== false)
|
||||
if (strpos($arrayKey, '[') !== false || strpos($arrayKey, ']') !== false)
|
||||
{
|
||||
// Maybe throw exception?
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = substr($key, 0, $open_brace);
|
||||
$key = substr($key, 0, $openBrace);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -282,9 +282,9 @@ class Ini implements FormatInterface
|
|||
$obj->$section->$key = [];
|
||||
}
|
||||
|
||||
if (!empty($array_key))
|
||||
if (!empty($arrayKey))
|
||||
{
|
||||
$obj->$section->{$key}[$array_key] = $value;
|
||||
$obj->$section->{$key}[$arrayKey] = $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -305,9 +305,9 @@ class Ini implements FormatInterface
|
|||
$obj->$key = [];
|
||||
}
|
||||
|
||||
if (!empty($array_key))
|
||||
if (!empty($arrayKey))
|
||||
{
|
||||
$obj->{$key}[$array_key] = $value;
|
||||
$obj->{$key}[$arrayKey] = $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Registry Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -731,7 +731,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \
|
|||
*
|
||||
* @param string $separator The key separator.
|
||||
* @param array|object $data Data source of this scope.
|
||||
* @param array &$array The result array, it is pass by reference.
|
||||
* @param array $array The result array, it is passed by reference.
|
||||
* @param string $prefix Last level key prefix.
|
||||
*
|
||||
* @return void
|
||||
|
|
|
@ -66,7 +66,11 @@ class NativeStorage implements StorageInterface
|
|||
'use_trans_sid' => 0,
|
||||
];
|
||||
|
||||
session_cache_limiter('none');
|
||||
if (!headers_sent())
|
||||
{
|
||||
session_cache_limiter('none');
|
||||
}
|
||||
|
||||
session_register_shutdown();
|
||||
|
||||
$this->setOptions($options);
|
||||
|
|
|
@ -313,17 +313,17 @@ abstract class StringHelper
|
|||
*
|
||||
* Convert a string to an array.
|
||||
*
|
||||
* @param string $str UTF-8 encoded string to process
|
||||
* @param integer $split_len Number to characters to split string by
|
||||
* @param string $str UTF-8 encoded string to process
|
||||
* @param integer $splitLen Number to characters to split string by
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @link https://secure.php.net/str_split
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public static function str_split($str, $split_len = 1)
|
||||
public static function str_split($str, $splitLen = 1)
|
||||
{
|
||||
return utf8_str_split($str, $split_len);
|
||||
return utf8_str_split($str, $splitLen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -697,9 +697,9 @@ abstract class StringHelper
|
|||
/**
|
||||
* Transcode a string.
|
||||
*
|
||||
* @param string $source The string to transcode.
|
||||
* @param string $from_encoding The source encoding.
|
||||
* @param string $to_encoding The target encoding.
|
||||
* @param string $source The string to transcode.
|
||||
* @param string $fromEncoding The source encoding.
|
||||
* @param string $toEncoding The target encoding.
|
||||
*
|
||||
* @return mixed The transcoded string, or null if the source was not a string.
|
||||
*
|
||||
|
@ -707,18 +707,18 @@ abstract class StringHelper
|
|||
*
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public static function transcode($source, $from_encoding, $to_encoding)
|
||||
public static function transcode($source, $fromEncoding, $toEncoding)
|
||||
{
|
||||
if (is_string($source))
|
||||
{
|
||||
switch (ICONV_IMPL)
|
||||
{
|
||||
case 'glibc':
|
||||
return @iconv($from_encoding, $to_encoding . '//TRANSLIT,IGNORE', $source);
|
||||
return @iconv($fromEncoding, $toEncoding . '//TRANSLIT,IGNORE', $source);
|
||||
|
||||
case 'libiconv':
|
||||
default:
|
||||
return iconv($from_encoding, $to_encoding . '//IGNORE//TRANSLIT', $source);
|
||||
return iconv($fromEncoding, $toEncoding . '//IGNORE//TRANSLIT', $source);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ final class UriImmutable extends AbstractUri
|
|||
* @param string $name This is an immutable object, setting $name is not allowed.
|
||||
* @param mixed $value This is an immutable object, setting $value is not allowed.
|
||||
*
|
||||
* @return null This method always throws an exception.
|
||||
* @return void This method always throws an exception.
|
||||
*
|
||||
* @since 1.0
|
||||
* @throws \BadMethodCallException
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Part of the Joomla Framework Utilities Package
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
|
@ -90,15 +90,15 @@ final class ArrayHelper
|
|||
* Utility function to map an array to a string.
|
||||
*
|
||||
* @param array $array The array to map.
|
||||
* @param string $inner_glue The glue (optional, defaults to '=') between the key and the value.
|
||||
* @param string $outer_glue The glue (optional, defaults to ' ') between array elements.
|
||||
* @param string $innerGlue The glue (optional, defaults to '=') between the key and the value.
|
||||
* @param string $outerGlue The glue (optional, defaults to ' ') between array elements.
|
||||
* @param boolean $keepOuterKey True if final key should be kept.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public static function toString(array $array, $inner_glue = '=', $outer_glue = ' ', $keepOuterKey = false)
|
||||
public static function toString(array $array, $innerGlue = '=', $outerGlue = ' ', $keepOuterKey = false)
|
||||
{
|
||||
$output = [];
|
||||
|
||||
|
@ -112,21 +112,21 @@ final class ArrayHelper
|
|||
}
|
||||
|
||||
// This is value is an array, go and do it again!
|
||||
$output[] = static::toString($item, $inner_glue, $outer_glue, $keepOuterKey);
|
||||
$output[] = static::toString($item, $innerGlue, $outerGlue, $keepOuterKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output[] = $key . $inner_glue . '"' . $item . '"';
|
||||
$output[] = $key . $innerGlue . '"' . $item . '"';
|
||||
}
|
||||
}
|
||||
|
||||
return implode($outer_glue, $output);
|
||||
return implode($outerGlue, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to map an object to an array
|
||||
*
|
||||
* @param object $p_obj The source object
|
||||
* @param object $source The source object
|
||||
* @param boolean $recurse True to recurse through multi-level objects
|
||||
* @param string $regex An optional regular expression to match on field names
|
||||
*
|
||||
|
@ -134,11 +134,11 @@ final class ArrayHelper
|
|||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public static function fromObject($p_obj, $recurse = true, $regex = null)
|
||||
public static function fromObject($source, $recurse = true, $regex = null)
|
||||
{
|
||||
if (is_object($p_obj) || is_array($p_obj))
|
||||
if (is_object($source) || is_array($source))
|
||||
{
|
||||
return self::arrayFromObject($p_obj, $recurse, $regex);
|
||||
return self::arrayFromObject($source, $recurse, $regex);
|
||||
}
|
||||
|
||||
return [];
|
||||
|
@ -204,7 +204,7 @@ final class ArrayHelper
|
|||
*
|
||||
* @return array An array with the new column added to the source array
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.5.0
|
||||
* @see https://secure.php.net/manual/en/language.types.array.php
|
||||
*/
|
||||
public static function addColumn(array $array, array $column, $colName, $keyCol = null)
|
||||
|
@ -264,7 +264,7 @@ final class ArrayHelper
|
|||
*
|
||||
* @return array Column of values from the source array
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @since 1.5.0
|
||||
* @see https://secure.php.net/manual/en/language.types.array.php
|
||||
*/
|
||||
public static function dropColumn(array $array, $colName)
|
||||
|
@ -715,13 +715,12 @@ final class ArrayHelper
|
|||
/**
|
||||
* Merge array recursively.
|
||||
*
|
||||
* @param array $args Array list to be merge.
|
||||
* @param array ...$args Array list to be merged.
|
||||
*
|
||||
* @return array Merged array.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @since __DEPLOY_VERSION__
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function mergeRecursive(...$args): array
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user