This commit is contained in:
Xes
2025-08-14 22:41:49 +02:00
parent 2de81ccc46
commit 8ce45119b6
39774 changed files with 4309466 additions and 0 deletions

2
vendor/php-xapi/exception/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
composer.lock
vendor

22
vendor/php-xapi/exception/CHANGELOG.md vendored Normal file
View File

@@ -0,0 +1,22 @@
CHANGELOG
=========
0.2.0
-----
* Added `StatementIdAlreadyExistsException`.
* Added `UnsupportedStatementVersionException`.
0.1.1
-----
Added `conflict` rule to Composer config to prevent having two packages that
provide the same classes.
0.1.0
-----
This is a first release containing common exception classes that can be used by
both xAPI servers and clients.
This package replaces the `xabbuh/xapi-common` package which is now deprecated.

19
vendor/php-xapi/exception/LICENSE vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2014-2018 Christian Flothmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

9
vendor/php-xapi/exception/README.md vendored Normal file
View File

@@ -0,0 +1,9 @@
Xabbuh xApi Common
==================
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/php-xapi/exception/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/php-xapi/exception/?branch=master)
Package providing common functionality for both server and client side implementations
of the [Experience API](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md).
This package replaces the `xabbuh/xapi-common` package.

30
vendor/php-xapi/exception/composer.json vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "php-xapi/exception",
"type": "library",
"description": "common exception classes for Experience API implementations",
"keywords": ["xAPI", "Experience API", "Tin Can API", "exception"],
"homepage": "https://github.com/php-xapi/exception",
"license": "MIT",
"authors": [
{
"name": "Christian Flothmann",
"homepage": "https://github.com/xabbuh"
}
],
"require": {
"php": ">=5.3.0"
},
"conflict": {
"xabbuh/xapi-common": "*"
},
"autoload": {
"psr-4": {
"Xabbuh\\XApi\\Common\\Exception\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-master": "0.2.x-dev"
}
}
}

View File

@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Exception indicating authentication or authorization failures.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class AccessDeniedException extends XApiException
{
}

View File

@@ -0,0 +1,26 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Exception indicating an error due to a conflict with the current state of
* a resource.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class ConflictException extends XApiException
{
public function __construct($message)
{
parent::__construct($message, 409);
}
}

View File

@@ -0,0 +1,25 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* More specific xAPI exception indicating that a resource could not be found.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class NotFoundException extends XApiException
{
public function __construct($message)
{
parent::__construct($message, 404);
}
}

View File

@@ -0,0 +1,25 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Statement id already exists exception.
*
* @author Jérôme Parmentier <jerome.parmentier@acensi.fr>
*/
class StatementIdAlreadyExistsException extends XApiException
{
public function __construct($statementId, \Exception $previous = null)
{
parent::__construct(sprintf('A statement with ID "%s" already exists.', $statementId), 0, $previous);
}
}

View File

@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Unsupported operation exception.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class UnsupportedOperationException extends XApiException
{
}

View File

@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Unsupported statement version exception.
*
* @author Jérôme Parmentier <jerome.parmentier@acensi.fr>
*/
class UnsupportedStatementVersionException extends XApiException
{
}

View File

@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Common\Exception;
/**
* Experience API exceptions.
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class XApiException extends \Exception
{
}