Kotchasan
Packages
Interfaces, Classes and Traits
- Accordion
- Accordion class for creating HTML accordions.
- ApiController
- API Controller base class for handling API requests.
- ApiException
- Exception class for handling API errors.
- ArrayTool
- Array function class
- ApcCache
- APC cache driver
- Cache
- Kotchasan Caching Class (base class)
- CacheItem
- This class represents a cache item that implements the PSR-16 CacheItemInterface.
- Exception
- Cache Exception class
- FileCache
- This class provides functionality for caching data to the filesystem.
- CKEditor
- This class provides functions to work with CKEditor.
- Collection
- Collection Class
- Config
- Configuration class for loading and managing config settings.
- Controller
- Controller base class
- Country
- Country Names sorted by Thai name.
- Csv
- CSV Utility Class
- Curl
- Curl Class
- Currency
- Convert numbers to currency format (Baht, Dollar)
- Db
- Database base class
- DbCache
- Provides caching functionality for database query results.
- Driver
- Kotchasan Database driver Class (base class)
- Exception
- Database Exception class
- PdoMysqlDriver
- PDO MySQL Database Adapter Class.
- Query
- Database Query (base class)
- QueryBuilder
- SQL Query builder
- Schema
- Database schema class
- Sql
- SQL Function
- Database
- This class provides methods for creating and managing database connections.
- DataTable
- Class for managing data presentation from a Model in table format.
- Date
- Class for managing dates and times.
- DOMNode
- Class representing a DOM Node.
- DOMParser
- Class for DOM Parsing.
- Email class for sending emails.
- File
- Class for managing files and directories.
- Files
- Class Files An array-based collection of files.
- Form
- Form class
- Grid
- This class represents a grid system used for layout purposes.
- Html
- HTML class
- Htmldoc
- Convert HTML to MS Word file
- HtmlTable
- HTML table class
- TableRow
- HTML table row class
- Image
- Class Image A class for image manipulation.
- InputItem
- Input Object
- InputItemException
- Exception class for handling InputItem errors.
- Inputs
- Input item array wrapper class.
- KBase
- The base class for Kotchasan framework.
- Kotchasan
- The main class of the Kotchasan framework.
- Language
- Class for language loading.
- ListItem
- Class ListItem
- AbstractLogger
- Kotchasan Logger Class (PSR-3)
- Logger
- Kotchasan Logger Class (PSR-3)
- Login
- This class is responsible for handling user login functionality.
- Menu
- This class is responsible for rendering the standard menu of Kotchasan.
- Mime
- Class responsible for handling MIME types and file extensions.
- Model
- This class serves as the base class for all models in the application.
- Number
- This class provides functions for working with numbers.
- Field
- ORM Field base class
- Recordset
- Recordset base class.
- Password
- This class provides functions for password encryption and decryption.
- Pdf Class
- Province
- This class provides a list of provinces in Thailand and Laos.
- Router
- Router class for website page routing.
- Session
- Session handling class.
- Singleton
- This class provides the base functionality for creating singleton classes.
- Tab
- Tab class to handle the creation and rendering of tabs.
- Template
- Template engine
- Text
- String functions
- Validator
- Class for validating various variables.
- View
- This class provides basic functionalities for views.
- Xls
- This class provides functions for creating and sending XLS files for download.
- Barcode
- Barcode generation class.
- Jwt
- JWT encoding, decoding, and verification class
- Promptpay
- Promptpay QR Code Payment Payload Generator based on EMV® QR Code Specification
Table of Contents
- APP_PATH = trim($docRoot . $appPath, '/') . '/'
- BASE_PATH = trim($basePath, '/') . '/'
- DB_LOG = alse
- DEBUG = 0
- HOST = str_replace('www.', '', $host)
- HTTPS = $scheme == 'https://'
- ROOT_PATH = $docRoot . '/'
- TOKEN_AGE = 3600
- TOKEN_LIMIT = 10
- VENDOR_DIR = $vendorDir
- VERSION = '6.0.0'
- WEB_URL = (HTTPS ? 'https://' : $scheme) . $host . $contextPrefix . str_replace($docRoot, '', ROOT_PATH)
- createClass() : object|null
- Create a new instance of a class.
- doShutdown() : mixed
- Shutdown function to output debug messages to the browser console.
- debug() : mixed
- Output debug information to the browser console.
- getClassPath() : string
- Get the file path of a class based on its name.
Constants
APP_PATH
public
mixed
APP_PATH
=
trim($docRoot . $appPath, '/') . '/'
BASE_PATH
public
mixed
BASE_PATH
=
trim($basePath, '/') . '/'
DB_LOG
public
mixed
DB_LOG
= alse
DEBUG
public
mixed
DEBUG
= 0
HOST
public
mixed
HOST
= str_replace('www.', '', $host)
HTTPS
public
mixed
HTTPS
= $scheme == 'https://'
ROOT_PATH
public
mixed
ROOT_PATH
= $docRoot . '/'
TOKEN_AGE
public
mixed
TOKEN_AGE
= 3600
TOKEN_LIMIT
public
mixed
TOKEN_LIMIT
= 10
VENDOR_DIR
public
mixed
VENDOR_DIR
= $vendorDir
VERSION
public
mixed
VERSION
= '6.0.0'
WEB_URL
public
mixed
WEB_URL
= (HTTPS ? 'https://' : $scheme) . $host . $contextPrefix . str_replace($docRoot, '', ROOT_PATH)
Functions
createClass()
Create a new instance of a class.
createClass(string $className[, mixed $param = null ]) : object|null
Parameters
- $className : string
-
The class name
- $param : mixed = null
Return values
object|null —An instance of the class or null if the class doesn't exist
doShutdown()
Shutdown function to output debug messages to the browser console.
doShutdown() : mixed
Return values
mixed —debug()
Output debug information to the browser console.
debug(mixed $expression) : mixed
Parameters
- $expression : mixed
Return values
mixed —getClassPath()
Get the file path of a class based on its name.
getClassPath(string $className) : string
Parameters
- $className : string
-
The class name
Return values
string —The file path of the class or an empty string if the class is not found