vBulletin 5.6.5 API

vB_DataManager_StyleVarURL extends vB_DataManager_StyleVar
in package

Abstract class to do data save/delete operations for StyleVar.

Table of Contents

$childfields  : mixed
$condition  : string
Condition to be used. Can be either array('keyfield' => 'value') or a valid assertor vB_dB_Query::CONDITIONS_KEY setting.
$condition_construct  : array<string|int, mixed>
Condition template for update query
$datatype  : string
Local value telling us what datatype this is; saves the resources of gettype()
$dbobject  : vB_Database
The vBulletin database object
$error_handler  : string
The error handler for this object
$errors  : array<string|int, mixed>
Array to store any errors encountered while building data
$existing  : array<string|int, mixed>
Array to store existing data
$failure_callback  : callable
Callback to execute just before an error is logged.
$info  : array<string|int, mixed>
Array to store information
$presave_called  : null|bool
This variable prevents the pre_save() method from being called more than once.
$rawfields  : array<string|int, mixed>
Array to store the names for fields that will be taking raw SQL
$registry  : vB_Registry
The vBulletin registry object
$table  : string
Default table to be used in queries
$assertor  : vB_dB_Assertor
The vBulletin dB_Assertor object
$bitfields  : array<string|int, mixed>
Array of field names that are bitfields, together with the name of the variable in the registry with the definitions.
$childvals  : mixed
$cleaner  : mixed
$datastore  : vB_Datastore
The vBulletin vB_Datastore object
$keyField  : mixed
$local_storage  : array<string|int, mixed>
Local storage, used to house data that we will be serializing into value
$needRegistry  : mixed
flag for vb5 transition. A subclass can set this to false and we won't set up $vbulletin *
$options  : array<string|int, mixed>
The options array from vB_Datastore object
$primary_id  : string
The name of the primary ID column that is used to uniquely identify records retrieved.
$session  : vB_Session
The vBulletin vB_Session object
$setfields  : array<string|int, mixed>
Array to store the names of fields that have been sucessfully set
$userinfo  : array<string|int, mixed>
The userinfo array from vB_Session object
$validfields  : array<string|int, mixed>
Array of field names that are valid for this data object
__construct()  : mixed
Constructor - Checks for necessity of registry object
__serialize()  : mixed
__sleep()  : mixed
__unserialize()  : mixed
__wakeup()  : mixed
build()  : bool
database build method that builds the data into our value field
check_required()  : bool
Checks through the required fields for this object and ensures that all required fields have a value
db_delete()  : int
Generates the SQL to delete a record from a database table, then executes it
db_insert()  : int
Creates and runs an INSERT query to save the data from the object into the database
db_update()  : bool
Creates and runs an UPDATE query to save the data from the object into the database
delete()  : int
Deletes the specified data item from the database
deleteFile()  : mixed
Check if a file exists, and then delete it if it does.
do_set()  : mixed
Takes valid data and sets it as part of the data to be saved
do_set_child()  : mixed
Takes valid data and sets it as part of the child data to be saved
do_unset()  : mixed
Unsets a values that has already been set
error()  : mixed
Shows an error message and halts execution - use this in the same way as print_stop_message();
fetch_field()  : mixed
Fetches info about the current data object - if a new value is set, it returns this, otherwise it will return the existing data
get_child()  : mixed
get_errors()  : array<string|int, mixed>
Returns the array of errors
get_exception()  : mixed
has_errors()  : bool
Check if the DM currently has errors. Will kill execution if it does and $die is true.
is_bitfield_set()  : bool
Determines if a bitfield value has been set
is_child_field()  : mixed
is_field_set()  : mixed
Determines if a field is set
post_delete()  : mixed
Additional data to update after a delete call (such as denormalized values in other tables).
post_save_each()  : mixed
Additional data to update after a save call (such as denormalized values in other tables).
post_save_once()  : mixed
Additional data to update after a save call (such as denormalized values in other tables).
pre_delete()  : mixed
Additional data to update before a delete call (such as denormalized values in other tables).
pre_save()  : bool
Any checks to run immediately before saving. If returning false, the save will not take place.
save()  : mixed
Saves the data from the object into the specified database tables
set()  : bool
Sets the supplied data to be part of the data to be saved. Use setr() if a reference to $value is to be passed
set_bitfield()  : bool
Sets a bit in a bitfield
set_child()  : bool
Sets the supplied data to be part of the data to be build into value.
set_condition()  : mixed
Sets the condition to be used in WHERE clauses, based upon the $this->existing data and the $this->condition_constuct condition template.
set_existing()  : bool
Sets the existing data
set_failure_callback()  : mixed
Sets the function to call on an error.
set_info()  : mixed
Rather like set(), but sets data into the $this->info array instead. Use setr_info if $value if a reference to value is to be passed
setErrorHandler()  : bool
Sets the error handler for the object
setr()  : bool
Sets the supplied data to be part of the data to be saved
setr_info()  : mixed
Rather like set(), but sets reference to data into the $this->info array instead
verify()  : bool
Verifies that the supplied data is one of the fields used by this object
verify_background_position()  : mixed
verify_boolean()  : mixed
verify_borderstyle()  : mixed
verify_child()  : bool
Verifies that the supplied child data is one of the fields used by this object
verify_color()  : mixed
verify_css_scalar()  : mixed
Generic function to validate css values
verify_date_array()  : bool
Verifies a date array as a valid unix timestamp
verify_email()  : bool
Verifies that an email address is valid
verify_font_size()  : mixed
verify_fontfamily()  : mixed
verify_fontlist()  : mixed
verify_fontstyle()  : mixed
verify_fontvariant()  : mixed
verify_fontweight()  : mixed
verify_gradient_direction()  : mixed
verify_gradient_type()  : mixed
verify_height()  : mixed
verify_image()  : mixed
verify_lineheight()  : mixed
verify_link()  : bool
Verifies that a hyperlink is valid
verify_margin()  : mixed
verify_md5()  : bool
Verifies that a string is an MD5 string
verify_repeat()  : mixed
verify_serialized()  : bool
Verifies that input is a serialized array (or force an array to serialize)
verify_size()  : mixed
verify_stylevar()  : mixed
verify_textalign()  : mixed
verify_texttransfrom()  : mixed
verify_units()  : mixed
verify_url()  : mixed
verify_userid()  : bool
Verifies that the specified user exists
verify_username()  : bool
Verifies that the provided username is valid, and attempts to correct it if it is not valid
verify_value_inherit_param_color()  : mixed
verify_value_stylevar()  : mixed
verify_width()  : mixed
fetchQueryInfo()  : array<string|int, mixed>
Returns an array with object info required for query methods as first argument
fetchTableBase()  : string
Fetches the base table name even if the parameter contains the package prefix.
forceItemInSet()  : bool
Checks that data is in the valid array. If it is not, set data to the $default.
loadExisting()  : mixed
verify_commalist()  : bool
Verifies that a variable is a comma-separated list of integers
verify_ipaddress()  : bool
Verifies an IP address
verify_list()  : bool
Creates a valid string of comma-separated integers
verify_nonempty()  : bool
Verifies that a string is not empty
verify_nonzero()  : bool
Verifies that an integer is greater than zero
verify_nonzero_or_negone()  : bool
Verifies that an integer is greater than zero or the special value -1 this rule matches a fair number of id columns
verify_spacelist()  : bool
Verifies that a variable is a space-separated list of integers
verify_styleid()  : mixed

Properties

$childfields

public mixed $childfields = array('url' => array( B_Cleaner::TYPE_STR, B_DataManager_Constants::REQ_NO, B_DataManager_Constants::VF_METHOD), 'stylevar_url' => array( B_Cleaner::TYPE_STR, B_DataManager_Constants::REQ_NO, B_DataManager_Constants::VF_METHOD, 'verify_value_stylevar'))

$condition

Condition to be used. Can be either array('keyfield' => 'value') or a valid assertor vB_dB_Query::CONDITIONS_KEY setting.

public string $condition = ull

$condition_construct

Condition template for update query

public array<string|int, mixed> $condition_construct = array('stylevarid = "%1$s" AND styleid = %2$d', 'stylevarid', 'styleid')

$datatype

Local value telling us what datatype this is; saves the resources of gettype()

public string $datatype = 'URL'

$error_handler

The error handler for this object

public string $error_handler = B_DataManager_Constants::ERRTYPE_STANDARD

$errors

Array to store any errors encountered while building data

public array<string|int, mixed> $errors = array()

$existing

Array to store existing data

public array<string|int, mixed> $existing = array()

$failure_callback

Callback to execute just before an error is logged.

public callable $failure_callback = ull

$info

Array to store information

public array<string|int, mixed> $info = array()

$presave_called

This variable prevents the pre_save() method from being called more than once.

public null|bool $presave_called = ull

In some classes, it is helpful to explicitly call pre_save() before calling save as additional checks are done. This variable is used to prevent pre_save() from being executed when save() is called. If null, pre_save() has yet to be called; else, it is the return value of pre_save().

$rawfields

Array to store the names for fields that will be taking raw SQL

public array<string|int, mixed> $rawfields = array()

$registry

The vBulletin registry object

public vB_Registry $registry = ull

$table

Default table to be used in queries

public string $table = 'default_table'

$assertor

The vBulletin dB_Assertor object

protected vB_dB_Assertor $assertor = ull

$bitfields

Array of field names that are bitfields, together with the name of the variable in the registry with the definitions.

protected array<string|int, mixed> $bitfields = array()

For example: var $bitfields = array('options' => 'bf_misc_useroptions', 'permissions' => 'bf_misc_moderatorpermissions')

$childvals

protected mixed $childvals = array()

$local_storage

Local storage, used to house data that we will be serializing into value

protected array<string|int, mixed> $local_storage = array()

$needRegistry

flag for vb5 transition. A subclass can set this to false and we won't set up $vbulletin *

protected mixed $needRegistry = rue

$options

The options array from vB_Datastore object

protected array<string|int, mixed> $options = array()

$primary_id

The name of the primary ID column that is used to uniquely identify records retrieved.

protected string $primary_id = 'stylevarid'

This will be used to build the condition in all update queries!

$setfields

Array to store the names of fields that have been sucessfully set

protected array<string|int, mixed> $setfields = array()

$userinfo

The userinfo array from vB_Session object

protected array<string|int, mixed> $userinfo = array()

$validfields

Array of field names that are valid for this data object

protected array<string|int, mixed> $validfields = array()

Each array element has the field name as its key, and then a three element array as the value. These three elements are used as follows: FIELD 0 (VF_TYPE) - This specifies the expected data type of the field, and draws on the data types defined for the vB_Input_Cleaner class FIELD 1 (VF_REQ) - This specified whether or not the field is REQUIRED for a valid INSERT query. Options include REQ_NO, REQ_YES and REQ_AUTO, which is a special option, indicating that the value of the field is automatically created FIELD 2 (VF_CODE) - This contains code to be executed as a lamda function called as 'function($data, $dm)'. Alternatively, the value can be VF_METHOD, in which case, $this->verify_{$fieldname} will be called.

Methods

__construct()

Constructor - Checks for necessity of registry object

public __construct([vB_Registry $registry = NULL ][, int $errtype = NULL ]) : mixed

Note that this method will accept only the $errtype parameter (via some magic checking of the parameters) and this is the preferred way of calling the datamanager functions. The registry object is deprecated and will be created internally for those managers that still need it.

Parameters
$registry : vB_Registry = NULL

-- Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.

$errtype : int = NULL

--One of the ERRTYPE_x constants

Return values
mixed

__serialize()

public __serialize() : mixed
Return values
mixed

__sleep()

public __sleep() : mixed
Return values
mixed

__unserialize()

public __unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
Return values
mixed

__wakeup()

public __wakeup() : mixed
Return values
mixed

build()

database build method that builds the data into our value field

public build() : bool
Return values
bool

True on success; false if an error occurred

check_required()

Checks through the required fields for this object and ensures that all required fields have a value

public check_required() : bool
Return values
bool

Returns true if all required fields have a valid value set

db_delete()

Generates the SQL to delete a record from a database table, then executes it

public db_delete(mixed $tableprefix, mixed $table[, mixed $condition = '' ][, mixed $doquery = true ]) : int
Parameters
$tableprefix : mixed
$table : mixed
$condition : mixed = ''
$doquery : mixed = true
Return values
int

The number of records deleted

db_insert()

Creates and runs an INSERT query to save the data from the object into the database

public db_insert(mixed $tableprefix, mixed $table[, mixed $doquery = true ][, mixed $replace = false ]) : int
Parameters
$tableprefix : mixed
$table : mixed
$doquery : mixed = true
$replace : mixed = false
Return values
int

Returns the ID of the inserted record

db_update()

Creates and runs an UPDATE query to save the data from the object into the database

public db_update(mixed $tableprefix, mixed $table[, mixed $condition = null ][, mixed $doquery = true ][, mixed $delayed = false ][, mixed $affected_rows = false ]) : bool
Parameters
$tableprefix : mixed
$table : mixed
$condition : mixed = null
$doquery : mixed = true
$delayed : mixed = false
$affected_rows : mixed = false
Return values
bool

Returns true on success

delete()

Deletes the specified data item from the database

public delete([mixed $doquery = true ]) : int
Parameters
$doquery : mixed = true
Return values
int

The number of rows deleted

deleteFile()

Check if a file exists, and then delete it if it does.

public deleteFile(mixed $file) : mixed
Parameters
$file : mixed
Return values
mixed

do_set()

Takes valid data and sets it as part of the data to be saved

public do_set(mixed $fieldname, mixed &$value[, mixed $table = null ]) : mixed
Parameters
$fieldname : mixed
$value : mixed
$table : mixed = null
Return values
mixed

do_set_child()

Takes valid data and sets it as part of the child data to be saved

public do_set_child(mixed $fieldname, mixed &$value[, mixed $table = null ]) : mixed
Parameters
$fieldname : mixed
$value : mixed
$table : mixed = null
Return values
mixed

do_unset()

Unsets a values that has already been set

public do_unset(mixed $fieldname[, mixed $table = null ]) : mixed
Parameters
$fieldname : mixed
$table : mixed = null
Return values
mixed

error()

Shows an error message and halts execution - use this in the same way as print_stop_message();

public error(mixed $errorphrase) : mixed
Parameters
$errorphrase : mixed
Return values
mixed

fetch_field()

Fetches info about the current data object - if a new value is set, it returns this, otherwise it will return the existing data

public fetch_field(mixed $fieldname[, mixed $table = null ]) : mixed
Parameters
$fieldname : mixed
$table : mixed = null
Return values
mixed

The requested data

get_child()

public get_child(mixed $fieldname) : mixed
Parameters
$fieldname : mixed
Return values
mixed

get_errors()

Returns the array of errors

public get_errors() : array<string|int, mixed>
Return values
array<string|int, mixed>

--

get_exception()

public get_exception() : mixed
Return values
mixed

has_errors()

Check if the DM currently has errors. Will kill execution if it does and $die is true.

public has_errors([mixed $die = true ]) : bool
Parameters
$die : mixed = true
Return values
bool

True if there are errors, false otherwise

is_bitfield_set()

Determines if a bitfield value has been set

public is_bitfield_set(mixed $fieldname, mixed $bitname) : bool
Parameters
$fieldname : mixed
$bitname : mixed
Return values
bool

is_child_field()

public is_child_field(mixed $fieldname) : mixed
Parameters
$fieldname : mixed
Return values
mixed

is_field_set()

Determines if a field is set

public is_field_set(mixed $field) : mixed
Parameters
$field : mixed
Return values
mixed

post_delete()

Additional data to update after a delete call (such as denormalized values in other tables).

public post_delete([mixed $doquery = true ]) : mixed
Parameters
$doquery : mixed = true
Return values
mixed

post_save_each()

Additional data to update after a save call (such as denormalized values in other tables).

public post_save_each([mixed $doquery = true ]) : mixed

In batch updates, is executed for each record updated.

Parameters
$doquery : mixed = true
Return values
mixed

post_save_once()

Additional data to update after a save call (such as denormalized values in other tables).

public post_save_once([mixed $doquery = true ]) : mixed

In batch updates, is executed once after all records are updated.

Parameters
$doquery : mixed = true
Return values
mixed

pre_delete()

Additional data to update before a delete call (such as denormalized values in other tables).

public pre_delete([mixed $doquery = true ]) : mixed
Parameters
$doquery : mixed = true
Return values
mixed

pre_save()

Any checks to run immediately before saving. If returning false, the save will not take place.

public pre_save([mixed $doquery = true ]) : bool
Parameters
$doquery : mixed = true
Return values
bool

True on success; false if an error occurred

save()

Saves the data from the object into the specified database tables

public save([mixed $doquery = true ][, mixed $delayed = false ][, mixed $affected_rows = false ][, mixed $replace = false ]) : mixed
Parameters
$doquery : mixed = true
$delayed : mixed = false
$affected_rows : mixed = false
$replace : mixed = false
Return values
mixed

If this was an INSERT query, the INSERT ID is returned

set()

Sets the supplied data to be part of the data to be saved. Use setr() if a reference to $value is to be passed

public set(mixed $fieldname, mixed $value[, mixed $clean = true ][, mixed $doverify = true ][, mixed $table = null ]) : bool
Parameters
$fieldname : mixed
$value : mixed
$clean : mixed = true
$doverify : mixed = true
$table : mixed = null
Return values
bool

Returns false if the data is rejected for whatever reason

set_bitfield()

Sets a bit in a bitfield

public set_bitfield(mixed $fieldname, mixed $bitname, mixed $onoff) : bool
Parameters
$fieldname : mixed
$bitname : mixed
$onoff : mixed
Return values
bool

set_child()

Sets the supplied data to be part of the data to be build into value.

public set_child(mixed $fieldname, mixed $value[, mixed $clean = true ][, mixed $doverify = true ][, mixed $table = null ]) : bool
Parameters
$fieldname : mixed
$value : mixed
$clean : mixed = true
$doverify : mixed = true
$table : mixed = null
Return values
bool

Returns false if the data is rejected for whatever reason

set_condition()

Sets the condition to be used in WHERE clauses, based upon the $this->existing data and the $this->condition_constuct condition template.

public set_condition([mixed $params = null ]) : mixed
Parameters
$params : mixed = null
Return values
mixed

set_existing()

Sets the existing data

public set_existing(mixed $existing) : bool
Parameters
$existing : mixed
Return values
bool

Returns true if successful

set_failure_callback()

Sets the function to call on an error.

public set_failure_callback(mixed $callback) : mixed
Parameters
$callback : mixed
Return values
mixed

set_info()

Rather like set(), but sets data into the $this->info array instead. Use setr_info if $value if a reference to value is to be passed

public set_info(mixed $fieldname, mixed $value) : mixed
Parameters
$fieldname : mixed
$value : mixed
Return values
mixed

setErrorHandler()

Sets the error handler for the object

public setErrorHandler([mixed $errtype = vB_DataManager_Constants::ERRTYPE_STANDARD ]) : bool
Parameters
$errtype : mixed = vB_DataManager_Constants::ERRTYPE_STANDARD
Return values
bool

setr()

Sets the supplied data to be part of the data to be saved

public setr(mixed $fieldname, mixed &$value[, mixed $clean = true ][, mixed $doverify = true ]) : bool
Parameters
$fieldname : mixed
$value : mixed
$clean : mixed = true
$doverify : mixed = true
Return values
bool

Returns false if the data is rejected for whatever reason

setr_info()

Rather like set(), but sets reference to data into the $this->info array instead

public setr_info(mixed $fieldname, mixed &$value) : mixed
Parameters
$fieldname : mixed
$value : mixed
Return values
mixed

verify()

Verifies that the supplied data is one of the fields used by this object

public verify(mixed $fieldname, mixed &$value[, mixed $doverify = true ]) : bool

Also ensures that the data is of the correct type, and attempts to correct errors in the supplied data.

Parameters
$fieldname : mixed
$value : mixed
$doverify : mixed = true
Return values
bool

Returns true if the data is one of the fields used by this object, and is the correct type (or has been successfully corrected to be so)

verify_background_position()

public verify_background_position(mixed $position) : mixed
Parameters
$position : mixed
Return values
mixed

verify_boolean()

public verify_boolean(mixed $testValue) : mixed
Parameters
$testValue : mixed
Return values
mixed

verify_borderstyle()

public verify_borderstyle(mixed $style) : mixed
Parameters
$style : mixed
Return values
mixed

verify_child()

Verifies that the supplied child data is one of the fields used by this object

public verify_child(mixed $fieldname, mixed &$value[, mixed $doverify = true ]) : bool

Also ensures that the data is of the correct type, and attempts to correct errors in the supplied data.

Parameters
$fieldname : mixed
$value : mixed
$doverify : mixed = true
Return values
bool

Returns true if the data is one of the fields used by this object, and is the correct type (or has been successfully corrected to be so)

verify_color()

public verify_color(mixed $color) : mixed
Parameters
$color : mixed
Return values
mixed

verify_css_scalar()

Generic function to validate css values

public verify_css_scalar(mixed $value) : mixed

This function encodes some basic hueritics to help avoid css injection via stylevars It's not necesary if the base function validates more tightly -- for instance if we validate against an explicit list then we know unsafe values can't get though.

This is not suitable for calling if the value isn't a scalar, but it can be called for each scalar value in an array (for instance).

If the field doesn't have any other validation, then this function should be called.

Parameters
$value : mixed
Return values
mixed

verify_date_array()

Verifies a date array as a valid unix timestamp

public verify_date_array(mixed &$date) : bool
Parameters
$date : mixed
Return values
bool

verify_email()

Verifies that an email address is valid

public verify_email(mixed &$email) : bool
Parameters
$email : mixed
Return values
bool

verify_font_size()

public verify_font_size(mixed $size) : mixed
Parameters
$size : mixed
Return values
mixed

verify_fontfamily()

public verify_fontfamily(mixed &$family) : mixed
Parameters
$family : mixed
Return values
mixed

verify_fontlist()

public verify_fontlist(mixed $fontlist) : mixed
Parameters
$fontlist : mixed
Return values
mixed

verify_fontstyle()

public verify_fontstyle(mixed $style) : mixed
Parameters
$style : mixed
Return values
mixed

verify_fontvariant()

public verify_fontvariant(mixed $variant) : mixed
Parameters
$variant : mixed
Return values
mixed

verify_fontweight()

public verify_fontweight(mixed $weight) : mixed
Parameters
$weight : mixed
Return values
mixed

verify_gradient_direction()

public verify_gradient_direction(mixed $direction) : mixed
Parameters
$direction : mixed
Return values
mixed

verify_gradient_type()

public verify_gradient_type(mixed $type) : mixed
Parameters
$type : mixed
Return values
mixed

verify_height()

public verify_height(mixed $height) : mixed
Parameters
$height : mixed
Return values
mixed

verify_image()

public verify_image(mixed $image) : mixed
Parameters
$image : mixed
Return values
mixed

verify_lineheight()

public verify_lineheight(mixed $height) : mixed
Parameters
$height : mixed
Return values
mixed

Verifies that a hyperlink is valid

public verify_link(mixed &$link[, mixed $strict = false ]) : bool
Parameters
$link : mixed
$strict : mixed = false
Return values
bool

verify_margin()

public verify_margin(mixed $margin) : mixed
Parameters
$margin : mixed
Return values
mixed

verify_md5()

Verifies that a string is an MD5 string

public verify_md5(mixed &$md5) : bool
Parameters
$md5 : mixed
Return values
bool

verify_repeat()

public verify_repeat(mixed $repeat) : mixed
Parameters
$repeat : mixed
Return values
mixed

verify_serialized()

Verifies that input is a serialized array (or force an array to serialize)

public verify_serialized(mixed &$data) : bool
Parameters
$data : mixed
Return values
bool

verify_size()

public verify_size(mixed $variant) : mixed
Parameters
$variant : mixed
Return values
mixed

verify_stylevar()

public verify_stylevar(mixed $stylevarid) : mixed
Parameters
$stylevarid : mixed
Return values
mixed

verify_textalign()

public verify_textalign(mixed $textalign) : mixed
Parameters
$textalign : mixed
Return values
mixed

verify_texttransfrom()

public verify_texttransfrom(mixed $texttransform) : mixed
Parameters
$texttransform : mixed
Return values
mixed

verify_units()

public verify_units(mixed $unit) : mixed
Parameters
$unit : mixed
Return values
mixed

verify_url()

public verify_url(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed

verify_userid()

Verifies that the specified user exists

public verify_userid(mixed &$userid) : bool
Parameters
$userid : mixed
Return values
bool

Returns true if user exists

verify_username()

Verifies that the provided username is valid, and attempts to correct it if it is not valid

public verify_username(mixed &$username) : bool
Parameters
$username : mixed
Return values
bool

Returns true if the username is valid, or has been corrected to be valid

verify_value_inherit_param_color()

public verify_value_inherit_param_color(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

verify_value_stylevar()

public verify_value_stylevar(mixed $stylevar) : mixed
Parameters
$stylevar : mixed
Return values
mixed

verify_width()

public verify_width(mixed $width) : mixed
Parameters
$width : mixed
Return values
mixed

fetchQueryInfo()

Returns an array with object info required for query methods as first argument

protected fetchQueryInfo(string $tableName) : array<string|int, mixed>
Parameters
$tableName : string
Return values
array<string|int, mixed>

fetchTableBase()

Fetches the base table name even if the parameter contains the package prefix.

protected fetchTableBase(mixed $tablename) : string
Parameters
$tablename : mixed
Return values
string

The proper table name.

forceItemInSet()

Checks that data is in the valid array. If it is not, set data to the $default.

protected forceItemInSet(mixed &$data, array<string|int, mixed> $validarray, mixed $default) : bool

This doesn't so much check if the data is valid as cleans the data to make it valid, which a number of validate functions do. This doesn't match the signature for verification functions because it's intended to build verification functions by passing the correct array and default.

Parameters
$data : mixed

-- scalar value

$validarray : array<string|int, mixed>

-- array of valid values

$default : mixed

-- value to set data to if its not in the array this valid must be in the array.

Return values
bool

-- should always return true as $data will be set to a valid value if used correctly. Will return false if $data and $default are not in $validarray

loadExisting()

protected loadExisting(mixed $keyValue) : mixed
Parameters
$keyValue : mixed
Return values
mixed

verify_commalist()

Verifies that a variable is a comma-separated list of integers

protected verify_commalist(mixed &$list) : bool
Parameters
$list : mixed
Return values
bool

verify_ipaddress()

Verifies an IP address

protected verify_ipaddress(mixed &$ipaddress) : bool
Parameters
$ipaddress : mixed
Return values
bool

verify_list()

Creates a valid string of comma-separated integers

protected verify_list(mixed &$list[, mixed $glue = ',' ][, mixed $dropzero = false ]) : bool
Parameters
$list : mixed
$glue : mixed = ','
$dropzero : mixed = false
Return values
bool

verify_nonempty()

Verifies that a string is not empty

protected verify_nonempty(mixed &$string) : bool
Parameters
$string : mixed
Return values
bool

verify_nonzero()

Verifies that an integer is greater than zero

protected verify_nonzero(mixed &$int) : bool
Parameters
$int : mixed
Return values
bool

verify_nonzero_or_negone()

Verifies that an integer is greater than zero or the special value -1 this rule matches a fair number of id columns

protected verify_nonzero_or_negone(mixed &$int) : bool
Parameters
$int : mixed
Return values
bool

verify_spacelist()

Verifies that a variable is a space-separated list of integers

protected verify_spacelist(mixed &$list) : bool
Parameters
$list : mixed
Return values
bool

verify_styleid()

protected verify_styleid(mixed &$data) : mixed
Parameters
$data : mixed
Return values
mixed

Search results