La documentación de WEBvivo está en fase de desarrollo.

Todos los métodos están documentados en el código, pero en esta sección pretendemos clasificar, documentar y crear ejemplos de uso. Dado que esta documentación está siendo creada por el equipo de desarrollo, no podemos emplear todo el tiempo que nos gustaría, pero esperamos tener una versión bastante completa durante 2023.

La documentación se genera originalmente en inglés y es traducida al español, por lo que es posible que se encuentren fragmentos en inglés en algunas partes, aunque nuestro objetivo es que toda la documentación esté completa en ambos idiomas.

/*
 * WEBvivo core class contains all mandatory framework methods 
 * and acts as a container class for aditional classes
 * 
 * #############################################################################
 * Class methods
 * #############################################################################
 * 
 * 
 * 
 * 
 * 
 * PUBLIC WRAPPED CLASSES
 * -----------------------------------------------------------------------------
 * db() - PDO wrapper class compatible with ezSQL syntax
 * pdo() - PHP PDO class
 * user() - User management class
 * 
 * 
 * 
 * 
 * 
 * WEBVIVO CORE METHODS
 * -----------------------------------------------------------------------------
 * 
 * PRIVATE
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * __call() - Calls methods from other classes as its own
 * chkFrameworkDB() - Check if mandatory database tables exist
 * getChildGrpsRecursive() - Recursive support to getChildGrps()
 * getHash() - Set default value for hash
 * headers() - Generate http headers for current page
 * initAllClasses() - Initialize the framework classes
 * initFramework() - Initialize all the vars and classes used by framework
 * initHTMLPurifier() - Initialize HTMLPurifier class if present
 * langSet() - Set framework language and set language objects
 * loadConfKeys() - Overwrite conf['key'] values is same keys exist in DB conf
 * skeleton() - Set skeleton objects with HTML file paths
 * try2Login() -Try to login if credentials and login order was sent
 * webSiteId() - Get current Web Site ID
 * pageLoader() - Load website pages and generate page related objects
 * 
 * PUBLIC
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * allLanguages() - Returns array with all framework enabled languages
 * base64url_decode() - Decode string in base64 URL format
 * base64url_encode() - Encode string in base64 URL format
 * bruteforceAttemp() - Write a new invalid login attemp to bruteforce table
 * bruteforceCheck() - Check bruteforce access
 * byteScale() - Convert bytes to appropriate scale and unit
 * checksumTables() - Get the checksum of configured tables
 * chkLang() - Check if supplied iso lang code is enabled
 * chkUserPgAcess() - Check if user have access to a given page
 * cleanString() - Remove any tags, links or multiline comments
 * convertToArray() - Convert objects and json to array
 * delConf() - Delete a conf keyword and all the values
 * extractQueryStr() - Extract all the vars and arrays from GET
 * filterUsername() - Filter the login form username POST field
 * getAllVars() - Get all class vars to use as dependency in child classes
 * getBrowserLang() - Get browser higher score enabled language
 * getChildGrps() - Get all the child groups of a given parent group
 * getConf() - Get the conf value of a given cat and key, return arrays
 * getCopyright() - Generate Copyright string in HTML comment format
 * getDate() - Get current date for configured default_time_zone
 * getPageFQDN() - Get FQDN assigned to WS id
 * getParentGrps() - Get all the parent groups of a given child group
 * getQueryStr() - Create array with (name => value) data of URI query string
 * getText() - Return text value for current language for given $key
 * getURI() - Get current page and query string from URI
 * getUriAlias() - Get current alias page from URI
 * getVersion() - Get framework version string
 * initClass() - Load classes using spl_autoload_register and conf array
 * initClasses() - Initialize all the classes used by core class
 * initDBClass() - Initialize DB class wrapper
 * initUserClass() - Initialize user management class
 * initVars() - Initialize al the vars in an array as global
 * lcut() - Remove string that matches literally by the left of a string
 * loginByHash() - Try to login if a login HASH is detected
 * login() - Try to login if credentials and login order was sent
 * loginHash() - Generate a login HASH to identify a user from a URL GET
 * logout() - Disconect user session
 * move2SSL() - If not https, redirect domain to SSL and viceversa
 * pageBenchmark() - Measure the page loading speed and memory consumption
 * pageId2Alias() - Get relationship between page id and page alias
 * permaLink2Alias() - Load framework file from page permalinks
 * putConf() - Update a conf value
 * rcut() - Remove string that matches literally by the right of a string
 * queryStr() - Used by getQueryStr() to capture all vars to an array
 * queryStrVar() - Used by getQueryStr() to return a single var
 * randPass() - Password generator
 * redir() - Redirect to a given URI and type or redirect.
 * redirect301() - Redirect old pages to new ones using configuration array
 * SetCookieLang() - Set the cookie lang if GET var detected
 * setCookiesAgree() - Set de cookies_agree cookie
 * setLocale() - Set free locale or linked with language
 * ssl() - Check if page is loaded using https protocol
 * ssl_decrypt() - Decrypt string using openssl_encrypt
 * ssl_encrypt() - Encrypt string  using openssl_encrypt
 * sumTotalSeconds() - Get a sum of different time scales in seconds
 * userGen() - Generate a username from firstname and lastname
 * userGroupName() - Get user group name for current user
 * userSigned() - Check if user is signed
 * wordCutter() - Return a string limited in a given number of words
 * textCutter() - Return a string limited in size without cutting words
 * 
 * 
 * 
 * 
 * 
 * FILE CACHE METHODS
 * -----------------------------------------------------------------------------
 * 
 * PUBLIC
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * cachePageChk() - Check if current page must be cached
 * cachePageRead() - Read cache file if exist and delete expired cache files
 * cachePageWrite() - Write the $obcontent to file cache
 * cachePageName() - Get the file name of a page to use by cachePageRead() and 
 * 
 * 
 * 
 * 
 * 
 * OTHER METHODS
 * -----------------------------------------------------------------------------
 * 
 * PUBLIC
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * arrayDecode() - Decode/decrypt from base64URL to array
 * arrayDelCode() - Delete array file and index by code of arraySend
 * arrayDelOutdated() - Delete outdated array files and indexes of arraySend/Receive methods
 * arrayEncode() - Encode/encrypt array to base64URL
 * arrayMultiOrder() - Order multidimensional array by a given value
 * arrayMultiSearch() - Search values on given keys of multidimensional arrays
 * arrayReceive() - Receive array using a short code by GET
 * arraySanitize() - Sanitize normal or multidimensional array values
 * arraySend() - Send array using a short code by GET
 * arraySendRedisIDXRead() - Read arraySend Redix index
 * arraySendRedisIDXSave() - Save new Redis index value for arraySend
 * arraySendRedisDel($code) - Delete Redis index and data for arraySend
 * arrayToObject() - Recursively convert object to array
 * captureGetVars() - Set global vars captured and filtered from GET with a given size
 * captureGlobalPost() - Capture and filter all $_POST vars with $key = value
 * chkEmpty() - Check if an array or multidimensional array is empty
 * chkIfTableExist() - Check if a table exist for currect database
 * chkIndexBacktrace() - Detect if class is called from index or other page
 * chkValidStr() - Check if a var is not empty, array, object, resource or boolean
 * chkValidStrMulti() - Check if multiple vara are not empty, array, object, resource or boolean
 * countryNameByISO() - Return Country name of a given ISO3166-1_A2 code
 * decodeStr() - Decode/decrypt from base64URL and decompress string
 * decodeVars() - Get array with vars received from a base64 encoded string
 * detectBotByUserAgent() - Detect if the user_agent is from a bot.
 * download() - Download a file
 * dumpDecode() - Check response contents codified in json and base64-url
 * emailSend() - Simple email send function
 * encodeStr() - Compress string and encrypt/encode to base64URL
 * encodeVars() - Encode the vars of a GET query string using base64url
 * filterRecursive() - Recursively filter array or object
 * filterStr() - Filter string depending on given filter
 * formatDate() - Returns a formated date, depending on int used in $opt
 * formatTime() - Convert minutes to hours and minutes
 * getAlternateHeader() - Generate alternate link header with all enabled languages
 * getBlock() - Get a content block in current language
 * getBreadcrumb() - Get breadcrumb to var with bootstrap styles
 * getColumnsSchema() - Get the column schema of a given table of current DB
 * getCountries() - getCountries
 * getDomainTLD() - Return the TLD of given domain
 * getEmptyDBArray() - Get an empty array from a table name structure
 * getEmptyDBObject() - Get an empty object from a table name structure
 * getFileExtension() - Return the file extension of given file
 * getItemsFromList() - Return array with the elements of a list of items
 * getMIMEType() - Get de MIME type of a given file extension
 * getMsg() - Create a system message or error from array
 * getMsgIterator() - Recursively show all messages of multidimensional arrays
 * getNavbarLang() - Generate a Bootstrap navbar lang changer item with all enabled languages
 * getQueryVars() - Convert from GET query to compresed var without base64 encode
 * getReferer() - Returns one array with |http_referer|referer|uri_str|uri|domain|page|query|
 * getShiftDate() - get a shifted date/time by seconds, minutes, hours, days, weeks, months or years
 * getUserInfo() - Get all user info and attributes for a given user id
 * getVirtualPageInfo() - Get virtual page info.
 * htmlentities() - Recursively convert array or object contents to entities
 * ip2Country() - Get country code of a given IP
 * isBot() - Detect if a IP is from a bot.
 * isCountry() - Detects the groups to which the country belongs.
 * isCountryGrpLst() - Get list of country groups
 * isCountryOf() - Detect if a country belongs to a given group.
 * isJson() - Detect if a string is in json format
 * langName() -  Return "native" language name for given ISO639-1_A2 code
 * langNameByISO() - Native and english language name of any ISO639 code variant
 * loadMethods - Load a list of methods used by framework
 * logException() - Log exceptions.
 * logSave() - Save log to file.
 * matchIPHost() - Check if a IP or hostname IP is in the array
 * microtime() - Calculate the time between the given microtime and current time
 * object2List() - Get a comma separated list from object to use as "WHERE $value IN ($list)"
 * pushHTTP2Elements() - Send a http/2 push header for each element in array
 * readCookiesAgree() - Read cookies_agree cookie
 * arrayReduce() - Reduce multidimensional array/object to simple array
 * regenQueryString() - Generate actual query string
 * removeAccents() - Remove accents from a text string
 * removeWhitespaces() - Remove spaces, tabs and line ends
 * removeLangFromQueryString() - Remove lang and setlang vars from query string 
   before generating the new query to avoid adding  it again when changing language
 * removeValueFromQueryString() - Remove value from query string
 * secondsToHours() - Convert from seconds to h:m:s
 * setVar() - Check if var is unset and set it as null, else return original value
 * showBlock() - Show content block in current language
 * showBreadcrumb() - Show breadcrumb with bootstrap styles
 * showMsg() - Show the message created by createMsg
 * showText() - Show text value for current language for given $key
 * trail() - Generate current page trail tree. Used only by breadcrumb()
 * trailData() - Get trail name and link. Used only by breadcrumb()
 * urlizer() - Convert string to use in URLs, page names and similar.
 * valiDate() - Validate dates in any format (default: Y-m-d H:i:s)
 * validateEncryptionHash() - Validate encryption hashes
 * vardump() - Enhanced var dump with prism styles for debugging purposes
 * 
 * PUBLIC ALIASES
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * base64URLDecode() -> base64url_decode()
 * base64URLEncode() -> base64url_encode()
 * detectBotByIP() -> isBot()
 * putConfValue() -> putConf()
 * sslDecrypt() -> ssl_decrypt()
 * sslEncrypt() -> ssl_encrypt()
 * rndPwd() -> $this->randPass()
 * decodeArray() -> $this->arrayDecode()
 * encodeArray() -> $this->arrayEncode()
 * getConfValue() -> getConf()
 * 
 */