mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
V 3.5 RC 1
This commit is contained in:
33
lib/classes/API/V1/exception/abstract.class.php
Normal file
33
lib/classes/API/V1/exception/abstract.class.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
abstract class API_V1_exception_abstract extends Exception
|
||||
{
|
||||
|
||||
protected static $details;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function get_details()
|
||||
{
|
||||
return static::$details;
|
||||
}
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/badrequest.class.php
Normal file
23
lib/classes/API/V1/exception/badrequest.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_badrequest extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'Parameter is invalid or missing';
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/forbidden.class.php
Normal file
23
lib/classes/API/V1/exception/forbidden.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_forbidden extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'Access to the requested ressource is forbidden';
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/internalservererror.class.php
Normal file
23
lib/classes/API/V1/exception/internalservererror.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_internalservererror extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'Internal Server Error';
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/methodnotallowed.class.php
Normal file
23
lib/classes/API/V1/exception/methodnotallowed.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_methodnotallowed extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'Attempting to use POST with a GET-only endpoint, or vice-versa';
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/notfound.class.php
Normal file
23
lib/classes/API/V1/exception/notfound.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_notfound extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'Requested ressource is not found';
|
||||
|
||||
}
|
23
lib/classes/API/V1/exception/unauthorized.class.php
Normal file
23
lib/classes/API/V1/exception/unauthorized.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package APIv1
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class API_V1_exception_unauthorized extends API_V1_exception_abstract
|
||||
{
|
||||
|
||||
protected static $details = 'The OAuth token was provided but was invalid.';
|
||||
|
||||
}
|
Reference in New Issue
Block a user