WRITER_PREFIX
WRITER_PREFIX
Prefix for ini files.
Database log writer (DBLW).
__construct(array $connectionParams, array $writerParams = null)
array | $connectionParams | Doctrine 2 DBAL connection parameter set |
array | $writerParams | "table" (string): Name for logs table (default = "access_log"). "safety" (int): Safety levels as defined in "DatabaseLogWriterHelper". "datatype_mappings_replace_defaults" (boolean): replace internal defaults entirely ("true") or make up/overwrite defaults ("false"). |
writeToLog(array $regularFields, array $metaFields = null)
Write log fields to a database
array | $regularFields | The associative array containing all fields to write (representing a logfile entry), datatype and content. |
array | $metaFields | The associative array containing all meta fields to write (into a separate table). |
mapDBALDataType(string $datatype) : array
Map the given basic (phpWTL) data type/alias to Doctrine DBAL conform data type and default portable options.
string | $datatype | data type or alias, as set in a format descriptor |
Doctrine DBAL data type (key: "datatype") and default portable options (key: "options"). Null if given type/alias is unknown/not supported
getDBALDataType(string $datatype) : string
Get the Doctrine data type for a given basic (phpWTL) data type or alias.
string | $datatype | data type or alias, as set in a format descriptor |
Doctrine DBAL data type, null if given type/alias is unknown/not supported
getDataTypeDefaultsForDBAL(string $datatype) : array
Get the defaults (portable options) for a given basic (phpWTL) data type or alias.
string | $datatype | data type or alias, as set in a format descriptor |
default portable options, null if given type/alias is unknown/not supported or there are no options available
dbFriendlyName(string $name, integer $strategy) : string
Return cleansed (db name safe) version of given string, use "$strategy" to cleanse: SAFE_NAMING_STRATEGY_WTL_CLEANSING (default): Least common denominator of a string used as a database table/column name (remove all characters other than a-z and underscore and convert to lowercase).
SAFE_NAMING_STRATEGY_DBAL_ESCAPING: Doctrine DBAL escaping via "quoteIdentifier" method.
string | $name | |
integer | $strategy | Safe naming strategy |