Documentation

Tina4

Interfaces, Classes and Traits

DataBase
Interface DataBase and future database abstractions
RouteCore
The RouteCore from which to inherit router classes
ProcessInterface
Interface ProcessInterface
Api
Consume REST API interfaces with little code
Swagger
Document methods in OpenAPI format using annotations and return a JSON file
Annotation
This class facilitates finding annotations across a Tina4 project
Cache
Manages caching with PhpFastCache
Config
A container for settings passed to the Tina4 library, used currently for custom Auth, Twig filters, functions & globals
Debug
Debug class to make messages in the console
Env
Reads a .env file or .env.{environment} file for settings that should not be committed up with the repository
HTMLElement
Module
The back bone of extending and incorporating Tina4 libraries together
Test
Testing class for Tina4 library which reads tests based on annotations
Data
Extending this class makes any class "data" aware
DataError
Class DataError Used to get and return an error
DataField
Datafield layout for ORM and database result set
DataFirebird
The implementation for the firebird database engine
DataMongoDb
The Mongodb database implementation
DataMySQL
The MySQL database database implementation
DataRecord
DataRecord result set for ORM and Database A single data record
DataResult
Result of query
DataSQLite3
The SQLite3 functionality
Migration
Description of Tina4 Migration There are some "rules" that Tina4 prescribes for the migrations and it would be in your best interests to follow them.
SQL
A way to encapsulate standard SQL into an object form
Messenger
Useful for sending emails, requires a MessengerSettings class
MessengerSettings
This is the settings and configuration for sending messages from Tina4
ORM
A very simple ORM for reading and writing data to a database or just for a simple NO SQL solution
Any
Sets the $method variable in Class Route to ANY using the definition in Class Tina4Php The Any route intercepts any type of call that can be made to the web server e.g. Any::add()
Caller
Used in conjunction with Twig to call PHP classes and methods in the project
Crud
This is for helping doing heavy lifting and helping with mundane tasks
Delete
Sets the $method variable in Class Route to DELETE using the definition in Class Tina4Php Delete route intercepts delete calls made to the web server e.g. Delete::add()
Get
Sets the $method variable in Class Route to GET using the definition in Class Tina4Php Get route intercepts get calls made to the web server e.g. Get::add()
ParseTemplate
A very simple template engine with limited functionality
Patch
Sets the $method variable in Class Route to PATCH using the definition in Class Tina4Php Patch route intercepts patch calls made to the web server e.g. Patch::add()
Post
Sets the $method variable in Class Route to POST using the definition in Class Tina4Php Post route intercepts post calls made to the web server e.g. Post::add()
Put
Sets the $method variable in Class Route to PUT using the definition in Class Tina4Php Put route intercepts put calls made to the web server e.g. Put::add()
Request
Implements request params which get passed through to the routers
Response
Used in apis and routes to return a response
Route
Determines what occurs when a route is called
Router
Router class which resolves routes in the Tina4 stack
RouterResponse
The response of a router
Auth
For creating and validating secure tokens for use with the API layers
Event
This handles triggering and creating of events in a system
Process
Extend this class to make your own processes
Service
The service runner
Tina4Php
The main webserver initializer
Utility
A bunch of useful methods used across different classes in the library
DataBaseCore
Trait DataBaseCore Instantiates all common database methods

Table of Contents

HTML_ELEMENTS  = [":!DOCTYPE", ":!--", ":a", ":abbr", ":acronym", ":address", ":applet", ":area", ":article", ":aside", ":audio", ":b", ":base", ":basefont", ":bb", ":bdo", ":big", ":blockquote", ":body", ":br/", ":button", ":canvas", ":caption", ":center", ":cite", ":code", ":col", ":colgroup", ":command", ":datagrid", ":datalist", ":dd", ":del", ":details", ":dfn", ":dialog", ":dir", ":div", ":dl", ":dt", ":em", ":embed", ":eventsource", ":fieldset", ":figcaption", ":figure", ":font", ":footer", ":form", ":frame", ":frameset", ":h1", ":head", ":header", ":hgroup", ":hr/", ":html", ":i", ":iframe", ":img/", ":input", ":ins", ":isindex", ":kbd", ":keygen", ":label", ":legend", ":li", ":link", ":map", ":mark", ":menu", ":meta/", ":meter", ":nav", ":noframes", ":noscript", ":object", ":ol", ":optgroup", ":option", ":output", ":p", ":param", ":pre", ":progress", ":q", ":rp", ":rt", ":ruby", ":s", ":samp", ":script", ":section", ":select", ":small", ":source", ":span", ":strike", ":strong", ":style", ":sub", ":sup", ":table", ":tbody", ":td", ":textarea", ":tfoot", ":th", ":thead", ":time", ":title", ":tr", ":track", ":tt", ":u", ":ul", ":var", ":video", ":wbr"]
A way to code HTML5 elements using only PHP
renderTemplate()  : string
Render a twig file or string
redirect()  : mixed
Redirect

Constants

HTML_ELEMENTS

A way to code HTML5 elements using only PHP

public mixed HTML_ELEMENTS = [":!DOCTYPE", ":!--", ":a", ":abbr", ":acronym", ":address", ":applet", ":area", ":article", ":aside", ":audio", ":b", ":base", ":basefont", ":bb", ":bdo", ":big", ":blockquote", ":body", ":br/", ":button", ":canvas", ":caption", ":center", ":cite", ":code", ":col", ":colgroup", ":command", ":datagrid", ":datalist", ":dd", ":del", ":details", ":dfn", ":dialog", ":dir", ":div", ":dl", ":dt", ":em", ":embed", ":eventsource", ":fieldset", ":figcaption", ":figure", ":font", ":footer", ":form", ":frame", ":frameset", ":h1", ":head", ":header", ":hgroup", ":hr/", ":html", ":i", ":iframe", ":img/", ":input", ":ins", ":isindex", ":kbd", ":keygen", ":label", ":legend", ":li", ":link", ":map", ":mark", ":menu", ":meta/", ":meter", ":nav", ":noframes", ":noscript", ":object", ":ol", ":optgroup", ":option", ":output", ":p", ":param", ":pre", ":progress", ":q", ":rp", ":rt", ":ruby", ":s", ":samp", ":script", ":section", ":select", ":small", ":source", ":span", ":strike", ":strong", ":style", ":sub", ":sup", ":table", ":tbody", ":td", ":textarea", ":tfoot", ":th", ":thead", ":time", ":title", ":tr", ":track", ":tt", ":u", ":ul", ":var", ":video", ":wbr"]

Functions

renderTemplate()

Render a twig file or string

renderTemplate( $fileNameString[, array<string|int, mixed> $data = [] ][, string $location = "" ]) : string
Parameters
$fileNameString :
$data : array<string|int, mixed> = []
$location : string = ""
Return values
string

redirect()

Redirect

redirect(string $url[, int $statusCode = 303 ]) : mixed
Parameters
$url : string

The URL to be redirected to

$statusCode : int = 303

Code of status

Tags
example

examples\exampleTina4PHPRedirect.php

Return values
mixed

Search results