Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • Accordion
  • ApiController
  • ArrayTool
  • CKEditor
  • Collection
  • Config
  • Controller
  • Country
  • Csv
  • Curl
  • Currency
  • Database
  • DataTable
  • Date
  • DOMNode
  • DOMParser
  • Email
  • File
  • Files
  • Form
  • Grid
  • Html
  • Htmldoc
  • HtmlTable
  • Image
  • InputItem
  • Inputs
  • KBase
  • Language
  • ListItem
  • Login
  • Menu
  • Mime
  • Model
  • Number
  • ObjectTool
  • Password
  • Pdf
  • Province
  • Router
  • Session
  • Singleton
  • Tab
  • TableRow
  • Template
  • Text
  • Validator
  • View

Exceptions

  • ApiException
  • InputItemException
  • Overview
  • Namespace
  • Class
  • Tree

Class ApiController

API Controller base class

Kotchasan\KBase
Extended by Kotchasan\ApiController
Namespace: Kotchasan
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/ApiController.php
Methods summary
public JSON
# index( Kotchasan\Http\Request $request )

แม่แบบคอนโทรลเลอร์ สำหรับ API

แม่แบบคอนโทรลเลอร์ สำหรับ API

Parameters

$request

Returns

JSON
public static boolean
# validateToken( string $token )

ตรวจสอบ Token สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid token

ตรวจสอบ Token สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid token

Parameters

$token

Returns

boolean
public static boolean
# validateTokenBearer( Kotchasan\Http\Request $request )

ตรวจสอบ Token Bearer สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid token

ตรวจสอบ Token Bearer สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid token

Parameters

$request

Returns

boolean
public static boolean
# validateSign( $params )

ตรวจสอบ sign สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid sign

ตรวจสอบ sign สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Invalid sign

Parameters

$params

Returns

boolean
public static boolean
# validateMethod( Kotchasan\Http\Request $request, string $method )

ตรวจสอบ Method สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Method not allowed

ตรวจสอบ Method สำเร็จ คืนค่า true ไม่สำเร็จคืนค่าข้อผิดพลาด ApiException Method not allowed

Parameters

$request
$method
Method เช่น POST GET PUT DELETE OPTIONS

Returns

boolean
Properties inherited from Kotchasan\KBase
$cfg, $request
Kotchasan API documentation generated by ApiGen