Public Member Functions | |
sanitizeValue ($value) | |
analyzeByRow (RedBean_OODBBean $rowBean) | |
__construct ($modelClassName, $attributeName, $columnName, array $columnMappingData, ImportSanitizeResultsUtil $importSanitizeResultsUtil=null, $penultimateModelClassName, $penultimateAttributeName, $explicitReadWriteModelPermissions=null) | |
shouldSanitizeValue () | |
getAnalysisMessages () | |
getShouldSkipRow () | |
Static Public Member Functions | |
static | getType () |
static | getLinkedMappingRuleType () |
static | shouldNotSaveModelOnSanitizingValueFailure () |
Protected Member Functions | |
init () | |
assertMappingRuleDataIsValid () | |
Static Protected Member Functions | |
static | resolveMappingRuleData ($columnMappingData) |
Base sanitization utility to be overriden as needed for specific sanitizers. Sanitizer utils provide information on the data analyzers to utilize and if sql and batch analysis are supported. Also provides method to perform actual sanitization prior to setting the value in a model to import.
Sanitizers can inspect a value and based on rules, decide whether that value is valid or invalid. This information is then utilized to help users during the import process ensure their import data is correct before finalizing the import.
Definition at line 46 of file SanitizerUtil.php.
__construct | ( | $modelClassName, | |
$attributeName, | |||
$columnName, | |||
array | $columnMappingData, | ||
ImportSanitizeResultsUtil | $importSanitizeResultsUtil = null , |
||
$penultimateModelClassName, | |||
$penultimateAttributeName, | |||
$explicitReadWriteModelPermissions = null |
|||
) |
$modelClassName | ||
$attributeName | ||
$columnName | ||
array | $columnMappingData | |
ImportSanitizeResultsUtil | $importSanitizeResultsUtil |
Definition at line 149 of file SanitizerUtil.php.
|
abstract |
Sanitize a value, returning a sanitized value either as the same cast or different cast. This is the final step for importing a row, this method is called as the value from the import column for a row is ready to be populated into a model to save. This method can also be called in a chain of sanitizers based on what sanitizers are set for a given attribute import rule. depending on the circumstances.
mixed | $value |
|
abstract |
$rowBean |
|
static |
Definition at line 88 of file SanitizerUtil.php.
|
static |
Definition at line 101 of file SanitizerUtil.php.
|
static |
If the sanitization of a value fails, should the entire row that is trying to be imported be ignored? Override if you want to change this value. Returning false means save the import row anyways regardless of if a sanitization of a value failed. If the model has other validation errors, these will block saving the model regardless of what value is returned here.
Definition at line 113 of file SanitizerUtil.php.
|
protected |
Override as needed
Definition at line 192 of file SanitizerUtil.php.
|
protected |
Override as needed
Definition at line 199 of file SanitizerUtil.php.