DAO for information_schema.tables of mysql instances
| package | salt\dao |
|---|---|
| inherited_from | \salt\Base |
COLUMN(string $fieldName, mixed $format = NULL) : string
stringthe fieldName to display
mixed(Optional, NULL) the format to use
stringViewHelper HTML protected text to display for $fieldName in $formatFORM(mixed $format = NULL) : \salt\_InternalFieldAccess
mixed(Optional, NULL) format to use
\salt\_InternalFieldAccessan object for access registered ViewHelperVIEW(mixed $format = NULL) : \salt\_InternalFieldAccess
mixed(Optional, NULL) format to use
\salt\_InternalFieldAccessan object for access registered ViewHelper__construct()
Have to be called by child classes for having an internal ID
__get(string $fieldName) : mixed
Can also return an _InternalFieldAccess if $fieldName is FORM or VIEW
string
mixedthe value of the field__set(string $fieldName, mixed $value)
stringthe field to change
mixedthe value
checkNotState(integer|array<mixed,integer> $state, string $message = NULL)
integerarray<mixed,integer>forbidden states for the object
stringerror message for exception
\Exception |
if the object is in one of the forbidden states |
|---|
checkState(integer|array<mixed,integer> $state)
integerarray<mixed,integer>expected states for the object
\Exception |
if the object is not in one of the expected states |
|---|
getById(\salt\DBHelper $db, mixed $id) : static | NULL
\salt\DBHelperThe database to search object
mixeda value of the id field
staticNULLthe first object with this id. All fields are loaded. Return NULL if no object foundgetByIds(\salt\DBHelper $DB, array<mixed,mixed> $ids) : array<mixed,static>
\salt\DBHelperdatabase to search objects
array<mixed,mixed>list of value to search
array<mixed,static>associative array : id => objectgetField(string $fieldName, boolean $createIfNotExists = FALSE) : \salt\Field
stringfield name registered with metadata() or extra field constructor parameter
booleanif TRUE, create extra field if not exists, throw Exception otherwise
\salt\FieldgetFieldsMetadata() : array<mixed,\salt\Field>
array<mixed,\salt\Field>list of all Field metadata : fieldName => FieldgetId() : mixed
mixedvalue of id fieldgetIdField() : string
stringfield namegetInternalId() : integer
integerUnique ID of an instancegetModifiedFields() : array<mixed,mixed>
array<mixed,mixed>fieldName => valuegetNew(array<mixed,string> $extraFields = NULL) : static
array<mixed,string>array of fieldName to add to the instance
staticgetTableName() : string
stringthe table nameinitAfterCreateTable() : array<mixed,static>
array<mixed,static>objects to create in tableisLoaded() : boolean
booleanTRUE if the object have been loaded for a database by PDOisModified() : boolean
booleanTRUE if the object have been modifiedisNew() : boolean
booleanTRUE if the object have been created with a new ...()isReadonly() : boolean
booleanTRUE if the object is readonly (Base::meta() is a readonly object)missingTables(\salt\DBHelper $db, array<mixed,string> $tableNames) : array<mixed,string>
\salt\DBHelperdatabase to use
array<mixed,string>list of table name to check
array<mixed,string>list of missing tablesreadonly()
registerHelper(string $class)
stringclass name of ViewHelper that will by used in $this->VIEW/FORM/COLUMN
registerId(string $fieldName)
registerTableName(string $table)
stringthe table name that will be used in query generation
checkFieldExists(string $fieldName, boolean $forValue= FALSE, boolean $doNotThrowException= FALSE) : boolean
string
booleanalso check field is loaded and value can be retrieve
booleanreturn FALSE if field does not exists instead of throwing exception
\Exception |
if field don't exists or is not loaded (if $forValue) |
|---|
booleanTRUE if field existsinitMetadata(array<mixed,string> $loadedFields= NULL, array<mixed,string> $extraFields= NULL)
array<mixed,string>fields loaded by a query for this object
array<mixed,string>fields to add to new instance only
\Exception |
if metadata() function don't return an array of Field |
|---|
$_saltExtraFields : array<mixed,mixed>
array()| content | array of extraFieldName => value |
|---|
$_saltExtraFieldsMetadata : array<mixed,\salt\Field>
array()| content | array of extraFieldName => Field |
|---|
$_saltLoadValues : array<mixed,mixed>
array()| content | array of fieldName => value |
|---|
$_saltMetadata : array<mixed,mixed>
array()| content | array of class name => array( 'fields' => array(field name => Field), 'tablename' => table name, 'idfield' => id field name, 'singleton' => empty instance, ) |
|---|
$_saltState : integer
self::STATE_NONE$_saltValues : array<mixed,mixed>
array()| content | array of fieldName => value |
|---|
$_salt_id : integer
$_salt_id_sequence : integer
0STATE_DELETED = 40
STATE_LOADED = 20
STATE_LOADING = 21
STATE_MODIFIED = 30
STATE_NEW = 10
STATE_NONE = 0
STATE_READONLY = 50