DiceModel
extends MagnaRegulaModel
in package
Table of Contents
Constants
- _APPLICATION_NAME = "Magna Regula"
- _SEVERITY_KO = 2
- _SEVERITY_OK = 0
- _SEVERITY_TEXT = array(\BaseModel::_SEVERITY_OK => 'OK', \BaseModel::_SEVERITY_WARN => 'WARNING', \BaseModel::_SEVERITY_KO => 'KO')
- _SEVERITY_WARN = 1
- _TEXT_CODESET = "UTF-8"
- _TEXT_DOMAIN = "magnaregula"
- API_TOKEN_INVALID = 895
- API_TOKEN_NOT_ACTIVE = 897
- API_TOKEN_NOT_FOUND = 896
- API_TOKEN_TOO_OLD = 899
- API_TOKEN_TOO_YOUNG = 898
- DEFAULT_STATIC_FILES_REPOSITORY_URL = 'DEFAULT_STATIC_FILES_REPOSITORY_URL'
- DEFAULT_TINYMCE_EDITOR_CHARACTER_CSS_PATH = "/css/tinymce_editor_character.css"
- DEFAULT_TINYMCE_EDITOR_SCENARIO_CSS_PATH = "/css/tinymce_editor_scenario.css"
- FULL_POINTS_JSON = 'FULL_POINTS_JSON'
- MAIN_3DANIM_IMAGE = 'MAIN_3DANIM_IMAGE'
- MAIN_3DVIEW_IMAGE = 'MAIN_3DVIEW_IMAGE'
- MAIN_3DVIEW_MAP_IMAGE = 'MAIN_3DVIEW_MAP_IMAGE'
- MAIN_OVER_COLLIDER_IMAGE = 'MAIN_OVER_COLLIDER_IMAGE'
- MAIN_OVER_MAP_IMAGE = 'MAIN_OVER_MAP_IMAGE'
- MESH_PREFAB_ASSETBUNDLE = 'MESH_PREFAB_ASSETBUNDLE'
- NODEJS_GENERATE_PDF_CHARACTER_URL = 'NODEJS_GENERATE_PDF_CHARACTER_URL'
- NODEJS_GENERATE_PDF_SCENARIO_URL = 'NODEJS_GENERATE_PDF_SCENARIO_URL'
- ORIGINAL_OVER_MAP_IMAGE = 'ORIGINAL_OVER_MAP_IMAGE'
- PRINT_DEFAULT_FONT_FAMILY = "Georgia"
- PRINT_DEFAULT_FONT_SIZE = "10pt"
- PRINT_DEFAULT_FORMAT = "A4"
- SSB_CODE_ASSETOBJECTS = "S3-ASSETOBJECTS"
- SSB_CODE_CHARACTERS = "S3-CHARACTERS"
- SSB_CODE_SCENARIOS = "S3-SCENARIOS"
- SSB_CODE_TILEOBJECTS = "S3-TILEOBJECTS"
- VALUE_IS_INT = 2
- VALUE_IS_UUID = 1
- WATABOU_GENERATION_LOG = 'WATABOU_GENERATION_LOG'
- WEBSERVICES_ROOT_URL = 'WEBSERVICES_ROOT_URL'
Properties
- $_chr_params_fields_to_extract : mixed
- $_control_owner : mixed
- $_default_character_json_settings : mixed
- $_default_print_formats : mixed
- $_default_print_formats0 : mixed
- $_default_scenario_json_settings : mixed
- $_files_repositories_codes : mixed
- $_list_fields_to_localize : mixed
- $_objectName : mixed
- $_rul_params_fields_to_extract : mixed
- $_sql_select_token : mixed
- $_tableLOCALEKEYCode : mixed
- $_tableMainCode : mixed
- $_tableName : mixed
- $_tablePrefix : mixed
- $_token_id : mixed
- $_alternative_keys_for_localize : mixed
- $_dbconn_read : mixed
- $_dbconn_write : mixed
- $_delete_locale : mixed
- $_errormessages : mixed
- $_sql_check_maincode : mixed
- $_sql_delete : mixed
- $_sql_inserts : mixed
- $_sql_list : mixed
- $_sql_list_all : mixed
- $_sql_list_locales : mixed
- $_sql_load : mixed
- $_sql_load_by_key : mixed
- $_sql_translate : mixed
- $_sql_updates : mixed
- $_update_locale : mixed
- $_with_block_for_localize : mixed
- $_dbconnection_read : mixed
- $_dbconnection_write : mixed
Methods
- __() : mixed
- __construct() : mixed
- __destruct() : mixed
- _add_last_slash_if_not() : mixed
- _add_localised_fields() : mixed
- _append_to_file_static() : mixed
- _bind_params() : mixed
- _bindtextdomain() : mixed
- _build_array_for_prepare() : mixed
- _build_block() : string
- Returns a block of text, with variables, replaced
- _build_block_dollar() : mixed
- _build_block_generic() : mixed
- _build_error_message() : mixed
- _build_fields_list_when_localizedkeys() : mixed
- _build_json_settings() : mixed
- _call_ws() : mixed
- Calls a webservice
- _check_fields_for_delete() : mixed
- _check_fields_for_insert() : mixed
- _check_fields_for_update() : mixed
- _check_fields_for_update_post_load() : none
- Allows to complete $fields array, with informations stored in current row (row BEFORE update) Different from '_check_fields_for_update', because '_check_fields_for_update' fires BEFORE load BEFORE update.
- _check_maincode_for_insert() : mixed
- _check_maincode_for_update() : mixed
- _complete_fields_to_load() : mixed
- _connect_for_read() : object
- Returns a pointer to PDO object instance, for read operations on database Memorizes it in $this->_dbconn_read
- _connect_for_write() : object
- Returns a pointer to PDO object instance, for write operations on database Memorizes it in $this->_dbconn_write
- _db_query() : array<string|int, mixed>
- Perform a read query (SELECT) on database
- _db_query_range() : array<string|int, mixed>
- Perform a limited (offset+limit) read query (SELECT) on database
- _delete() : mixed
- _delete_locale() : mixed
- _disconnect_for_read() : none
- Clear the pointer to PDO object read instance
- _disconnect_for_write() : none
- Clear the pointer to PDO object write instance
- _escape_single_quote_for_db() : mixed
- _extract_extension() : mixed
- _extract_values_from_field_to_extract() : mixed
- _find_array_key_by_value() : mixed
- _get_errormessage() : mixed
- _insert() : mixed
- _is_int_or_uuid() : mixed
- _is_owner_of() : mixed
- _is_token_valid() : mixed
- _normalize_fields() : mixed
- _normalize_int() : mixed
- _only_alphanum() : mixed
- _perform_other_action_after_delete() : mixed
- _perform_other_action_after_insert() : mixed
- _perform_other_action_after_update() : mixed
- _prepare_return_after_update() : mixed
- _prepare_sql_for_update() : mixed
- _search_print_format_by_locale() : mixed
- _set_sql_list() : mixed
- _switch_text_to_locale() : mixed
- _translate_output() : mixed
- _translate_output0() : mixed
- _translate_pdf_block() : mixed
- _translate_text() : string
- Translate a text, by calling __()
- _update() : array<string|int, mixed>
- Perform an UPDATE
- _update_locale() : mixed
- adapt_formula() : mixed
- delete_url() : mixed
- DELETE a webservice
- get_sql_delete() : mixed
- get_sql_inserts() : mixed
- get_sql_list_locales() : mixed
- get_sql_translate() : mixed
- get_sql_updates() : mixed
- get_url() : mixed
- GET a webservice
- getGUID() : mixed
- getGUIDv2() : mixed
- list_in_account() : mixed
- list_in_parent() : mixed
- list_locales() : mixed
- load() : mixed
- load_by_key() : mixed
- post_url() : mixed
- POST a webservice
- put_url() : mixed
- PUT a webservice
- query_by_id() : array<string|int, mixed>
- Perform a query to lookup ONE DB instance, based on its main key (integer)
- query_by_key() : array<string|int, mixed>
- Perform a query to lookup ONE DB instance, based on its main key (string/integer)
- roll() : mixed
- tblist() : mixed
- tblist_all() : mixed
Constants
_APPLICATION_NAME
public
mixed
_APPLICATION_NAME
= "Magna Regula"
_SEVERITY_KO
public
mixed
_SEVERITY_KO
= 2
_SEVERITY_OK
public
mixed
_SEVERITY_OK
= 0
_SEVERITY_TEXT
public
mixed
_SEVERITY_TEXT
= array(\BaseModel::_SEVERITY_OK => 'OK', \BaseModel::_SEVERITY_WARN => 'WARNING', \BaseModel::_SEVERITY_KO => 'KO')
_SEVERITY_WARN
public
mixed
_SEVERITY_WARN
= 1
_TEXT_CODESET
public
mixed
_TEXT_CODESET
= "UTF-8"
_TEXT_DOMAIN
public
mixed
_TEXT_DOMAIN
= "magnaregula"
API_TOKEN_INVALID
public
mixed
API_TOKEN_INVALID
= 895
API_TOKEN_NOT_ACTIVE
public
mixed
API_TOKEN_NOT_ACTIVE
= 897
API_TOKEN_NOT_FOUND
public
mixed
API_TOKEN_NOT_FOUND
= 896
API_TOKEN_TOO_OLD
public
mixed
API_TOKEN_TOO_OLD
= 899
API_TOKEN_TOO_YOUNG
public
mixed
API_TOKEN_TOO_YOUNG
= 898
DEFAULT_STATIC_FILES_REPOSITORY_URL
public
mixed
DEFAULT_STATIC_FILES_REPOSITORY_URL
= 'DEFAULT_STATIC_FILES_REPOSITORY_URL'
DEFAULT_TINYMCE_EDITOR_CHARACTER_CSS_PATH
public
mixed
DEFAULT_TINYMCE_EDITOR_CHARACTER_CSS_PATH
= "/css/tinymce_editor_character.css"
DEFAULT_TINYMCE_EDITOR_SCENARIO_CSS_PATH
public
mixed
DEFAULT_TINYMCE_EDITOR_SCENARIO_CSS_PATH
= "/css/tinymce_editor_scenario.css"
FULL_POINTS_JSON
public
mixed
FULL_POINTS_JSON
= 'FULL_POINTS_JSON'
MAIN_3DANIM_IMAGE
public
mixed
MAIN_3DANIM_IMAGE
= 'MAIN_3DANIM_IMAGE'
MAIN_3DVIEW_IMAGE
public
mixed
MAIN_3DVIEW_IMAGE
= 'MAIN_3DVIEW_IMAGE'
MAIN_3DVIEW_MAP_IMAGE
public
mixed
MAIN_3DVIEW_MAP_IMAGE
= 'MAIN_3DVIEW_MAP_IMAGE'
MAIN_OVER_COLLIDER_IMAGE
public
mixed
MAIN_OVER_COLLIDER_IMAGE
= 'MAIN_OVER_COLLIDER_IMAGE'
MAIN_OVER_MAP_IMAGE
public
mixed
MAIN_OVER_MAP_IMAGE
= 'MAIN_OVER_MAP_IMAGE'
MESH_PREFAB_ASSETBUNDLE
public
mixed
MESH_PREFAB_ASSETBUNDLE
= 'MESH_PREFAB_ASSETBUNDLE'
NODEJS_GENERATE_PDF_CHARACTER_URL
public
mixed
NODEJS_GENERATE_PDF_CHARACTER_URL
= 'NODEJS_GENERATE_PDF_CHARACTER_URL'
NODEJS_GENERATE_PDF_SCENARIO_URL
public
mixed
NODEJS_GENERATE_PDF_SCENARIO_URL
= 'NODEJS_GENERATE_PDF_SCENARIO_URL'
ORIGINAL_OVER_MAP_IMAGE
public
mixed
ORIGINAL_OVER_MAP_IMAGE
= 'ORIGINAL_OVER_MAP_IMAGE'
PRINT_DEFAULT_FONT_FAMILY
public
mixed
PRINT_DEFAULT_FONT_FAMILY
= "Georgia"
PRINT_DEFAULT_FONT_SIZE
public
mixed
PRINT_DEFAULT_FONT_SIZE
= "10pt"
PRINT_DEFAULT_FORMAT
public
mixed
PRINT_DEFAULT_FORMAT
= "A4"
SSB_CODE_ASSETOBJECTS
public
mixed
SSB_CODE_ASSETOBJECTS
= "S3-ASSETOBJECTS"
SSB_CODE_CHARACTERS
public
mixed
SSB_CODE_CHARACTERS
= "S3-CHARACTERS"
SSB_CODE_SCENARIOS
public
mixed
SSB_CODE_SCENARIOS
= "S3-SCENARIOS"
SSB_CODE_TILEOBJECTS
public
mixed
SSB_CODE_TILEOBJECTS
= "S3-TILEOBJECTS"
VALUE_IS_INT
public
mixed
VALUE_IS_INT
= 2
VALUE_IS_UUID
public
mixed
VALUE_IS_UUID
= 1
WATABOU_GENERATION_LOG
public
mixed
WATABOU_GENERATION_LOG
= 'WATABOU_GENERATION_LOG'
WEBSERVICES_ROOT_URL
public
mixed
WEBSERVICES_ROOT_URL
= 'WEBSERVICES_ROOT_URL'
Properties
$_chr_params_fields_to_extract
public
mixed
$_chr_params_fields_to_extract
= array()
$_control_owner
public
mixed
$_control_owner
= \FALSE
$_default_character_json_settings
public
static mixed
$_default_character_json_settings
= array('print' => array('format' => \NULL, 'font' => \NULL, 'size' => \NULL))
$_default_print_formats
public
static mixed
$_default_print_formats
= array('format_type' => array('A4' => array('locale' => 'fr', 'value' => 'A4', 'value_puppeteer' => 'A4', 'width' => '21cm', 'height' => '29.7cm', 'margin_vertical' => '1.5cm', 'margin_horizontal' => '1.5cm'), 'US Letter' => array('locale' => 'en', 'value' => 'Letter', 'value_puppeteer' => 'letter', 'width' => '8.5in', 'height' => '11in', 'margin_vertical' => '1.5cm', 'margin_horizontal' => '1.5cm')), 'font_family' => array('Georgia' => array('value' => 'Georgia, Times New Roman, serif'), 'Arial' => array('value' => 'Arial, sans-serif')), 'font_size' => array('10pt' => array('value' => '10pt'), '12pt' => array('value' => '12pt')))
$_default_print_formats0
public
static mixed
$_default_print_formats0
= array('format_type' => array('A4' => array('locale' => 'fr'), 'US Letter' => array('locale' => 'en')), 'font_family' => array('Georgia' => array('name' => 'Georgia', 'value' => 'Georgia, Times New Roman, serif'), 'Arial' => array('name' => 'Arial', 'value' => 'Arial, sans-serif')), 'font_size' => array('10pt' => array('name' => '10pt', 'value' => '10pt'), '12pt' => array('name' => '12pt', 'value' => '12pt')))
$_default_scenario_json_settings
public
static mixed
$_default_scenario_json_settings
= array('print' => array('format' => \NULL, 'font' => \NULL, 'size' => \NULL))
$_files_repositories_codes
public
static mixed
$_files_repositories_codes
= array("assetobject" => array("url" => "ASSETOBJECT_REPOSITORY_URL_ROOT", "file" => "ASSETOBJECT_REPOSITORY_FILE_ROOT"), "tileobject" => array("url" => "TILEOBJECT_REPOSITORY_URL_ROOT", "file" => "TILEOBJECT_REPOSITORY_FILE_ROOT"))
$_list_fields_to_localize
public
mixed
$_list_fields_to_localize
= \NULL
$_objectName
public
mixed
$_objectName
= \NULL
$_rul_params_fields_to_extract
public
mixed
$_rul_params_fields_to_extract
= array('rul_method1_name', 'rul_method2_name', 'rul_method3_name', 'rul_method2_att_dice_formula_text', 'rul_method3_att_dice_formula_text')
$_sql_select_token
public
mixed
$_sql_select_token
$_tableLOCALEKEYCode
public
mixed
$_tableLOCALEKEYCode
= \NULL
$_tableMainCode
public
mixed
$_tableMainCode
= \NULL
$_tableName
public
mixed
$_tableName
= \NULL
$_tablePrefix
public
mixed
$_tablePrefix
= \NULL
$_token_id
public
mixed
$_token_id
= \NULL
$_alternative_keys_for_localize
protected
mixed
$_alternative_keys_for_localize
= \NULL
$_dbconn_read
protected
mixed
$_dbconn_read
= \NULL
$_dbconn_write
protected
mixed
$_dbconn_write
= \NULL
$_delete_locale
protected
mixed
$_delete_locale
= \FALSE
$_errormessages
protected
static mixed
$_errormessages
= array(100 => 'Error in execute()', 101 => 'Error on _insert(). Code already exists', 102 => 'Error on _update(). Code already exists in other row', 201 => 'Error on _insert(). Code is empty', 202 => 'Error on _update(). Code is empty', 311 => 'Error on _insert(). Email not valid', 312 => 'Error on _insert(). Password not defined', 313 => 'Error on _update(). Passwords are different', 314 => 'Error on _update(). Password must be 5 characters or more', 315 => 'Error on _update(). Value must be between MIN and MAX values', 895 => 'No API token or API token invalid', 896 => 'API token not found', 897 => 'API token not active', 898 => 'API token invalid (too young)', self::API_TOKEN_TOO_OLD => 'API token invalid (too old)')
$_sql_check_maincode
protected
mixed
$_sql_check_maincode
= \NULL
$_sql_delete
protected
mixed
$_sql_delete
= \NULL
$_sql_inserts
protected
mixed
$_sql_inserts
= \NULL
$_sql_list
protected
mixed
$_sql_list
= \NULL
$_sql_list_all
protected
mixed
$_sql_list_all
= \NULL
$_sql_list_locales
protected
mixed
$_sql_list_locales
= \NULL
$_sql_load
protected
mixed
$_sql_load
= \NULL
$_sql_load_by_key
protected
mixed
$_sql_load_by_key
= \NULL
$_sql_translate
protected
mixed
$_sql_translate
= \NULL
$_sql_updates
protected
mixed
$_sql_updates
= \NULL
$_update_locale
protected
mixed
$_update_locale
= \FALSE
$_with_block_for_localize
protected
mixed
$_with_block_for_localize
= \TRUE
$_dbconnection_read
private
mixed
$_dbconnection_read
= array('db' => 'pgsql:host=' . \DbModel::DB_HOST . ';port=5433;dbname=magnaregula;', 'user' => 'magnaregula', 'password' => 'qnty2573')
$_dbconnection_write
private
mixed
$_dbconnection_write
= array('db' => 'pgsql:host=' . \DbModel::DB_HOST . ';port=5433;dbname=magnaregula;', 'user' => 'magnaregula', 'password' => 'qnty2573')
Methods
__()
public
static __(mixed $text) : mixed
Parameters
- $text : mixed
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
_add_last_slash_if_not()
public
static _add_last_slash_if_not(mixed $string) : mixed
Parameters
- $string : mixed
_add_localised_fields()
public
_add_localised_fields(mixed &$row) : mixed
Parameters
- $row : mixed
_append_to_file_static()
public
static _append_to_file_static(mixed $text) : mixed
Parameters
- $text : mixed
_bind_params()
public
_bind_params(mixed &$pdostatement, mixed &$params, mixed $sql) : mixed
Parameters
- $pdostatement : mixed
- $params : mixed
- $sql : mixed
_bindtextdomain()
public
static _bindtextdomain([mixed $domain = self::_TEXT_DOMAIN ]) : mixed
Parameters
- $domain : mixed = self::_TEXT_DOMAIN
_build_array_for_prepare()
public
_build_array_for_prepare(mixed $array, mixed $sql[, mixed $action = NULL ]) : mixed
Parameters
- $array : mixed
- $sql : mixed
- $action : mixed = NULL
_build_block()
Returns a block of text, with variables, replaced
public
_build_block(mixed $blocktext, mixed $row[, mixed $clearvars = TRUE ]) : string
Parameters
- $blocktext : mixed
-
Text to update
- $row : mixed
-
An associated array of variables
- $clearvars : mixed = TRUE
-
If variables still stay in text, replace them by '' (or not)
Return values
string —The $text, updated
_build_block_dollar()
public
_build_block_dollar(mixed $blocktext, mixed $row[, mixed $clearvars = TRUE ]) : mixed
Parameters
- $blocktext : mixed
- $row : mixed
- $clearvars : mixed = TRUE
_build_block_generic()
public
static _build_block_generic(mixed $blocktext, mixed $row[, mixed $clearvars = TRUE ][, mixed $marker = '%' ]) : mixed
Parameters
- $blocktext : mixed
- $row : mixed
- $clearvars : mixed = TRUE
- $marker : mixed = '%'
_build_error_message()
public
_build_error_message(mixed $errorcode) : mixed
Parameters
- $errorcode : mixed
_build_fields_list_when_localizedkeys()
public
_build_fields_list_when_localizedkeys(mixed &$fields) : mixed
Parameters
- $fields : mixed
_build_json_settings()
public
_build_json_settings() : mixed
_call_ws()
Calls a webservice
public
static _call_ws(string $url, string $method, array<string|int, mixed> $fields) : mixed
Parameters
- $url : string
-
The FQDN url to call
- $method : string
-
GET, POST, PUT, DELETE
- $fields : array<string|int, mixed>
-
Array of values (for PUT and POST, for instance)
Tags
Return values
mixed —The result of curl_exec()
_check_fields_for_delete()
public
_check_fields_for_delete(mixed $_pk, mixed &$fields) : mixed
Parameters
- $_pk : mixed
- $fields : mixed
_check_fields_for_insert()
public
_check_fields_for_insert(mixed $action, mixed &$fields) : mixed
Parameters
- $action : mixed
- $fields : mixed
_check_fields_for_update()
public
_check_fields_for_update(mixed $_pk, mixed $action, mixed &$fields) : mixed
Parameters
- $_pk : mixed
- $action : mixed
- $fields : mixed
_check_fields_for_update_post_load()
Allows to complete $fields array, with informations stored in current row (row BEFORE update) Different from '_check_fields_for_update', because '_check_fields_for_update' fires BEFORE load BEFORE update.
public
_check_fields_for_update_post_load(int $_pk, string $action, array<string|int, mixed> &$fields, array<string|int, mixed> $row) : none
Also different from '_check_fields_for_update', because there is NO RETURN.
Parameters
- $_pk : int
-
The main key
- $action : string
-
The action code
- $fields : array<string|int, mixed>
-
The fields which could be altered
- $row : array<string|int, mixed>
-
The current row, obtained by self::load()
Tags
Return values
none_check_maincode_for_insert()
public
_check_maincode_for_insert(mixed $value, mixed &$fields) : mixed
Parameters
- $value : mixed
- $fields : mixed
_check_maincode_for_update()
public
_check_maincode_for_update(mixed $_pk, mixed $value, mixed &$fields) : mixed
Parameters
- $_pk : mixed
- $value : mixed
- $fields : mixed
_complete_fields_to_load()
public
_complete_fields_to_load(mixed $id, mixed &$ret) : mixed
Parameters
- $id : mixed
- $ret : mixed
_connect_for_read()
Returns a pointer to PDO object instance, for read operations on database Memorizes it in $this->_dbconn_read
public
_connect_for_read() : object
Tags
Return values
object —A PDO object
_connect_for_write()
Returns a pointer to PDO object instance, for write operations on database Memorizes it in $this->_dbconn_write
public
_connect_for_write() : object
Tags
Return values
object —A PDO object
_db_query()
Perform a read query (SELECT) on database
public
_db_query(string $sql[, int $fetchmode = PDO::FETCH_OBJ ]) : array<string|int, mixed>
Parameters
- $sql : string
-
Text of SQL query
- $fetchmode : int = PDO::FETCH_OBJ
-
structure to return (array or object)
Tags
Return values
array<string|int, mixed> —The rows, else FALSE
_db_query_range()
Perform a limited (offset+limit) read query (SELECT) on database
public
_db_query_range(string $sql, int $offset, int $limit) : array<string|int, mixed>
Parameters
- $sql : string
-
Text of SQL query
- $offset : int
-
Begins query to this offset
- $limit : int
-
The max number of rows to return
Tags
Return values
array<string|int, mixed> —The rows, else FALSE
_delete()
public
_delete(mixed $_pk[, mixed $fields = NULL ]) : mixed
Parameters
- $_pk : mixed
- $fields : mixed = NULL
_delete_locale()
public
_delete_locale(mixed $old_code) : mixed
Parameters
- $old_code : mixed
_disconnect_for_read()
Clear the pointer to PDO object read instance
public
_disconnect_for_read() : none
Tags
Return values
none_disconnect_for_write()
Clear the pointer to PDO object write instance
public
_disconnect_for_write() : none
Tags
Return values
none_escape_single_quote_for_db()
public
static _escape_single_quote_for_db(mixed $string) : mixed
Parameters
- $string : mixed
_extract_extension()
public
static _extract_extension(mixed $filename) : mixed
Parameters
- $filename : mixed
_extract_values_from_field_to_extract()
public
_extract_values_from_field_to_extract(mixed $chr_params, mixed $field, mixed &$ret) : mixed
Parameters
- $chr_params : mixed
- $field : mixed
- $ret : mixed
_find_array_key_by_value()
public
static _find_array_key_by_value(mixed $array, mixed $value, mixed $key_field, mixed $value_field) : mixed
Parameters
- $array : mixed
- $value : mixed
- $key_field : mixed
- $value_field : mixed
_get_errormessage()
public
static _get_errormessage(mixed $error) : mixed
Parameters
- $error : mixed
_insert()
public
_insert([mixed $action = 'insert' ][, mixed $fields = NULL ]) : mixed
Parameters
- $action : mixed = 'insert'
- $fields : mixed = NULL
_is_int_or_uuid()
public
static _is_int_or_uuid(mixed $value) : mixed
Parameters
- $value : mixed
_is_owner_of()
public
_is_owner_of(mixed $acc_pk) : mixed
Parameters
- $acc_pk : mixed
_is_token_valid()
public
_is_token_valid(mixed $id) : mixed
Parameters
- $id : mixed
_normalize_fields()
public
_normalize_fields(mixed &$fields) : mixed
Parameters
- $fields : mixed
_normalize_int()
public
_normalize_int(mixed $parm) : mixed
Parameters
- $parm : mixed
_only_alphanum()
public
static _only_alphanum(mixed $string) : mixed
Parameters
- $string : mixed
_perform_other_action_after_delete()
public
_perform_other_action_after_delete(mixed $row_deleted, mixed $action, mixed $return, mixed $params) : mixed
Parameters
- $row_deleted : mixed
- $action : mixed
- $return : mixed
- $params : mixed
_perform_other_action_after_insert()
public
_perform_other_action_after_insert(mixed $action, mixed $return, mixed $params[, mixed $original_fields = NULL ]) : mixed
Parameters
- $action : mixed
- $return : mixed
- $params : mixed
- $original_fields : mixed = NULL
_perform_other_action_after_update()
public
_perform_other_action_after_update(mixed $row_updated, mixed $action, mixed $return, mixed $params) : mixed
Parameters
- $row_updated : mixed
- $action : mixed
- $return : mixed
- $params : mixed
_prepare_return_after_update()
public
_prepare_return_after_update(mixed $action, mixed $return, mixed $fields) : mixed
Parameters
- $action : mixed
- $return : mixed
- $fields : mixed
_prepare_sql_for_update()
public
_prepare_sql_for_update(mixed $action, mixed $sql, mixed $fields) : mixed
Parameters
- $action : mixed
- $sql : mixed
- $fields : mixed
_search_print_format_by_locale()
public
_search_print_format_by_locale(mixed $locale) : mixed
Parameters
- $locale : mixed
_set_sql_list()
public
_set_sql_list(mixed $sql) : mixed
Parameters
- $sql : mixed
_switch_text_to_locale()
public
static _switch_text_to_locale(mixed $locale) : mixed
Parameters
- $locale : mixed
_translate_output()
public
_translate_output(mixed $result[, mixed $locale = 'en' ][, mixed $request = NULL ][, mixed $marker = '' ][, mixed $cache_context = NULL ]) : mixed
Parameters
- $result : mixed
- $locale : mixed = 'en'
- $request : mixed = NULL
- $marker : mixed = ''
- $cache_context : mixed = NULL
_translate_output0()
public
_translate_output0(mixed $result[, mixed $locale = 'en' ][, mixed $request = NULL ][, mixed $marker = '' ][, mixed $cache_context = NULL ]) : mixed
Parameters
- $result : mixed
- $locale : mixed = 'en'
- $request : mixed = NULL
- $marker : mixed = ''
- $cache_context : mixed = NULL
_translate_pdf_block()
public
static _translate_pdf_block(mixed $block, mixed $locale[, mixed $domain = self::_TEXT_DOMAIN ][, mixed $domain_primary = TRUE ]) : mixed
Parameters
- $block : mixed
- $locale : mixed
- $domain : mixed = self::_TEXT_DOMAIN
- $domain_primary : mixed = TRUE
_translate_text()
Translate a text, by calling __()
public
static _translate_text(string $text[, string $linuxlocale = NULL ]) : string
Parameters
- $text : string
-
Text to translate
- $linuxlocale : string = NULL
-
the function setlocale needs this parameter
Tags
Return values
string —The $text translated
_update()
Perform an UPDATE
public
_update(mixed $_pk[, mixed $action = 'update' ][, mixed $fields = NULL ]) : array<string|int, mixed>
Parameters
- $_pk : mixed
-
The primary key
- $action : mixed = 'update'
-
The action to perform ('update' in most cases)
- $fields : mixed = NULL
-
Fields corresponding to column values
Return values
array<string|int, mixed> —An array containing error+rows
_update_locale()
public
_update_locale(mixed $old_code, mixed $new_code) : mixed
Parameters
- $old_code : mixed
- $new_code : mixed
adapt_formula()
public
adapt_formula(mixed $formula) : mixed
Parameters
- $formula : mixed
delete_url()
DELETE a webservice
public
static delete_url(string $url, array<string|int, mixed> $fields) : mixed
Parameters
- $url : string
-
The FQDN url to call
- $fields : array<string|int, mixed>
-
Array of values (for PUT and POST, for instance)
Tags
Return values
mixed —The result of curl_exec()
get_sql_delete()
public
get_sql_delete() : mixed
get_sql_inserts()
public
get_sql_inserts() : mixed
get_sql_list_locales()
public
get_sql_list_locales() : mixed
get_sql_translate()
public
get_sql_translate() : mixed
get_sql_updates()
public
get_sql_updates() : mixed
get_url()
GET a webservice
public
static get_url(string $url, array<string|int, mixed> $fields) : mixed
Parameters
- $url : string
-
The FQDN url to call
- $fields : array<string|int, mixed>
-
Array of values (for PUT and POST, for instance)
Tags
Return values
mixed —The result of curl_exec()
getGUID()
public
static getGUID() : mixed
getGUIDv2()
public
static getGUIDv2() : mixed
list_in_account()
public
list_in_account(mixed $_pk[, mixed $fetchmode = PDO::FETCH_ASSOC ]) : mixed
Parameters
- $_pk : mixed
- $fetchmode : mixed = PDO::FETCH_ASSOC
list_in_parent()
public
list_in_parent(mixed $_pk[, mixed $fetchmode = PDO::FETCH_ASSOC ]) : mixed
Parameters
- $_pk : mixed
- $fetchmode : mixed = PDO::FETCH_ASSOC
list_locales()
public
list_locales([mixed $tableMainCode = NULL ][, mixed $row = NULL ][, mixed $fields_to_localize = array() ]) : mixed
Parameters
- $tableMainCode : mixed = NULL
- $row : mixed = NULL
- $fields_to_localize : mixed = array()
load()
public
load(mixed $id[, mixed $control_owner = TRUE ]) : mixed
Parameters
- $id : mixed
- $control_owner : mixed = TRUE
load_by_key()
public
load_by_key(mixed $id) : mixed
Parameters
- $id : mixed
post_url()
POST a webservice
public
static post_url(string $url, array<string|int, mixed> $fields) : mixed
Parameters
- $url : string
-
The FQDN url to call
- $fields : array<string|int, mixed>
-
Array of values (for PUT and POST, for instance)
Tags
Return values
mixed —The result of curl_exec()
put_url()
PUT a webservice
public
static put_url(string $url, array<string|int, mixed> $fields) : mixed
Parameters
- $url : string
-
The FQDN url to call
- $fields : array<string|int, mixed>
-
Array of values (for PUT and POST, for instance)
Tags
Return values
mixed —The result of curl_exec()
query_by_id()
Perform a query to lookup ONE DB instance, based on its main key (integer)
public
query_by_id(string $query, int $id[, bool $fetch = TRUE ]) : array<string|int, mixed>
Parameters
- $query : string
-
The SELECT statement, with an '%d' for main key
- $id : int
-
The main key to find
- $fetch : bool = TRUE
-
Returns an ASSOC array, or not
Tags
Return values
array<string|int, mixed> —An array, with error+message+row
query_by_key()
Perform a query to lookup ONE DB instance, based on its main key (string/integer)
public
query_by_key(string $query, mixed $id[, bool $fetch = TRUE ]) : array<string|int, mixed>
Parameters
- $query : string
-
The SELECT statement, with an '%d' or ''%s' for main key
- $id : mixed
-
The main key to find
- $fetch : bool = TRUE
-
Returns an ASSOC array, or not
Tags
Return values
array<string|int, mixed> —An array, with error+message+row
roll()
public
roll([mixed $formula = NULL ]) : mixed
Parameters
- $formula : mixed = NULL
tblist()
public
tblist(mixed $url_elements[, mixed $fetchmode = PDO::FETCH_ASSOC ]) : mixed
Parameters
- $url_elements : mixed
- $fetchmode : mixed = PDO::FETCH_ASSOC
tblist_all()
public
tblist_all([mixed $fetchmode = PDO::FETCH_ASSOC ]) : mixed
Parameters
- $fetchmode : mixed = PDO::FETCH_ASSOC