-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJson.php
29 lines (20 loc) · 893 Bytes
/
Json.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php namespace components\coupons; if(!defined('TX')) die('No direct access.');
class Json extends \dependencies\BaseComponent
{
/*
# The Json.php file
This is where you define REST calls.
They are mostly used for asynchronous operations, such as jQuery.restForm.
If you need the operation to cause a pageload, you probably need the Actions.php file.
REST calls are prefixed based on the request type.
For example, calling ?rest=component_name/function_name using an HTTP GET request
calls get_function_name in the corresponding Json.php file.
The prefixes:
HTTP GET = get_function_name
HTTP PUT = update_function_name
HTTP POST = create_function_name
HTTP DELETE = delete_function_name
Read more about actions here:
https://github.com/Tuxion/tuxion.cms/wiki/Json.php
*/
}