diff --git a/composer.json b/composer.json index 9be74e02c5b..9ee3c67a396 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "ckeditor/ckeditor": "4.3.3", "mobiledetect/mobiledetectlib": "2.8.3", "phpoffice/phpexcel": "1.8.0", - "restler/framework": "3.0.*" + "restler/framework": "^3.0" }, "suggest": { "ext-mysqlnd": "To use with MySQL or MariaDB", diff --git a/composer.lock b/composer.lock index 2caa6674530..e22623b42e4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "86cc66f5180600a02d2de282ffeb69c4", + "hash": "e126d49246bc77b1d1296b54414e2cce", "packages": [ { "name": "ccampbell/chromephp", @@ -198,6 +198,80 @@ "xlsx" ], "time": "2014-03-02 15:22:49" + }, + { + "name": "restler/framework", + "version": "3.0.0", + "target-dir": "Luracast/Restler", + "source": { + "type": "git", + "url": "https://github.com/Luracast/Restler-Framework.git", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "replace": { + "luracast/restler": "3.*" + }, + "require-dev": { + "bshaffer/oauth2-server-php": "v1.0", + "luracast/explorer": "*", + "mustache/mustache": "dev-master", + "rodneyrehm/plist": "dev-master", + "symfony/yaml": "*", + "twig/twig": "v1.13.0", + "zendframework/zendamf": "dev-master" + }, + "suggest": { + "bshaffer/oauth2-server-php": "Restler can provide OAuth2 authentication using this library (see require-dev for details)", + "luracast/explorer": "Restler's very own api explorer (see require-dev for details)", + "mustache/mustache": "Restler can render HtmlView using mustache/handlebar templates (see require-dev for details)", + "rodneyrehm/plist": "Restler supports tho Apple plist xml format (see require-dev for details)", + "symfony/yaml": "Restler can produce content in yaml format as well (see require-dev for details)", + "twig/twig": "Restler can render HtmlView using twig templates (see require-dev for details)", + "zendframework/zendamf": "Support for the amf document format (see require-dev for details)" + }, + "type": "library", + "extra": { + "branch-alias": { + "master": "v3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Luracast\\Restler": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Luracast", + "email": "arul@luracast.com" + }, + { + "name": "Nick nickl- Lombard", + "email": "github@jigsoft.co.za" + } + ], + "description": "Just the Restler Framework without the tests and examples", + "homepage": "http://luracast.com/products/restler/", + "keywords": [ + "api", + "framework", + "rest", + "server" + ], + "time": "2015-08-04 07:52:49" } ], "packages-dev": [], diff --git a/htdocs/includes/composer/autoload_namespaces.php b/htdocs/includes/composer/autoload_namespaces.php index 423ed4ce05f..5ff83246d01 100644 --- a/htdocs/includes/composer/autoload_namespaces.php +++ b/htdocs/includes/composer/autoload_namespaces.php @@ -7,6 +7,7 @@ $baseDir = dirname(dirname($vendorDir)); return array( 'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'), + 'Luracast\\Restler' => array($vendorDir . '/restler/framework'), 'Detection' => array($vendorDir . '/mobiledetect/mobiledetectlib/namespaced'), 'ChromePhp' => array($vendorDir . '/ccampbell/chromephp'), ); diff --git a/htdocs/includes/composer/installed.json b/htdocs/includes/composer/installed.json index 02496117565..77b044d0eeb 100644 --- a/htdocs/includes/composer/installed.json +++ b/htdocs/includes/composer/installed.json @@ -199,5 +199,81 @@ "xls", "xlsx" ] + }, + { + "name": "restler/framework", + "version": "3.0.0", + "version_normalized": "3.0.0.0", + "target-dir": "Luracast/Restler", + "source": { + "type": "git", + "url": "https://github.com/Luracast/Restler-Framework.git", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "replace": { + "luracast/restler": "3.*" + }, + "require-dev": { + "bshaffer/oauth2-server-php": "v1.0", + "luracast/explorer": "*", + "mustache/mustache": "dev-master", + "rodneyrehm/plist": "dev-master", + "symfony/yaml": "*", + "twig/twig": "v1.13.0", + "zendframework/zendamf": "dev-master" + }, + "suggest": { + "bshaffer/oauth2-server-php": "Restler can provide OAuth2 authentication using this library (see require-dev for details)", + "luracast/explorer": "Restler's very own api explorer (see require-dev for details)", + "mustache/mustache": "Restler can render HtmlView using mustache/handlebar templates (see require-dev for details)", + "rodneyrehm/plist": "Restler supports tho Apple plist xml format (see require-dev for details)", + "symfony/yaml": "Restler can produce content in yaml format as well (see require-dev for details)", + "twig/twig": "Restler can render HtmlView using twig templates (see require-dev for details)", + "zendframework/zendamf": "Support for the amf document format (see require-dev for details)" + }, + "time": "2015-08-04 07:52:49", + "type": "library", + "extra": { + "branch-alias": { + "master": "v3.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Luracast\\Restler": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Luracast", + "email": "arul@luracast.com" + }, + { + "name": "Nick nickl- Lombard", + "email": "github@jigsoft.co.za" + } + ], + "description": "Just the Restler Framework without the tests and examples", + "homepage": "http://luracast.com/products/restler/", + "keywords": [ + "api", + "framework", + "rest", + "server" + ] } ] diff --git a/htdocs/includes/restler/composer.lock b/htdocs/includes/restler/composer.lock deleted file mode 100644 index 914abc5e16d..00000000000 --- a/htdocs/includes/restler/composer.lock +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "ee84444dcf34101555d20a813d528c44", - "packages": [], - "packages-dev": null, - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "rodneyrehm/plist": 20, - "zendframework/zendamf": 20, - "mustache/mustache": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.0" - }, - "platform-dev": [] -} diff --git a/htdocs/includes/restler/ApcCache.php b/htdocs/includes/restler/framework/Luracast/Restler/ApcCache.php similarity index 100% rename from htdocs/includes/restler/ApcCache.php rename to htdocs/includes/restler/framework/Luracast/Restler/ApcCache.php diff --git a/htdocs/includes/restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php similarity index 100% rename from htdocs/includes/restler/AutoLoader.php rename to htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php diff --git a/htdocs/includes/restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php similarity index 100% rename from htdocs/includes/restler/CommentParser.php rename to htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php diff --git a/htdocs/includes/restler/Compose.php b/htdocs/includes/restler/framework/Luracast/Restler/Compose.php similarity index 100% rename from htdocs/includes/restler/Compose.php rename to htdocs/includes/restler/framework/Luracast/Restler/Compose.php diff --git a/htdocs/includes/restler/Data/ApiMethodInfo.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php similarity index 100% rename from htdocs/includes/restler/Data/ApiMethodInfo.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php diff --git a/htdocs/includes/restler/Data/Arr.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php similarity index 100% rename from htdocs/includes/restler/Data/Arr.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php diff --git a/htdocs/includes/restler/Data/Invalid.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php similarity index 100% rename from htdocs/includes/restler/Data/Invalid.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php diff --git a/htdocs/includes/restler/Data/Object.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Object.php similarity index 100% rename from htdocs/includes/restler/Data/Object.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/Object.php diff --git a/htdocs/includes/restler/Data/String.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/String.php similarity index 100% rename from htdocs/includes/restler/Data/String.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/String.php diff --git a/htdocs/includes/restler/Data/ValidationInfo.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php similarity index 100% rename from htdocs/includes/restler/Data/ValidationInfo.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php diff --git a/htdocs/includes/restler/Data/Validator.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php similarity index 100% rename from htdocs/includes/restler/Data/Validator.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php diff --git a/htdocs/includes/restler/Data/ValueObject.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php similarity index 100% rename from htdocs/includes/restler/Data/ValueObject.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php diff --git a/htdocs/includes/restler/Data/iValidate.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php similarity index 100% rename from htdocs/includes/restler/Data/iValidate.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php diff --git a/htdocs/includes/restler/Data/iValueObject.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php similarity index 100% rename from htdocs/includes/restler/Data/iValueObject.php rename to htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php diff --git a/htdocs/includes/restler/Defaults.php b/htdocs/includes/restler/framework/Luracast/Restler/Defaults.php similarity index 100% rename from htdocs/includes/restler/Defaults.php rename to htdocs/includes/restler/framework/Luracast/Restler/Defaults.php diff --git a/htdocs/includes/restler/EventDispatcher.php b/htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php similarity index 100% rename from htdocs/includes/restler/EventDispatcher.php rename to htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php diff --git a/htdocs/includes/restler/Filter/RateLimit.php b/htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php similarity index 100% rename from htdocs/includes/restler/Filter/RateLimit.php rename to htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php diff --git a/htdocs/includes/restler/Flash.php b/htdocs/includes/restler/framework/Luracast/Restler/Flash.php similarity index 100% rename from htdocs/includes/restler/Flash.php rename to htdocs/includes/restler/framework/Luracast/Restler/Flash.php diff --git a/htdocs/includes/restler/Format/AmfFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php similarity index 100% rename from htdocs/includes/restler/Format/AmfFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php diff --git a/htdocs/includes/restler/Format/CsvFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php similarity index 100% rename from htdocs/includes/restler/Format/CsvFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php diff --git a/htdocs/includes/restler/Format/Format.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php similarity index 100% rename from htdocs/includes/restler/Format/Format.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php diff --git a/htdocs/includes/restler/Format/HtmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php similarity index 100% rename from htdocs/includes/restler/Format/HtmlFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php diff --git a/htdocs/includes/restler/Format/JsFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php similarity index 100% rename from htdocs/includes/restler/Format/JsFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php diff --git a/htdocs/includes/restler/Format/JsonFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php similarity index 100% rename from htdocs/includes/restler/Format/JsonFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php diff --git a/htdocs/includes/restler/Format/MultiFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php similarity index 100% rename from htdocs/includes/restler/Format/MultiFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php diff --git a/htdocs/includes/restler/Format/PlistFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php similarity index 100% rename from htdocs/includes/restler/Format/PlistFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php diff --git a/htdocs/includes/restler/Format/TsvFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php similarity index 100% rename from htdocs/includes/restler/Format/TsvFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php diff --git a/htdocs/includes/restler/Format/UploadFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php similarity index 100% rename from htdocs/includes/restler/Format/UploadFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php diff --git a/htdocs/includes/restler/Format/UrlEncodedFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php similarity index 100% rename from htdocs/includes/restler/Format/UrlEncodedFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php diff --git a/htdocs/includes/restler/Format/XmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php similarity index 100% rename from htdocs/includes/restler/Format/XmlFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php diff --git a/htdocs/includes/restler/Format/YamlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php similarity index 100% rename from htdocs/includes/restler/Format/YamlFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php diff --git a/htdocs/includes/restler/Format/iDecodeStream.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php similarity index 100% rename from htdocs/includes/restler/Format/iDecodeStream.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php diff --git a/htdocs/includes/restler/Format/iFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php similarity index 100% rename from htdocs/includes/restler/Format/iFormat.php rename to htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php diff --git a/htdocs/includes/restler/HumanReadableCache.php b/htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php similarity index 100% rename from htdocs/includes/restler/HumanReadableCache.php rename to htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php diff --git a/htdocs/includes/restler/README.md b/htdocs/includes/restler/framework/Luracast/Restler/README.md similarity index 100% rename from htdocs/includes/restler/README.md rename to htdocs/includes/restler/framework/Luracast/Restler/README.md diff --git a/htdocs/includes/restler/Redirect.php b/htdocs/includes/restler/framework/Luracast/Restler/Redirect.php similarity index 100% rename from htdocs/includes/restler/Redirect.php rename to htdocs/includes/restler/framework/Luracast/Restler/Redirect.php diff --git a/htdocs/includes/restler/Resources.php b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php similarity index 100% rename from htdocs/includes/restler/Resources.php rename to htdocs/includes/restler/framework/Luracast/Restler/Resources.php diff --git a/htdocs/includes/restler/RestException.php b/htdocs/includes/restler/framework/Luracast/Restler/RestException.php similarity index 100% rename from htdocs/includes/restler/RestException.php rename to htdocs/includes/restler/framework/Luracast/Restler/RestException.php diff --git a/htdocs/includes/restler/Restler.php b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php similarity index 100% rename from htdocs/includes/restler/Restler.php rename to htdocs/includes/restler/framework/Luracast/Restler/Restler.php diff --git a/htdocs/includes/restler/Routes.php b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php similarity index 99% rename from htdocs/includes/restler/Routes.php rename to htdocs/includes/restler/framework/Luracast/Restler/Routes.php index 74a02eba935..5b1128cb54c 100644 --- a/htdocs/includes/restler/Routes.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php @@ -551,7 +551,7 @@ class Routes $name = $prop->getName(); $child = array('name' => $name); if ($c = $prop->getDocComment()) { - $child += Util::nestedValue(CommentParser::parse($c), 'var'); + $child += Util::nestedValue(CommentParser::parse($c), 'var') ?: array(); } else { $o = $class->newInstance(); $p = $prop->getValue($o); diff --git a/htdocs/includes/restler/Scope.php b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php similarity index 100% rename from htdocs/includes/restler/Scope.php rename to htdocs/includes/restler/framework/Luracast/Restler/Scope.php diff --git a/htdocs/includes/restler/UI/Emmet.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php similarity index 100% rename from htdocs/includes/restler/UI/Emmet.php rename to htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php diff --git a/htdocs/includes/restler/UI/FormStyles.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/FormStyles.php similarity index 100% rename from htdocs/includes/restler/UI/FormStyles.php rename to htdocs/includes/restler/framework/Luracast/Restler/UI/FormStyles.php diff --git a/htdocs/includes/restler/UI/Forms.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php similarity index 100% rename from htdocs/includes/restler/UI/Forms.php rename to htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php diff --git a/htdocs/includes/restler/UI/Nav.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php similarity index 100% rename from htdocs/includes/restler/UI/Nav.php rename to htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php diff --git a/htdocs/includes/restler/UI/Tags.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php similarity index 100% rename from htdocs/includes/restler/UI/Tags.php rename to htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php diff --git a/htdocs/includes/restler/User.php b/htdocs/includes/restler/framework/Luracast/Restler/User.php similarity index 100% rename from htdocs/includes/restler/User.php rename to htdocs/includes/restler/framework/Luracast/Restler/User.php diff --git a/htdocs/includes/restler/Util.php b/htdocs/includes/restler/framework/Luracast/Restler/Util.php similarity index 100% rename from htdocs/includes/restler/Util.php rename to htdocs/includes/restler/framework/Luracast/Restler/Util.php diff --git a/htdocs/includes/restler/compatibility/iAuthenticate.php b/htdocs/includes/restler/framework/Luracast/Restler/compatibility/iAuthenticate.php similarity index 100% rename from htdocs/includes/restler/compatibility/iAuthenticate.php rename to htdocs/includes/restler/framework/Luracast/Restler/compatibility/iAuthenticate.php diff --git a/htdocs/includes/restler/compatibility/restler1.php b/htdocs/includes/restler/framework/Luracast/Restler/compatibility/restler1.php similarity index 100% rename from htdocs/includes/restler/compatibility/restler1.php rename to htdocs/includes/restler/framework/Luracast/Restler/compatibility/restler1.php diff --git a/htdocs/includes/restler/compatibility/restler2.php b/htdocs/includes/restler/framework/Luracast/Restler/compatibility/restler2.php similarity index 100% rename from htdocs/includes/restler/compatibility/restler2.php rename to htdocs/includes/restler/framework/Luracast/Restler/compatibility/restler2.php diff --git a/htdocs/includes/restler/composer.json b/htdocs/includes/restler/framework/Luracast/Restler/composer.json similarity index 100% rename from htdocs/includes/restler/composer.json rename to htdocs/includes/restler/framework/Luracast/Restler/composer.json diff --git a/htdocs/includes/restler/iAuthenticate.php b/htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php similarity index 100% rename from htdocs/includes/restler/iAuthenticate.php rename to htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php diff --git a/htdocs/includes/restler/iCache.php b/htdocs/includes/restler/framework/Luracast/Restler/iCache.php similarity index 100% rename from htdocs/includes/restler/iCache.php rename to htdocs/includes/restler/framework/Luracast/Restler/iCache.php diff --git a/htdocs/includes/restler/iCompose.php b/htdocs/includes/restler/framework/Luracast/Restler/iCompose.php similarity index 100% rename from htdocs/includes/restler/iCompose.php rename to htdocs/includes/restler/framework/Luracast/Restler/iCompose.php diff --git a/htdocs/includes/restler/iFilter.php b/htdocs/includes/restler/framework/Luracast/Restler/iFilter.php similarity index 100% rename from htdocs/includes/restler/iFilter.php rename to htdocs/includes/restler/framework/Luracast/Restler/iFilter.php diff --git a/htdocs/includes/restler/iIdentifyUser.php b/htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php similarity index 100% rename from htdocs/includes/restler/iIdentifyUser.php rename to htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php diff --git a/htdocs/includes/restler/iProvideMultiVersionApi.php b/htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php similarity index 100% rename from htdocs/includes/restler/iProvideMultiVersionApi.php rename to htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php diff --git a/htdocs/includes/restler/iUseAuthentication.php b/htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php similarity index 100% rename from htdocs/includes/restler/iUseAuthentication.php rename to htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php diff --git a/htdocs/includes/restler/views/debug.css b/htdocs/includes/restler/framework/Luracast/Restler/views/debug.css similarity index 100% rename from htdocs/includes/restler/views/debug.css rename to htdocs/includes/restler/framework/Luracast/Restler/views/debug.css diff --git a/htdocs/includes/restler/views/debug.php b/htdocs/includes/restler/framework/Luracast/Restler/views/debug.php similarity index 100% rename from htdocs/includes/restler/views/debug.php rename to htdocs/includes/restler/framework/Luracast/Restler/views/debug.php diff --git a/htdocs/includes/restler/vendor/autoload.php b/htdocs/includes/restler/vendor/autoload.php deleted file mode 100644 index bf60b992d40..00000000000 --- a/htdocs/includes/restler/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - private $classMapAuthoritative = false; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/htdocs/includes/restler/vendor/composer/autoload_classmap.php b/htdocs/includes/restler/vendor/composer/autoload_classmap.php deleted file mode 100644 index 7a91153b0d8..00000000000 --- a/htdocs/includes/restler/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($baseDir . '/'), -); diff --git a/htdocs/includes/restler/vendor/composer/autoload_psr4.php b/htdocs/includes/restler/vendor/composer/autoload_psr4.php deleted file mode 100644 index b265c64a22f..00000000000 --- a/htdocs/includes/restler/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,9 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - spl_autoload_register(array('ComposerAutoloaderInite65e15efc7e9ea1f2b7ba7fa697ba485', 'autoload'), true, true); - - $loader->register(true); - - return $loader; - } - - public static function autoload($class) - { - $dir = dirname(dirname(__DIR__)) . '/'; - $prefixes = array('Luracast\\Restler'); - foreach ($prefixes as $prefix) { - if (0 !== strpos($class, $prefix)) { - continue; - } - $path = $dir . implode('/', array_slice(explode('\\', $class), 2)).'.php'; - if (!$path = stream_resolve_include_path($path)) { - return false; - } - require $path; - - return true; - } - } -} - -function composerRequiree65e15efc7e9ea1f2b7ba7fa697ba485($file) -{ - require $file; -} diff --git a/htdocs/includes/restler/vendor/composer/installed.json b/htdocs/includes/restler/vendor/composer/installed.json deleted file mode 100644 index fe51488c706..00000000000 --- a/htdocs/includes/restler/vendor/composer/installed.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/htdocs/public/api/index.php b/htdocs/public/api/index.php index f78424ce6a9..24bd3715726 100644 --- a/htdocs/public/api/index.php +++ b/htdocs/public/api/index.php @@ -31,7 +31,7 @@ $res=0; if (! $res && file_exists("../../main.inc.php")) $res=include '../../main.inc.php'; if (! $res) die("Include of main fails"); -require_once DOL_DOCUMENT_ROOT.'/includes/restler/vendor/autoload.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php'; require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';