Functions sections: tutte le funzioni del componente service.php richiamabili quando viene incluso il file all'interno di un progetto.

This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

Introduction

In this article, we help you to start and configure your project by creating a copy of thedocs. Make sure you've read the contents article before continuing.


exitAndPrintResult

  • ARGS: result(bool), string(string), details => FALSE, options(array) => array()
  • GLOBAL:
  • Return:

scrive il risultato nella pagina ed esce dallo script
options puo' essere valorizzato con dei parametri specifici in modo da rispondere con determinati valori
per esempio: UNAUTHORIZED_ imposta lo status nell'header a 401


_log

  • ARGS: string, debugTrace (bool) => FALSE
  • GLOBAL: logfilepath
  • Return: string

Scrive il contenuto di "string" in un file TXT situato in "logfilepath".
All'inzio di string viene aggiunta data ed ora.
Se string non è una stringa viene fatta una conversione per quanto possibile sulla variabile.
Se debugTrace è TRUE viene eseguito un backtrace a ritroso di ogni funzione coinvolta.


deleteFromDatabase

  • ARGS: dati (array)
  • GLOBAL: mysql
  • Return: bool

Viene eseguita una ricerca su db ed eliminata la selezione dei dati.
All'interno di dati deve essere definita una tabella obbligatoriamente.
Opzionale si può definire un filtro su base chiave e valore per limitare la ricerca a db.


getRequestHeaders

  • ARGS:
  • GLOBAL: _SERVER
  • Return: array

Restituisce un arraycontente gli header richiesti
L'array e' formato in questo modo:
ARRAY ( nomeHeader/titolo => VALORE, ... )


getTranslate

  • ARGS: string___(string), sourceLang(string), targetLang(string)
  • GLOBAL:
  • Return: bool

Traduce STRING___ dalla lingua sourceLang in lingua targetLang
Restituisce FALSE in caso di errore
Non traduce link o comandi bot di Telegram (parole che iniziano con '/')


is_json

  • ARGS: string(string)
  • GLOBAL:
  • Return: array/bool

Converte la stringa string in un array e lo restituisce a termine della funzione
Restituisce FALSE in caso di errore o se string non e' un json valido


is_date

  • ARGS: date___(string)
  • GLOBAL:
  • Return: bool

Restituisce TRUE se date___ e' una data valida
Restituisce FALSE se date___ non e' una data valida


isMail

  • ARGS: string(string)
  • GLOBAL:
  • Return: bool

Restituisce TRUE se string e' una mail valida
Restituisce FALSE se string non e' una mail valida


insert_database

  • ARGS: dati(array), prefisso
  • GLOBAL: mysql, prefix
  • Return: bool

Inserisce l'elemento contenuto in dati nella tabella specificata all'interno di dati


insert_database

  • ARGS: dati(array), prefisso
  • GLOBAL: mysql, prefix
  • Return: bool

Inserisce l'elemento contenuto in dati nella tabella specificata all'interno di dati


post

  • ARGS:
  • GLOBAL:
  • Return:



tableExist

  • ARGS: table
  • GLOBAL: mysql
  • Return: bool

Restituisce TRUE se la tabella esiste e FALSE se la tabella non esiste