ACCOUNT_MENU
public
mixed
ACCOUNT_MENU
= "account"
public
mixed
ACCOUNT_MENU
= "account"
public
mixed
BB_APIS
= "bb.apis"
public
mixed
BB_CACHE
= "bb.cache"
public
mixed
BB_CONTEXT
= "bb.context"
public
mixed
BB_DB
= "bb.database"
public
mixed
BB_DBDrivers
= "bb.dbdrivers"
public
mixed
BB_DEFAULTPATH
= "bb.defaultPath"
public
mixed
BB_DISPLAYALERTS
= "bb.displayAlerts"
public
mixed
BB_DYNAMIC_ROUTES
= "bb.dynamicRoutes"
public
mixed
BB_EVENT_HANDLERS
= "bb.eventHandlers"
public
mixed
BB_IP_BLACKLIST
= "bb.ipBlacklist"
public
mixed
BB_IP_WHITELIST
= "bb.ipWhitelist"
public
mixed
BB_IPGEOLOCATION
= "bb.ipGeolocation"
public
mixed
BB_LOCALE
= "bb.locale"
public
mixed
BB_MailDrivers
= "bb.maildrivers"
public
mixed
BB_MENUS
= "bb.menus"
public
mixed
BB_MODALS
= "bb.modals"
public
mixed
BB_PATH404
= "bb.404"
public
mixed
BB_PATHMYACCOUNT
= "bb.myaccount"
public
mixed
BB_REST_API_KEYS
= "bb.restApiKeys"
public
mixed
BB_ROUTES
= "bb.routes"
public
mixed
BB_SESSION_CACHE
= "bb.sessionCache"
public
mixed
BB_SESSION_HISTORY
= "bb-history"
public
mixed
BB_SKIP_FILES
= "bb.skipFiles"
public
mixed
BB_THEME
= "bb.theme"
public
mixed
BB_TWIGFILTERS
= "bb.twigFilters"
public
mixed
BB_USERAUTH
= "bb.userauth"
public
mixed
BB_VAR_LANGUAGE
= "language"
public
mixed
BB_VAR_THEME
= "theme"
public
mixed
BB_VIEWCONTROLLERS
= "bb.viewControllers"
public
mixed
MAIN_MENU
= "main"
_ajax(mixed $function[, mixed $query = null ][, mixed $null = "" ][, mixed $fullPath = true ][, mixed $ajaxPath = "ajax" ]) : mixed
getAjaxPathForFunction(mixed $function[, array<string|int, mixed>|null $query = null ][, mixed $null = "" ][, mixed $fullPath = true ][, mixed $ajaxPath = "ajax" ]) : string|null
Registers a AJAX API method
bb_register_AJAX_api(AjaxController $instance, mixed $alias, callable $function[, bool $requiresAuth = false ][, mixed $requiredPermission = null ][, mixed $requiredFields = null ]) : void
Path of the AJAX API (e.g. "category/method")
The function that should be called when the API is requested (must accept one parameter for the payload)
True if the API requires authentication
The permission that is required to access the API if it requires authentication
The fields that are required in the payload
autoload_dir(array<string|int, mixed>|null $directories) : mixed
autoload(mixed $configuration) : mixed
Starts the Initialization Process and Database connection Steps: - Database connection - Load config from Database - Load locale - Load Theme
bb_init() : void
Starts the registration process of bb4 core functionality
bb_register() : void
bb_post_register() : mixed
Frontend workflow, render requested page or whatever have to be done
bluebase_workflow() : void
Adds an Alert to the Stack
bb_add_alert(mixed $status, mixed $htmlText[, bool $dismissable = true ]) : void
Status (primary|secondary|success|danger|warning|info|light|dark)
Content of the Alert
Whether the alert is dismissable
Sets the Alert Stack
bb_set_alerts(array<string|int, mixed> $alerts) : void
Gets all Alerts
bb_get_alerts() : null|array<string|int, mixed>
Gets all loaded API Declarations
bb_get_declared_apis() : array<string|int, mixed>
Gets an API Message with Localized Messages
bb_get_apimessage(mixed $messagePath[, string $titlePath = "default" ][, bool $error = false ][, bool $vibrate = false ][, bool $forceLoginValidation = false ]) : null|APIMessage
Path to the Message
Path tot the Title (Default: default) - if null no title
Is the Message an error
If true, device gives haptic feedback
If true, device forced reauthorization by user
Gets an API Message with Localized Messages and Formats it
bb_format_apimessage(null|array<string|int, mixed> $formats, mixed $messagePath[, string $titlePath = "default" ][, bool $error = false ][, bool $vibrate = false ][, bool $forceLoginValidation = false ]) : null|APIMessage
String Formats
Path to the Message
Path tot the Title (Default: default) - if null no title
Is the Message an error
If true, device gives haptic feedback
If true, device forced reauthorization by user
Replace a String with all BB Vars
bb_replace_vars(mixed $str) : mixed
Creates an Url for a Path
bb_url(mixed $path[, bool $isPureHtml = false ]) : mixed
Alias for "bb_url"
_u(mixed $path[, mixed $isPureHtml = false ]) : mixed
Creates an Url for a Path with a Query
_uq(mixed $path[, mixed $query = null ][, bool $isPureHtml = false ]) : mixed
The Path
The Query
Whether the Url should be pure html
Returns the URL for an ViewController
_v(IViewController|string $viewController[, array<string|int, mixed>|null $query = null ][, bool $isPureHtml = false ][, mixed $notFound = "#" ]) : mixed
ViewController or his class
Trys to create a Url from a Real Path
bb_mkurl(mixed $path) : string|null
Path within the bb4 root dir
Returns null if it's impossible to create a url
Gets the current Context
getContext() : string
Sets the current Context
setContext(mixed $class) : void
Gets all Global Variables to use it, for instance in Templates
bb_get_vars([I18nLanguage|null $locale = null ][, ITheme|null $theme = null ][, mixed $transformSingleLevel = false ][, mixed $bypassCache = false ]) : array<string|int, mixed>
Returns the last Item in the history
bb_last_history([mixed $lastId = 0 ]) : void
Adds Entry to the History
bb_add_history(mixed $url) : mixed
Gets the History
bb_get_history() : mixed
Clears the BackendBuilders History
bb_clear_history() : void
Check if the Request Action is the given one
bb_do(mixed $action) : bool
Calls an Event
bb_call_event(string $eventType, mixed ...$args) : void
Registers an Event Handler
bb_register_eventhandler(string $eventType, callable $handler) : void
Event Type
Event Handler
Sets all EventHandlers
bb_set_eventhandlers(array<string|int, mixed> $handlers) : void
Gets all EventHandlers
bb_get_eventhandlers() : mixed
Adds an IP to the Whitelist
bb_add_ip_to_whitelist(mixed $ip) : void
IP to add
Removes an IP from the Whitelist
bb_remove_ip_from_whitelist(mixed $ip) : void
Gets the IP Whitelist
bb_get_ip_whitelist() : mixed
Checks if an IP is Whitelisted
bb_is_ip_whitelisted(mixed $ip) : bool
Imports an IP Whitelist
bb_import_ip_whitelist(array<string|int, mixed> $whitelist) : void
Array of IPs to import
Adds an IP to the Blacklist
bb_add_ip_to_blacklist(mixed $ip) : void
Removes an IP from the Blacklist
bb_remove_ip_from_blacklist(mixed $ip) : void
Gets the IP Blacklist
bb_get_ip_blacklist() : mixed
Checks if an IP is Blacklisted
bb_is_ip_blacklisted(mixed $ip) : bool
Imports an IP Blacklist
bb_import_ip_blacklist(array<string|int, mixed> $blacklist) : void
Array of IPs to import
Gets the current Configuration
config() : null|array<string|int, mixed>
Sets a property in the configuration
set_config(mixed $key, mixed $val) : void
Configuration Key
Configuration Value
Handles app-terminating errors in BB4
bb_error(mixed $errCode, mixed $error[, mixed $showPlain = true ]) : void
Error Code
Error Message
Issues a Nonce
issue_nonce([int $length = 8 ][, mixed $nonceId = "nonce" ]) : string
Length of the Nonce (Default: 8)
Checks a Nonces and invalidates a Session nonce
use_nonce(mixed $nonce[, mixed $nonceId = "nonce" ]) : bool
Nonce to check
Loads a JSON File
load_json_file(mixed $path[, bool $associative = true ]) : mixed
The File Path
Whether to return an associative array instead of an object
Loads a List File (.lst)
load_lst_file(mixed $path) : null|array<string|int, mixed>
The File Path
Puts an Object in the Cache
bb_cache(mixed $key, mixed $obj[, bool $session = false ]) : mixed
The Key the Item will stored by (must be unique, will be overwritten elsewise)
The Object to Store (can be CacheObject with own CachePolicy, else default CachePolicy will used)
Store the Item in the Session Cache?
Returns a Item from the cache if its not expired, else null
bb_cache_get(mixed $key[, bool $session = false ]) : mixed
Key the Item is stored in the Cache
Is the Item stored in the Session Cache?
Clears everything in the Cache
bb_cache_clear([bool $session = false ]) : void
If true, the session will be cleared, else only the just-in-time cache
Establishes a Database connection using the given configuration stack
bb_connectdb(array<string|int, mixed> $config) : bool
Configuration Stack with all Connection Parameters
Returns true if connection is established successful
Sets the core Database
bb_setdb(IDatabaseDriver $db) : void
DB to use
Gets the core Database or null
bb_db() : null|IDatabaseDriver
Returns whether the Core Database is connected
bb_dbconnected() : bool
Returns whether the Core Database is alive
bb_dbalive() : bool
Gets all installed BB4 Locales
bb_get_locales() : null|array<string|int, mixed>
Gets all installed BB4 Locales
bb_get_installed_locales() : null|array<string|int, mixed>
Gets all essential informations about a bb4 locale
locale_get_info(I18nLanguage $locale) : array<string|int, null|string>
Loads a locale by its fqn or null if nothing similiar can be found
bb_load_locale(mixed $fqn) : null|I18nLanguage
Full Qualified Name of the Language
Gets the current active Locale or null if the initialization isn't executed successfully
bb_this_locale() : null|I18nLanguage
Sets the current active Locale
bb_set_this_locale(I18nLanguage $locale) : void
Locale Instance
Gets the directory for the Locale Files
bb_get_localedir() : string
Gets the Localized String by its Path
bb_get_string(mixed $path[, string|int|float $values = null ]) : null|string
StringPath
Values
Alias for "bb_get_string"
__(mixed $path[, string|int|float $values = null ]) : null|string
StringPath
Values
Gets the String using a Context instead of a Path
___(mixed $string[, mixed $values = null ][, mixed $context = null ]) : null|string
The Strings Name
Values to insert
Context or null for current context
Formats all I18n Data Strings with the given vars
bb_format_i18n_data(mixed $localeData, mixed $subVars) : null|array<string|int, mixed>
Sends a Mail using the configured Mailer and a template in the current theme
bb_send_mail_template(string|array<string|int, mixed> $to, string $subject, string $template, array<string|int, mixed> $vars, null|array<string|int, mixed> $attachments[, null|string $from = null ][, null|string $from_name = null ][, bool $isBodyHtml = true ][, string $charset = "UTF-8" ]) : bool
Recipients as array or string (mail1;mail2 or mail1,mail2 or mail1 mail2)
The Mails subject
Mail Template name
Vars for the Mail Template
Attachment Files or null
Overwrite the From Mail
Overwrite the From Name
Is the Body Html
Charset for the Body
True if sent successful or false if failed
Sends a Mail using the configured Mailer
bb_send_mail(string|array<string|int, mixed> $to, string $subject, string $body, null|array<string|int, mixed> $attachments[, null|string $from = null ][, null|string $from_name = null ][, bool $isBodyHtml = true ][, string $charset = "UTF-8" ]) : bool
Recipients as array or string (mail1;mail2 or mail1,mail2 or mail1 mail2)
The Mails subject
The Body (HTML or Plain text)
Attachment Files or null
Overwrite the From Mail
Overwrite the From Name
Is the Body Html
Charset for the Body
True if sent successful or false if failed
Registers a Mail Driver
bb_register_maildriver(mixed $type, IMailDriver $driver) : void
Type for configuration
Mail Driver Instance
Gets the Mail Driver
bb_get_maildriver(mixed $type) : null|IMailDriver
Type for configuration
null if no driver is registered to this name
Registers a Database Driver
bb_register_dbdriver(mixed $type, IDatabaseDriver $driver) : void
Type for configuration
DB Driver Instance
Gets a Database Driver registered to the type
bb_get_dbdriver(mixed $type) : null|IDatabaseDriver
Database Type
Gets the Menus
bb_get_menus() : null|array<string|int, mixed>
Gets the Menu by the Id
bb_get_menu(mixed $menuId) : null|array<string|int, mixed>
Registers a MenuItem in a category
bb_register_menuitem(mixed $menuId, mixed $category, MenuItem $item[, mixed $permissionRequired = null ]) : void
Id of the Menu (for instance: MainMenu, FooterMenu)
Category in the Menu
Item
Returns a Sorted Navigation for all Items
bb_sort_navigation() : array<string|int, mixed>
Gets all loaded Themes
bb_get_themes() : array<string|int, mixed>
Loads a theme by its Name, if not found or any errors by loading it the return will be null
bb_load_theme(mixed $theme) : null|ITheme
Name of the Theme to be loaded
Returns null if any error or the theme doesn't exists
Returns the current loaded theme or null if the initialization isn't executed successfully
bb_this_theme() : null|ITheme
Sets the current loaded theme
bb_set_this_theme(ITheme $theme) : void
Theme to be set as loaded
Gets all installed BB4 Themes
bb_get_installed_themes() : null|array<string|int, mixed>
Gets all essentials informations about a bb4 theme
theme_get_info(ITheme $theme[, mixed $className = null ]) : array<string|int, mixed>
Registers a custom TwigFilter
bb_register_twigfilter(TwigFilter $filter) : void
Sets the Custom TwigFilter Stack
bb_set_twigfilters(array<string|int, mixed> $alerts) : void
Gets all Custom TwigFilters
bb_get_twigfilters() : null|array<string|int, mixed>
bb_request(mixed $requested) : bool
Displays an error Page
bb_show_error(mixed $errorCode[, mixed $isApi = false ]) : never
Error Code for Informations
Displays a 404 Page
bb_show_404() : never
Tells bb4 that a login is required, so it shows its login page
bb_require_login() : string
Performs the BB4 Login
bb_perform_login() : bool
Registers a callable for the initialization process
bb_register_init(callable $callback[, int $priority = 99 ]) : void
Initialization Callable
Priority, the higher the number, the lower the priority. If the priority is less than 0 the initialization will be called before bb4 initialization
Calls all custom registered initialization methods
bb_call_userinit([bool $postInitialization = true ]) : void
If false, only all Initializations Priorities less than 0 will be calles, if true all equals or larger than 0
Register a ViewController to the BB4 View Stack
bb_register_viewcontroller(IViewController $viewController[, mixed $slug = null ]) : bool
ViewController to register
Path (URL-Path), for instance path/to/viewcontroller becomes to www.website.org/path/to/viewcontroller
Returns false if the path is used by another view controller
Gets the Path for a View Controller from the ViewControllerStack
bb_path_for_viewcontroller(IViewController $viewController) : null|string
ViewController to find Path
Gets the ViewController for the given Path or null if not found
bb_get_viewcontroller(mixed $path) : null|IViewController
Path the ViewController is registered to
Get all registered ViewControllers
bb_get_viewcontrollers() : array<string|int, mixed>
Registers a Modal
bb_register_modal(IModal $modal) : bool
Modal to register
Gets a registered Modal by its ID
bb_get_modal(mixed $id) : null|IModal
ID of the Modal
Gets all registered Modals
bb_get_modals() : array<string|int, mixed>
Gets the URL for a Modal by its ID
bb_modal_url_for_id(mixed $modalId[, null|array<string|int, mixed> $query = null ]) : null|string
Modal ID
Query String
Gets the URL for a Modal
bb_modal_url(Modal|string $modalOrClass[, null|array<string|int, mixed> $query = null ]) : null|string
Gets the URL for a Modal (alias for bb_modal_url)
_m(Modal|string $modalOrClass[, null|array<string|int, mixed> $query = null ]) : null|string
Registers a custom Action for Path to the BB4 Stack
bb_register_path_action(mixed $path, IRequestAction $action) : bool
Path (URL-Path), for instance path/to/action becomes to www.website.org/path/to/action
Callable if this path is called
Returns false if the path is used
Registers a static Route to the BB4 Stack
bb_register_route(mixed $routePath, IRoute $route) : bool
Path (URL-Path), for instance path/to/route becomes to www.website.org/path/to/route
Route to register
Returns false if the path is used
Registers a dynamic Route to the BB4 Stack
bb_register_dynamic_route(mixed $routePath, IRoute $route[, mixed $regex = null ]) : bool
Path (URL-Path), for instance path/to/{0}/{1} becomes to www.website.org/path/to/123/456
Route to register
Optional Regex for the Route (for instance {0} = \d+)
Matches a dynamic route against the given URI
bb_match_dynamic_route(mixed $uri) : array<string|int, mixed>|false
URI to match
Sets the RESTful API Keys
bb_set_rest_api_keys(mixed $keys) : void
Array of RESTful API Keys
Gets all registered RESTful API Keys
bb_get_rest_api_keys() : mixed
Gets the RESTful API Key Header
bb_get_rest_api_key_header() : mixed
Registers a RESTful Route to the BB4 Stack
bb_use_rest() : void
Registers an AJAX Route to the BB4 Stack
bb_use_ajax() : void
Registers a generic Route to the BB4 Stack
bb_register_generic_route(mixed $routePath, callable $exec[, mixed $accessPermission = null ]) : bool
The Path to register
The Execution Function
Access Permission for the Route (optional)
Gets the Action for the given Path or null if not found
bb_get_route(mixed $path) : null|IRequestAction
Path the action is registered to
Parses the given Path and returns the matching Route
bb_parse_route(mixed $path, mixed &$args) : null|IRoute
The Path to parse
Arguments for the Route out of the Path
Returns all registered static Routes
bb_get_routes() : array<string|int, mixed>
Returns all registered dynamic Routes
bb_get_dynamic_routes() : array<string|int, mixed>
Registers a custom API to the BB4 Stack
bb_register_api(IAPIDeclaration $api) : mixed
API to register
bb_get_apis() : mixed
Sets the IP Geolocation Service to use
bb_set_geoip_service(IIPGeoLocationService $service) : void
Service to register
Gets the IP Geolocation Service
bb_get_geoip_service() : mixed
Geocodes an IP Address if a Geolocation Service is set
bb_geocode_ip(mixed $ip) : GeoIPResponse|null
Set the default Path for an non-set requested action
bb_set_defpath(mixed $path) : void
Default Path
Gets the default Path if the requested action is not set
bb_get_defpath() : mixed
Sets the Path for the My Account Page
bb_set_path_myaccount(mixed $path) : void
Path to set
Gets the Path for the My Account Page
bb_get_path_myaccount() : mixed
Sets the ActionPath if the requested Path doesn't exists.
bb_set_404path(mixed $path) : void
Path to the 404 Page or Action
Gets the ActionPath for error code 404
bb_get_404path() : mixed
Gets the Root Directory of the BB4 Application
bb_get_rootdir([mixed $subPath = null ]) : string
May you want to append some subdir/file to get a full path
Send the Content Type Header (only if headers not sent yet)
bb_send_content_type([string $mimeType = Constants::JSON_MIME ][, string $encoding = null ]) : void
Content Type
Content Encoding
Starts a session
bb_start_session() : bool
true if session is started successfully
Destroys a running session
bb_destroy_session() : bool
true if session is destroyed successfully
Reads the stored Device Authentication base token from the session
bb_get_user_auth() : string|null
Stores the Device Authentication base token in the session
bb_set_user_auth(mixed $token) : void
BaseToken
class_SetProperties(array<string|int, mixed> $array, mixed &$obj) : mixed
class_getProperty(mixed $obj, mixed $property) : mixed
class_toArray(object|null $obj) : mixed
class_toMultiArray(array<string|int, mixed> $objArray) : mixed
array_getSingleLevel(array<string|int, mixed> $multiLevel[, mixed $delimiter = "->" ][, mixed $onlyStrings = false ]) : mixed
array_csv(array<string|int, mixed> $fields) : string
array_rows_csv(array<string|int, mixed> $rows) : string
array_replaceKeys(mixed $oldKey, mixed $newKey, array<string|int, mixed> $input) : mixed
array_removeByValue(mixed &$array, mixed $value) : mixed
sql_BuildWhereClause(array<string|int, mixed>|null $whereData) : mixed
sha256_generateToken([mixed $seed = null ]) : mixed
_rv(IViewController $viewController[, mixed $authenticatedUser = null ][, mixed $exit = false ]) : mixed
strex_randomString([mixed $length = 10 ]) : mixed
strex_getRangeString(mixed $str[, mixed $isNumericRange = false ][, mixed $uniqueItems = true ][, string $baseDelimiter = "," ][, string $rangeDelimiter = "-" ]) : mixed
strex_replaceByArray(mixed $str, array<string|int, mixed> $replace[, mixed $prefix = "" ][, mixed $suffix = "" ][, mixed $replaceValues = false ][, mixed $twoLevelReplacements = false ]) : mixed
strex_startsWith(mixed $string, mixed $startsWith) : mixed
strex_startsWithIgnorecase(mixed $string, mixed $startsWith) : mixed
strex_endsWith(mixed $string, mixed $endsWith) : mixed
strex_endsWithIgnorecase(mixed $string, mixed $endsWith) : mixed
strex_contains(mixed $string, mixed $what) : mixed
strex_containsIgnorecase(mixed $string, mixed $what) : mixed
Combines Parts in an Array using the delimiter
strex_pathCombine(array<string|int, mixed> $parts[, string $delimiter = "/" ]) : string
All Parts to combine
Delimiter
Limits a String to only some allowed characters
strex_limitToChars(mixed $input, mixed $allowedChars[, string $replaceTo = "" ]) : true
Replaces Occurences defined by Patterns using Regex
regex_replace(string $in, array<string|int, mixed> $patterns) : string
StringStack for Replacement
All Patterns to replace ("PATTERN (A-z*)" => "Replace $1")
php_getDeclaredClassesOfType(mixed $class) : mixed
php_autoload(mixed $directory[, bool $includeSubdirs = false ]) : mixed
dir_includeFiles(mixed $directory[, array<string|int, mixed>|null $extFilter = null ][, bool $includeSubdirs = false ]) : mixed
dir_getFiles(mixed $directory[, array<string|int, mixed>|null $extFilter = null ][, bool $includeSubdirs = false ][, bool $useFullPath = true ]) : mixed
dir_getDirectories(mixed $directory[, bool $includeSubdirs = false ]) : mixed
file_GetNameWithoutExtension(mixed $fileName) : mixed
sess_get(mixed $key[, mixed $null = null ]) : mixed
query_get(mixed $key[, mixed $null = null ]) : mixed
post_get(mixed $key[, mixed $null = null ]) : mixed
header_get(mixed $header[, mixed $null = null ]) : mixed
arr_get(mixed $arr, mixed $key[, mixed $default = null ]) : mixed
boolvalex(mixed $value) : mixed
mail_splitaddresses(mixed $addresses) : array<string|int, mixed>
sql_GetWhereSelector(mixed $fieldName, mixed $idValue[, mixed $useLike = false ]) : mixed
sql_BuildOptions(array<string|int, mixed>|null $options) : mixed
sql_BuildList(array<string|int, mixed>|null $options) : mixed
sql_BuildBaseFilter(array<string|int, mixed>|null $filter) : array<string|int, mixed>
sql_BuildInsertString(object $obj[, array<string|int, mixed>|null $ignoreFields = null ][, array<string|int, mixed>|null $skipFieldsIfEmpty = null ][, array<string|int, mixed>|null $notNullableFields = null ][, bool $hideInsertIndex = false ]) : mixed
sql_BuildUpdateString(object $obj[, array<string|int, mixed>|null $ignoreFields = null ][, array<string|int, mixed>|null $skipFieldsIfEmpty = null ][, array<string|int, mixed>|null $notNullableFields = null ][, mixed $idField = null ]) : mixed
php_safe_redirect(mixed $title, mixed $url[, mixed $exit = true ]) : mixed
safe_redirect(mixed $url) : mixed
php_get_current_url([mixed $includeQuery = false ]) : mixed
html_sanitize(mixed $buffer) : mixed
Gets the Difference between two times
time_diff(mixed $time1, mixed $time2) : int|float
Calculates the Difference between two Dates
calc_date_diff(mixed $date1, mixed $date2[, bool $returnAsDate = false ]) : string|array<string|int, float>
Date one
Date two
Return the result formatted as Y-m-d ?
Converts a Time HH:mm to a Decimal Time
date_toDecimalHours(mixed $time) : mixed
Time in HH:mm format (H:i in PHP)
Converts a Decimal Time to HH:mm
decimal_HoursToFormat(mixed $dbl) : string
Decimal Time
Converts a Time in Minutes to HH:mm
convertToHoursMins(mixed $time[, string $format = '%02d:%02d' ]) : string
Time in Minutes
Format
Returns the Days between two dates
days_between_dates(mixed $date1, mixed $date2[, mixed $preventNegative = true ]) : float
Date 1
Date 2
Checks if a Date is Expired
is_expired(mixed $date, mixed $expirationDays) : bool
Date to check
Expiration days
Gets all Uploaded Files for a multi File POST Upload
php_getUploadedFiles(mixed $name) : array<string|int, mixed>|null
Name of the File Field
Gets all Post Fields starting with
php_getPostFieldsStartsWith(mixed $startsWith[, bool $includeValues = false ]) : array<string|int, mixed>|null
Chars the POST Field starts with
If true, the Key will be the field without startswith and the value is the POST Value
Gets all Allowed characters in an URL
get_url_allowed_chars() : string
Gets a Slug for a given string
make_page_slug(mixed $str[, mixed $tolower = true ]) : string|null
Limits the string to a FileName
make_file_name(mixed $str[, bool $tolower = false ]) : string|array<string|int, string>|null
Validates an EU Vat ID
strex_validateEuVatID(mixed $vatId) : bool
Vat ID
Validates a Name
strex_validateName(mixed $name) : bool
Input Name
Validates a Phone Number
strex_validatePhone(mixed $phone) : bool
Parses a Name from a string (must starts with firstname)
strex_parseName(mixed $name[, bool $middleName = false ]) : null|array<string|int, mixed>
Input name
Parse Middle Name, will include Middle Names as seperat parts, ID: 0 First Name, ID 1: Middle Name, ID 3: Last name
Will return Array with Names, by default ID 0: First Name, ID: 1 Last name
Gets rendered Options
options(array<string|int, mixed>|null $options[, mixed $shown = 3 ][, mixed $isAdvancedTable = true ]) : mixed
Render Inline Options
options_inline(null|array<string|int, mixed> $options, mixed $isAdvancedTable) : string
Render DropDown Options
options_dropdown(null|array<string|int, mixed> $options) : string
Creates a new Option Item
option(mixed $text, mixed $icon, mixed $href[, array<string|int, mixed>|null $hrefAttributes = null ][, mixed $autoApplyTitleAttribute = true ]) : array<string|int, mixed>
Text for the Item
Icon class or null
Link
Creates a new Modal Option Item
modal_option(mixed $text, mixed $icon, mixed $modalId[, bool $reusable = false ][, array<string|int, mixed>|null $queryParameters = null ][, null|array<string|int, mixed> $customAttributes = null ][, bool $autoApplyTitleAttribute = true ]) : void
Text for the Item
Icon class or null
Modal ID
Checks if a Date is valid
check_date(mixed $date[, bool $isTime = false ]) : bool
Date to check
is the Date already converted to time?
Checks if a Time is valid
check_time(mixed $time) : int|false
Time in HH:MM Format
Reverse nl2br
br2ln(mixed $str[, string $lbr = "
" ]) : mixed
String to Replace
Linebreak Characters
Resizes an Image to a destination size Supported: image/jpeg image/gif image/png
resize_image(mixed $imagePath, mixed $width, mixed $height[, mixed $fileName = null ]) : never
Validates a File
validate_file(mixed $fileName[, null|array<string|int, mixed> $allowedMimeTypes = null ][, mixed $maxFileSize = null ]) : bool
Full path to the File
Array with allowed mime types
Maximum File Size
Validates an Image File
validate_image(mixed $fileName[, null|array<string|int, mixed> $allowedMimeTypes = null ][, mixed $maxFileSize = null ]) : bool
Full File Name
Array with allowed mime types
Maximum File Size
Checks whether a String is valid Json
validate_json(mixed $string) : bool
Scales a Size by Ratio
scale_by_ratio(mixed $width, mixed $height, mixed $newWidth[, mixed $newHeight = null ][, bool $preventUpscale = true ]) : array<string|int, mixed>
Original Width
Original Height
Scaled Width or null to scale width
Scaled Height or null to scale height
Prevent Upscaling
Gets all Dates in a Range
get_dates_in_range(mixed $firstDate, mixed $lastDate[, callable $checkDateCallback = null ]) : array<string|int, mixed>|null
Checks if a Date is a WeekDay
is_weekday(mixed $date[, bool $isTime = false ][, array<string|int, mixed> $weekDays = [1, 2, 3, 4, 5] ]) : bool
Date to check
Is the Date a Time
WeekDays
Formats the time using the current active locale
format_time(mixed $time[, bool $isTime = false ]) : string|false
Time to format
is the given Time already a parsed time?
Formats the date using the current active locale
format_date(mixed $time[, bool $isTime = false ]) : string|false
Time to format
is the given Time already a parsed time?
Formats the datetime using the current active locale
format_datetime(mixed $time[, bool $isTime = false ]) : string|false
Time to format
is the given Time already a parsed time?
Formats a decimal to local format
format_decimal(float $decimal[, mixed $decimals = 2 ][, mixed $trimZeros = false ]) : string
Decimal
Formats a Price to Local Format (without currency symbol)
format_price(mixed $price) : null|string
Parses a price the local format
parse_price(string $localized) : float
Decimal
Parses a decimal from the local format
parse_decimal(string $localized) : float
Decimal
Returns the current remote peers ip address
get_ip() : mixed
Gets the Value of the Authorization Header
get_auth_header([string $headerName = "AUTHORIZATION" ][, bool $parseHeader = false ]) : mixed
Name of the Auth Header
Parses the Authorization Header
parse_auth_header(mixed $headerData) : false|array<string|int, string>
Sets a Var in the Global Directory
__setVar(mixed $var, mixed $val) : void
Key
Value
Gets a Var from the Global Directory
__getVar(mixed $var[, mixed $default = NULL ]) : mixed
Key
Default Value, if Key not found
Sanitizes the HTML Output
sanitize_output(mixed $buffer) : mixed
Gets the Value of a Key in an Array
getAttributesFromField(string $class, string $fieldName) : array<string|int, mixed>
Gets a specific Attribute from a Field if it exists
getAttributeIfExists(string $class, string $fieldName, string $attributeName) : mixed
The Class
The Field Name
The Attribute Name
isValidUUIDv4(mixed $uuid) : mixed
com_create_guid() : mixed
Creates a Seeded GUID
create_seeded_guid(string $seed) : string
The Seed
Sets a Cookie
bb_setCookie(mixed $name, mixed $value, mixed $expires[, string $samesite = "None" ]) : bool
The Name of the Cookie
Value of the Cookie
When the Cookie expires
If the Cookie is SameSite
If the Cookie was set
twig_load(mixed $templateDir) : Environment
Tries to find a content formatter by its mime type
findContentFormatter(mixed $mimeType) : object|null
The mime type to search for
Gets all declared content formatters
getDeclaredContentFormatters() : array<string|int, string>
Tries to get the requested response content formatter
getRequestedResponseContentFormatter([mixed $default = null ]) : mixed
The default formatter to return if none is found
Gets the requested response format
getRequestedResponseFormat() : null|array<string|int, mixed>
Determines if the request body contains form data ($_POST)
isFormEncoded(string $body) : bool
The request body
Returns the form fields of the current request
getFormFields(string $body) : array<string|int, mixed>
bb_log(mixed $event[, mixed $warnLevel = Constants::LOG_INFO ][, mixed $time = null ]) : mixed
bb_clear_expired_logs() : mixed
bb_get_logs_dir() : mixed
Registers a RESTful API method
bb_register_REST_api(float $version, mixed $requestMethod, mixed $alias, callable $function[, bool $requiresAuth = false ][, mixed $requiredPermission = null ][, mixed $requiredFields = null ]) : void
The request method (GET, POST, PUT, DELETE)
Path of the API (e.g. "category/method")
The function that should be called when the API is requested (must accept one parameter for the payload)
True if the API requires authentication
The permission that is required to access the API if it requires authentication
The fields that are required in the payload
Returns the Request Method of the current request (GET, POST, PUT, DELETE)
bb_get_request_method() : string
Returns the JSON payload of the current request
bb_get_json_payload() : mixed
Get header Authorization
getAuthorizationHeader() : mixed
get access token from header
getBearerToken() : mixed
Returns an API Error
api_error(mixed $error[, array<string|int, mixed> $fields = [] ]) : array<string|int, mixed>
Error Message
Fields
Returns an API Success
api_success(mixed $data) : array<string|int, mixed>
Data