<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CodeIgniter Rest Controller
* A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.
*
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author Phil Sturgeon, Chris Kacerguis
* @license MIT
* @link https://github.com/chriskacerguis/codeigniter-restserver
* @version 3.0.0
*/
abstract class REST_Controller extends CI_Controller {
// Note: Only the widely used HTTP status codes are documented
// Informational
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
// Success
/**
* The request has succeeded
*/
const HTTP_OK = 200;
/**
* The server successfully created a new resource
*/
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
/**
* The server successfully processed the request, though no content is returned
*/
const HTTP_NO_CONTENT = 204;
const HTTP_RESET_CONTENT = 205;
const HTTP_PARTIAL_CONTENT = 206;
const HTTP_MULTI_STATUS = 207; // RFC4918
const HTTP_ALREADY_REPORTED = 208; // RFC5842
const HTTP_IM_USED = 226; // RFC3229
// Redirection
const HTTP_MULTIPLE_CHOICES = 300;
const HTTP_MOVED_PERMANENTLY = 301;
const HTTP_FOUND = 302;
const HTTP_SEE_OTHER = 303;
/**
* The resource has not been modified since the last request
*/
const HTTP_NOT_MODIFIED = 304;
const HTTP_USE_PROXY = 305;
const HTTP_RESERVED = 306;
const HTTP_TEMPORARY_REDIRECT = 307;
const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
// Client Error
/**
* The request cannot be fulfilled due to multiple errors
*/
const HTTP_BAD_REQUEST = 400;
/**
* The user is unauthorized to access the requested resource
*/
const HTTP_UNAUTHORIZED = 401;
const HTTP_PAYMENT_REQUIRED = 402;
/**
* The requested resource is unavailable at this present time
*/
const HTTP_FORBIDDEN = 403;
/**
* The requested resource could not be found
*
* Note: This is sometimes used to mask if there was an UNAUTHORIZED (401) or
* FORBIDDEN (403) error, for security reasons
*/
const HTTP_NOT_FOUND = 404;
/**
* The request method is not supported by the following resource
*/
const HTTP_METHOD_NOT_ALLOWED = 405;
/**
* The request was not acceptable
*/
const HTTP_NOT_ACCEPTABLE = 406;
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
const HTTP_REQUEST_TIMEOUT = 408;
/**
* The request could not be completed due to a conflict with the current state
* of the resource
*/
const HTTP_CONFLICT = 409;
const HTTP_GONE = 410;
const HTTP_LENGTH_REQUIRED = 411;
const HTTP_PRECONDITION_FAILED = 412;
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
const HTTP_REQUEST_URI_TOO_LONG = 414;
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
const HTTP_EXPECTATION_FAILED = 417;
const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
const HTTP_LOCKED = 423; // RFC4918
const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817
const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
// Server Error
/**
* The server encountered an unexpected error
*
* Note: This is a generic error message when no specific message
* is suitable
*/
const HTTP_INTERNAL_SERVER_ERROR = 500;
/**
* The server does not recognise the request method
*/
const HTTP_NOT_IMPLEMENTED = 501;
const HTTP_BAD_GATEWAY = 502;
const HTTP_SERVICE_UNAVAILABLE = 503;
const HTTP_GATEWAY_TIMEOUT = 504;
const HTTP_VERSION_NOT_SUPPORTED = 505;
const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
const HTTP_LOOP_DETECTED = 508; // RFC5842
const HTTP_NOT_EXTENDED = 510; // RFC2774
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511;
/**
* This defines the rest format.
* Must be overridden it in a controller so that it is set.
*
* @var string|NULL
*/
protected $rest_format = NULL;
/**
* Defines the list of method properties such as limit, log and level
*
* @var array
*/
protected $methods = [];
/**
* List of allowed HTTP methods
*
* @var array
*/
protected $allowed_http_methods = ['get', 'delete', 'post', 'put', 'options', 'patch', 'head'];
/**
* Contains details about the request
* Fields: body, format, method, ssl
* Note: This is a dynamic object (stdClass)
*
* @var object
*/
protected $request = NULL;
/**
* Contains details about the response
* Fields: format, lang
* Note: This is a dynamic object (stdClass)
*
* @var object
*/
protected $response = NULL;
/**
* Contains details about the REST API
* Fields: db, ignore_limits, key, level, user_id
* Note: This is a dynamic object (stdClass)
*
* @var object
*/
protected $rest = NULL;
/**
* The arguments for the GET request method
*
* @var array
*/
protected $_get_args = [];
/**
* The arguments for the POST request method
*
* @var array
*/
protected $_post_args = [];
/**
* The insert_id of the log entry (if we have one)
*
* @var string
*/
protected $_insert_id = '';
/**
* The arguments for the PUT request method
*
* @var array
*/
protected $_put_args = [];
/**
* The arguments for the DELETE request method
*
* @var array
*/
protected $_delete_args = [];
/**
* The arguments for the PATCH request method
*
* @var array
*/
protected $_patch_args = [];
/**
* The arguments for the HEAD request method
*
* @var array
*/
protected $_head_args = [];
/**
* The arguments for the OPTIONS request method
*
* @var array
*/
protected $_options_args = [];
/**
* The arguments for the query parameters
*
* @var array
*/
protected $_query_args = [];
/**
* The arguments from GET, POST, PUT, DELETE, PATCH, HEAD and OPTIONS request methods combined
*
* @var array
*/
protected $_args = [];
/**
* If the request is allowed based on the API key provided.
*
* @var bool
*/
protected $_allow = TRUE;
/**
* The LDAP Distinguished Name of the User post authentication
*
* @var string
*/
protected $_user_ldap_dn = '';
/**
* The start of the response time from the server
*
* @var string
*/
protected $_start_rtime = '';
/**
* The end of the response time from the server
*
* @var string
*/
protected $_end_rtime
没有合适的资源?快使用搜索试试~ 我知道了~
使用PHP开发的一个云收银系统,适用于餐饮行业。.zip
共654个文件
php:241个
html:200个
png:91个
1 下载量 151 浏览量
2024-01-18
11:44:21
上传
评论
收藏 3.34MB ZIP 举报
温馨提示
软件开发设计:PHP、应用软件开发、系统软件开发、移动应用开发、网站开发C++、Java、python、web、C#等语言的项目开发与学习资料 硬件与设备:单片机、EDA、proteus、RTOS、包括计算机硬件、服务器、网络设备、存储设备、移动设备等 操作系统:LInux、IOS、树莓派、安卓开发、微机操作系统、网络操作系统、分布式操作系统等。此外,还有嵌入式操作系统、智能操作系统等。 网络与通信:数据传输、信号处理、网络协议、网络与通信硬件、网络安全网络与通信是一个非常广泛的领域,它涉及到计算机科学、电子工程、数学等多个学科的知识。 云计算与大数据:数据集、包括云计算平台、大数据分析、人工智能、机器学习等,云计算是一种基于互联网的计算方式,通过这种方式,共享的软硬件资源和信息可以按需提供给计算机和其他设备。
资源推荐
资源详情
资源评论
收起资源包目录
使用PHP开发的一个云收银系统,适用于餐饮行业。.zip (654个子文件)
bootstrap.css 144KB
bootstrap.min.css 120KB
theme.css 87KB
buttons.css 79KB
jquery-ui-1.10.0.custom.css 59KB
jquery-ui-1.9.2.custom.css 58KB
font-awesome.css 32KB
font-awesome.min.css 26KB
bootstrap-theme.css 26KB
bootstrap-theme.min.css 23KB
_all.css 20KB
_all.css 14KB
_all.css 14KB
_all.css 12KB
basic.css 8KB
pygments.css 4KB
badge_only.css 3KB
purple.css 2KB
yellow.css 2KB
orange.css 2KB
green.css 2KB
pink.css 2KB
blue.css 2KB
grey.css 2KB
aero.css 2KB
red.css 2KB
line.css 2KB
all.css 2KB
purple.css 2KB
orange.css 2KB
yellow.css 2KB
purple.css 2KB
orange.css 2KB
yellow.css 2KB
green.css 2KB
green.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
red.css 1KB
red.css 1KB
minimal.css 1KB
polaris.css 1KB
square.css 1KB
purple.css 1KB
orange.css 1KB
yellow.css 1KB
green.css 1KB
pink.css 1KB
blue.css 1KB
grey.css 1KB
aero.css 1KB
futurico.css 1KB
red.css 1KB
flat.css 1KB
jquery.ui.1.10.0.ie.css 507B
jquery.ui.1.9.2.ie.css 507B
patch.css 431B
cover.css 216B
fontawesome-webfont.eot 67KB
fontawesome-webfont.eot 37KB
glyphicons-halflings-regular.eot 20KB
appflowchart.gif 25KB
smile.gif 1KB
ajax-loader.gif 673B
.gitignore 505B
.gitkeep 0B
.htaccess 123B
.htaccess 123B
.htaccess 117B
changelog.html 273KB
query_builder.html 170KB
form_validation.html 130KB
sessions.html 104KB
genindex.html 96KB
form_helper.html 92KB
upgrade_300.html 76KB
xmlrpc.html 67KB
styleguide.html 62KB
encryption.html 62KB
input.html 62KB
loader.html 62KB
db_driver_reference.html 60KB
email.html 60KB
results.html 58KB
html_helper.html 58KB
date_helper.html 58KB
image_lib.html 57KB
table.html 56KB
forge.html 54KB
cart.html 54KB
file_uploading.html 52KB
trackback.html 50KB
url_helper.html 50KB
ftp.html 49KB
共 654 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功