Documentation

API Documentation

Namespaces

dressapi

Table of Contents

ACCEPTED_FORMAT_OUTPUT  = ['json', 'html', 'xml', 'text']
ACL_TABLE  = '_acl'
APP_MODULES_PATH  = \realpath(__DIR__ . '/plugins') . '/'
APP_NAME  = 'test'
APP_NAME  = 'test'
APP_NAME  = 'demo'
CACHE_ENC_ALGORITHM  = 'sha256'
CACHE_MAX_SIZE_PER_ELEMENT  = 64 * 1024
DressAPI
CACHE_PATH  = '/dev/shm/'
Cache on Files
CMS_MENU_TABLE  = 'cmsmenu'
CMS_PAGE_TABLE  = 'cmspage'
CMSPAGE_GROUPNAME  = \CMS_PAGE_TABLE . "|visible='yes' AND groupname='[[GROUPNAME]]'|priority ASC"
CONFIG_TABLE  = '_config'
CONTACT_TABLE  = '_contact'
CREATION_DATE  = 'creation_date'
DB_HOST  = 'localhost'
DB_HOST  = 'localhost'
DB_NAME  = 'cardcomics'
DB_NAME  = 'dressapi-test'
DB_PASSWORD  = ''
DB_PASSWORD  = 'drapi22'
DB_PORT  = 3306
DB_PORT  = 3306
DB_USERNAME  = 'root'
DB_USERNAME  = 'root'
DBMS_TYPE  = 'MySql'
DEFAULT_CHARSET  = 'UTF-8'
DEFAULT_CSS_FOLDER  = 'default'
DEFAULT_FORMAT_OUTPUT  = 'json'
DEFAULT_HTML_FOLDER  = 'default'
DEFAULT_ITEMS_PER_REQUEST  = 20
DEFAULT_LANGUAGE  = 'IT'
DEFAULT_ORDER  = 'DESC'
DEFAULT_PAGE_DESCRIPTION  = 'Demo of dressapi'
DEFAULT_PAGE_TITLE  = 'dressapi.com - DEMO'
DOMAIN_NAME  = 'dressapi.com'
DOMAIN_NAME  = 'dressapi.com'
DOMAIN_NAME  = 'dressapi.com'
FRAMEWORK  = '/frameworks/bootstrap/'
HOME_PATH  = __DIR__ . '/www/'
IMAGES_EXT_ACCEPTED  = ['jpeg', 'jpg', 'png', 'webp', 'gif']
IMAGES_EXT_ACCEPTED  = ['jpeg', 'jpg', 'png', 'webp', 'gif']
ITEM_ID  = 'id'
LANGUAGE_LEARN  = \true
LANGUAGES  = ['IT', 'EN']
LOG_LEVEL_MIN  = 1
LOG_TRACE_REQUESTS  = \false
MAIL_DEBUG  = 2
MAIL_DEBUG  = 0
MAIL_DEBUG  = false
MAIL_ENCRYPTION  = 'tls'
MAIL_ENCRYPTION  = 'tls'
MAIL_ENCRYPTION  = \PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_SMTPS
MAIL_HOST  = 'smtp.gmail.com'
MAIL_HOST  = 'smtp.gmail.com'
MAIL_PASSWORD  = '<YOUR EMAIL PASSWORD>'
MAIL_PASSWORD  = '<YOUR EMAIL PASSWORD>'
MAIL_PORT  = 465
MAIL_PORT  = 465
MAIL_PORT  = 465
MAIL_SMTP_PROTOCOL  = \false
MAIL_SMTP_PROTOCOL  = \false
MAIL_SMTP_PROTOCOL  = true
MAIL_TO_REPLY  = '<YOUR EMAIL>'
MAIL_TO_REPLY  = '<YOUR EMAIL>'
MAIL_USERNAME  = '<YOUR EMAIL USERNAME'
MAIL_USERNAME  = '<YOUR EMAIL USERNAME'
MAX_ELEMENTS_PER_RELATED_TABLE  = 50
MAX_FILE_SIZE  = 1048576 * 128
MAX_FILE_SIZE  = 1048576 * 128
MAX_ITEMS_PER_REQUEST  = 200
MODULE_AVAILABLE_LIST  = \MODULE_TABLE . "|visible='yes' AND id IN (SELECT " . \RELATED_MODULE_ID . " FROM " . \ACL_TABLE . " a LEFT JOIN " . \USER_ROLE_TABLE . " ur ON (a." . \RELATED_ROLE_ID . "=ur." . \RELATED_ROLE_ID . " OR a." . \RELATED_ROLE_ID . " IS NULL) WHERE (can_read='YES' AND " . \RELATED_USER_ID . "=[[CURRENT_ID_USER]]))"
MODULE_TABLE  = '_module'
PUBLIC_FILE_URL  = 'public-files/'
PUBLIC_FILE_URL  = 'public-files/'
PWD_CRYPT  = '@AShHK#Dfjdx45'
PWD_ENC_ALGORITHM  = 'tiger192,4'
REDIS_HOST  = '127.0.0.1'
REDIS_PASSWORD  = "change me"
REDIS_PORT  = 6379
REDIS_SCHEME  = 'tcp'
REDIS_SELECTION  = 0
Config definitions for Redis Cache
REDIS_USERNAME  = "change me"
RELATED_FIELD_NAMES  = ['_role' => 'name', '_module' => 'name', 'article' => 'title', '*' => 'name']
RELATED_ID_POSTFIX  = ''
RELATED_ID_PREFIX  = 'id_'
RELATED_MODULE_ID  = \RELATED_ID_PREFIX . \MODULE_TABLE . \RELATED_ID_POSTFIX
RELATED_PARENT_ID  = \RELATED_ID_PREFIX . \SAME_TABLE . \RELATED_ID_POSTFIX
RELATED_ROLE_ID  = \RELATED_ID_PREFIX . \ROLE_TABLE . \RELATED_ID_POSTFIX
RELATED_TABLE_ID  = \RELATED_ID_PREFIX . '[related_table]' . \RELATED_ID_POSTFIX
RELATED_USER_ID  = \RELATED_ID_PREFIX . \USER_TABLE . \RELATED_ID_POSTFIX
REQUIRED_ITEMS  = []
ROLE_TABLE  = '_role'
ROUTE_TABLE  = '_route'
SAME_TABLE  = 'parent'
TOKEN_DURATION  = '2 months'
TOKEN_ENC_ALGORITHM  = 'HS512'
TOKEN_SECRET_KEY  = 'bGS6lzFqvvSQ8ALbOxatm7/Vk7mLQyzqaS34Q4oR1ew='
TRANSLATION_TABLE  = '_translation'
TWITTER_SITE  = '@dressapi'
UPLOAD_EXT_ACCEPTED  = ['doc', 'docx', 'pdf', 'odf', 'pptx', 'jpeg', 'jpg', 'png', 'webp', 'gif']
UPLOAD_EXT_ACCEPTED  = ['doc', 'docx', 'pdf', 'odf', 'pptx', 'jpeg', 'jpg', 'png', 'webp', 'gif']
UPLOAD_FILE_PATH  = \UPLOAD_PUBLIC_FILE_PATH
UPLOAD_FILE_PATH  = \UPLOAD_PUBLIC_FILE_PATH
UPLOAD_PRIVATE_FILE_PATH  = \realpath(\HOME_PATH . '../private-files/') . '/'
UPLOAD_PRIVATE_FILE_PATH  = \realpath(\HOME_PATH . '../private-files/') . '/'
UPLOAD_PUBLIC_FILE_PATH  = \realpath(\HOME_PATH . \PUBLIC_FILE_URL) . '/'
UPLOAD_PUBLIC_FILE_PATH  = \realpath(\HOME_PATH . \PUBLIC_FILE_URL) . '/'
USER_INIT_ROLES  = [103]
USER_ITEM_ID  = 'id'
USER_ITEM_NAME  = 'name'
USER_ITEM_PASSWORD  = 'pwd'
USER_ITEM_USERNAME  = 'username'
USER_ROLE_TABLE  = '_user_role'
USER_TABLE  = '_user'
_T()  : string
Translate text
printr()  : void
like print_r() print an variable or an complex object on browser
vardump()  : void
like var_dump() print an variable or an complex object on browser

Constants

ACCEPTED_FORMAT_OUTPUT

public mixed ACCEPTED_FORMAT_OUTPUT = ['json', 'html', 'xml', 'text']
Tags

ACL_TABLE

public mixed ACL_TABLE = '_acl'
Tags

APP_MODULES_PATH

public mixed APP_MODULES_PATH = \realpath(__DIR__ . '/plugins') . '/'
Tags

APP_NAME

public mixed APP_NAME = 'demo'
Tags

CACHE_ENC_ALGORITHM

public mixed CACHE_ENC_ALGORITHM = 'sha256'
Tags

CACHE_MAX_SIZE_PER_ELEMENT

DressAPI

public mixed CACHE_MAX_SIZE_PER_ELEMENT = 64 * 1024
Tags
version
2.0
license

This file is under Apache 2.0 license

author

Tufano Pasquale

copyright

Tufano Pasquale

url

https://dressapi.com

Config definitions for Generic Cache

CACHE_PATH

Cache on Files

public mixed CACHE_PATH = '/dev/shm/'
Tags

CMS_MENU_TABLE

public mixed CMS_MENU_TABLE = 'cmsmenu'
Tags

CMS_PAGE_TABLE

public mixed CMS_PAGE_TABLE = 'cmspage'
Tags

CMSPAGE_GROUPNAME

public mixed CMSPAGE_GROUPNAME = \CMS_PAGE_TABLE . "|visible='yes' AND groupname='[[GROUPNAME]]'|priority ASC"
Tags

CONFIG_TABLE

public mixed CONFIG_TABLE = '_config'
Tags

CONTACT_TABLE

public mixed CONTACT_TABLE = '_contact'
Tags

CREATION_DATE

public mixed CREATION_DATE = 'creation_date'
Tags

DB_HOST

public mixed DB_HOST = 'localhost'

DB_HOST

public mixed DB_HOST = 'localhost'
Tags

DB_NAME

public mixed DB_NAME = 'cardcomics'

DB_NAME

public mixed DB_NAME = 'dressapi-test'
Tags

DB_PASSWORD

public mixed DB_PASSWORD = ''

DB_PASSWORD

public mixed DB_PASSWORD = 'drapi22'
Tags

DB_PORT

public mixed DB_PORT = 3306

DB_PORT

public mixed DB_PORT = 3306
Tags

DB_USERNAME

public mixed DB_USERNAME = 'root'

DB_USERNAME

public mixed DB_USERNAME = 'root'
Tags

DBMS_TYPE

public mixed DBMS_TYPE = 'MySql'
Tags

DEFAULT_CHARSET

public mixed DEFAULT_CHARSET = 'UTF-8'
Tags

DEFAULT_CSS_FOLDER

public mixed DEFAULT_CSS_FOLDER = 'default'
Tags

DEFAULT_FORMAT_OUTPUT

public mixed DEFAULT_FORMAT_OUTPUT = 'json'
Tags

DEFAULT_HTML_FOLDER

public mixed DEFAULT_HTML_FOLDER = 'default'
Tags

DEFAULT_ITEMS_PER_REQUEST

public mixed DEFAULT_ITEMS_PER_REQUEST = 20
Tags

DEFAULT_LANGUAGE

public mixed DEFAULT_LANGUAGE = 'IT'
Tags

DEFAULT_ORDER

public mixed DEFAULT_ORDER = 'DESC'
Tags

DEFAULT_PAGE_DESCRIPTION

public mixed DEFAULT_PAGE_DESCRIPTION = 'Demo of dressapi'
Tags

DEFAULT_PAGE_TITLE

public mixed DEFAULT_PAGE_TITLE = 'dressapi.com - DEMO'
Tags

DOMAIN_NAME

public mixed DOMAIN_NAME = 'dressapi.com'

DOMAIN_NAME

public mixed DOMAIN_NAME = 'dressapi.com'
Tags

FRAMEWORK

public mixed FRAMEWORK = '/frameworks/bootstrap/'
Tags

HOME_PATH

public mixed HOME_PATH = __DIR__ . '/www/'
Tags

IMAGES_EXT_ACCEPTED

public mixed IMAGES_EXT_ACCEPTED = ['jpeg', 'jpg', 'png', 'webp', 'gif']

IMAGES_EXT_ACCEPTED

public mixed IMAGES_EXT_ACCEPTED = ['jpeg', 'jpg', 'png', 'webp', 'gif']
Tags

ITEM_ID

public mixed ITEM_ID = 'id'
Tags

LANGUAGE_LEARN

public mixed LANGUAGE_LEARN = \true
Tags

LANGUAGES

public mixed LANGUAGES = ['IT', 'EN']
Tags

LOG_LEVEL_MIN

public mixed LOG_LEVEL_MIN = 1
Tags

LOG_TRACE_REQUESTS

public mixed LOG_TRACE_REQUESTS = \false
Tags

MAIL_DEBUG

public mixed MAIL_DEBUG = 0

MAIL_ENCRYPTION

public mixed MAIL_ENCRYPTION = 'tls'

MAIL_ENCRYPTION

public mixed MAIL_ENCRYPTION = 'tls'

MAIL_ENCRYPTION

public mixed MAIL_ENCRYPTION = \PHPMailer\PHPMailer\PHPMailer::ENCRYPTION_SMTPS
Tags

MAIL_HOST

public mixed MAIL_HOST = 'smtp.gmail.com'

MAIL_HOST

public mixed MAIL_HOST = 'smtp.gmail.com'
Tags

MAIL_PASSWORD

public mixed MAIL_PASSWORD = '<YOUR EMAIL PASSWORD>'

MAIL_PASSWORD

public mixed MAIL_PASSWORD = '<YOUR EMAIL PASSWORD>'
Tags

MAIL_PORT

public mixed MAIL_PORT = 465

MAIL_SMTP_PROTOCOL

public mixed MAIL_SMTP_PROTOCOL = \false

MAIL_SMTP_PROTOCOL

public mixed MAIL_SMTP_PROTOCOL = \false

MAIL_SMTP_PROTOCOL

public mixed MAIL_SMTP_PROTOCOL = true
Tags

MAIL_TO_REPLY

public mixed MAIL_TO_REPLY = '<YOUR EMAIL>'

MAIL_TO_REPLY

public mixed MAIL_TO_REPLY = '<YOUR EMAIL>'
Tags

MAIL_USERNAME

public mixed MAIL_USERNAME = '<YOUR EMAIL USERNAME'

MAIL_USERNAME

public mixed MAIL_USERNAME = '<YOUR EMAIL USERNAME'
Tags
public mixed MAX_ELEMENTS_PER_RELATED_TABLE = 50
Tags

MAX_FILE_SIZE

public mixed MAX_FILE_SIZE = 1048576 * 128

MAX_FILE_SIZE

public mixed MAX_FILE_SIZE = 1048576 * 128
Tags

MAX_ITEMS_PER_REQUEST

public mixed MAX_ITEMS_PER_REQUEST = 200
Tags

MODULE_AVAILABLE_LIST

public mixed MODULE_AVAILABLE_LIST = \MODULE_TABLE . "|visible='yes' AND id IN (SELECT " . \RELATED_MODULE_ID . " FROM " . \ACL_TABLE . " a LEFT JOIN " . \USER_ROLE_TABLE . " ur ON (a." . \RELATED_ROLE_ID . "=ur." . \RELATED_ROLE_ID . " OR a." . \RELATED_ROLE_ID . " IS NULL) WHERE (can_read='YES' AND " . \RELATED_USER_ID . "=[[CURRENT_ID_USER]]))"
Tags

MODULE_TABLE

public mixed MODULE_TABLE = '_module'
Tags

PUBLIC_FILE_URL

public mixed PUBLIC_FILE_URL = 'public-files/'

PUBLIC_FILE_URL

public mixed PUBLIC_FILE_URL = 'public-files/'
Tags

PWD_CRYPT

public mixed PWD_CRYPT = '@AShHK#Dfjdx45'
Tags

PWD_ENC_ALGORITHM

public mixed PWD_ENC_ALGORITHM = 'tiger192,4'
Tags

REDIS_HOST

public mixed REDIS_HOST = '127.0.0.1'
Tags

REDIS_PASSWORD

public mixed REDIS_PASSWORD = "change me"
Tags

REDIS_PORT

public mixed REDIS_PORT = 6379
Tags

REDIS_SCHEME

public mixed REDIS_SCHEME = 'tcp'
Tags

REDIS_SELECTION

Config definitions for Redis Cache

public mixed REDIS_SELECTION = 0
Tags

REDIS_USERNAME

public mixed REDIS_USERNAME = "change me"
Tags
public mixed RELATED_FIELD_NAMES = ['_role' => 'name', '_module' => 'name', 'article' => 'title', '*' => 'name']
Tags
public mixed RELATED_ID_POSTFIX = ''
Tags
public mixed RELATED_ID_PREFIX = 'id_'
Tags
public mixed RELATED_MODULE_ID = \RELATED_ID_PREFIX . \MODULE_TABLE . \RELATED_ID_POSTFIX
Tags
public mixed RELATED_PARENT_ID = \RELATED_ID_PREFIX . \SAME_TABLE . \RELATED_ID_POSTFIX
Tags
public mixed RELATED_ROLE_ID = \RELATED_ID_PREFIX . \ROLE_TABLE . \RELATED_ID_POSTFIX
Tags
public mixed RELATED_TABLE_ID = \RELATED_ID_PREFIX . '[related_table]' . \RELATED_ID_POSTFIX
Tags
public mixed RELATED_USER_ID = \RELATED_ID_PREFIX . \USER_TABLE . \RELATED_ID_POSTFIX
Tags

REQUIRED_ITEMS

public mixed REQUIRED_ITEMS = []
Tags

ROLE_TABLE

public mixed ROLE_TABLE = '_role'
Tags

ROUTE_TABLE

public mixed ROUTE_TABLE = '_route'
Tags

SAME_TABLE

public mixed SAME_TABLE = 'parent'
Tags

TOKEN_DURATION

public mixed TOKEN_DURATION = '2 months'
Tags

TOKEN_ENC_ALGORITHM

public mixed TOKEN_ENC_ALGORITHM = 'HS512'
Tags

TOKEN_SECRET_KEY

public mixed TOKEN_SECRET_KEY = 'bGS6lzFqvvSQ8ALbOxatm7/Vk7mLQyzqaS34Q4oR1ew='
Tags

TRANSLATION_TABLE

public mixed TRANSLATION_TABLE = '_translation'
Tags

TWITTER_SITE

public mixed TWITTER_SITE = '@dressapi'
Tags

UPLOAD_EXT_ACCEPTED

public mixed UPLOAD_EXT_ACCEPTED = ['doc', 'docx', 'pdf', 'odf', 'pptx', 'jpeg', 'jpg', 'png', 'webp', 'gif']

UPLOAD_EXT_ACCEPTED

public mixed UPLOAD_EXT_ACCEPTED = ['doc', 'docx', 'pdf', 'odf', 'pptx', 'jpeg', 'jpg', 'png', 'webp', 'gif']
Tags

UPLOAD_FILE_PATH

public mixed UPLOAD_FILE_PATH = \UPLOAD_PUBLIC_FILE_PATH

UPLOAD_FILE_PATH

public mixed UPLOAD_FILE_PATH = \UPLOAD_PUBLIC_FILE_PATH
Tags

UPLOAD_PRIVATE_FILE_PATH

public mixed UPLOAD_PRIVATE_FILE_PATH = \realpath(\HOME_PATH . '../private-files/') . '/'

UPLOAD_PRIVATE_FILE_PATH

public mixed UPLOAD_PRIVATE_FILE_PATH = \realpath(\HOME_PATH . '../private-files/') . '/'
Tags

UPLOAD_PUBLIC_FILE_PATH

public mixed UPLOAD_PUBLIC_FILE_PATH = \realpath(\HOME_PATH . \PUBLIC_FILE_URL) . '/'

UPLOAD_PUBLIC_FILE_PATH

public mixed UPLOAD_PUBLIC_FILE_PATH = \realpath(\HOME_PATH . \PUBLIC_FILE_URL) . '/'
Tags

USER_INIT_ROLES

public mixed USER_INIT_ROLES = [103]
Tags

USER_ITEM_ID

public mixed USER_ITEM_ID = 'id'
Tags

USER_ITEM_NAME

public mixed USER_ITEM_NAME = 'name'
Tags

USER_ITEM_PASSWORD

public mixed USER_ITEM_PASSWORD = 'pwd'
Tags

USER_ITEM_USERNAME

public mixed USER_ITEM_USERNAME = 'username'
Tags

USER_ROLE_TABLE

public mixed USER_ROLE_TABLE = '_user_role'
Tags

USER_TABLE

public mixed USER_TABLE = '_user'
Tags

Functions

_T()

Translate text

_T(string $text) : string
Parameters
$text : string

text to translate

Tags
Return values
string

translated text

printr()

like print_r() print an variable or an complex object on browser

printr(mixed $var) : void
Parameters
$var : mixed

the variable or object to display

Tags
Return values
void

vardump()

like var_dump() print an variable or an complex object on browser

vardump(mixed $var) : void
Parameters
$var : mixed

the variable or object to display

Tags
Return values
void

        

Search results