|
|
const | TASK_LABEL = 'Clean filenames' |
| |
|
const | CONF_CLEAN_SOURCE = 'CLEAN_SOURCE' |
| |
|
const | TASK_LABEL = 'Matching filenames (abstract)' |
| |
|
const | STATUS_UNDEFINED = 0 |
| | Undefined. Default unless task changes it.
|
| |
|
const | STATUS_RUNNING = 1 |
| | Undefined, but indicates that the task is in progress.
|
| |
|
const | STATUS_WAIT = 2 |
| | Task decided that Item is not ready yet and shall be moved back to 'to-do'.
|
| |
|
const | STATUS_DONE = 5 |
| | Success! This means the task completed successfully.
|
| |
|
const | STATUS_PBCT = 6 |
| | There were problems, but the task may continue.
|
| |
|
const | STATUS_PBC = 7 |
| | There were problems, but subsequent task may continue.
|
| |
|
const | STATUS_ERROR = 10 |
| | An error occurred. Abort execution as soon as possible.
|
| |
|
const | STATUS_CONFIG_ERROR = 11 |
| | If a config option was not valid.
|
| |
|
const | STATUS_SKIPPED = 15 |
| | If task was skipped.
|
| |
|
const | ONCE_PER_ITEM = false |
| | True: Run this task only once per item.
|
| |
|
const | IS_RECURSIVE = false |
| | Default (false): one task = one folder. True: The task performs actions on subfolders too.
|
| |
|
const | CONF_COPY_EXCLUDE = 'COPY_EXCLUDE' |
| | Patterns which files to exclude from copying.
|
| |
|
const | MASK_TARGET_TEMP = 'temp_%s' |
| |
|
| static | $CHARS_UMLAUTS |
| |
| static | $CHARS_ILLEGAL |
| |
| static | $CHARS_WHITESPACE |
| |
| static | $CHARS_SLASHES |
| |
| static | $CHARS_BRACKETS |
| |
| static | $CHARS_QUOTATION |
| |
| static | $CHARS_QUOTATION2 |
| |
| static | $CHARS_PICKY |
| |
|
|
| $cleanSource |
| |
|
| $logger |
| | Logging handler.
|
| |
|
| $name |
| | Class name of this task.
|
| |
|
| $label |
| | Human readable Task label.
|
| |
|
| $description |
| | Human readable description of Task's purpose/actions.
|
| |
|
| $CIFolder |
| | CIFolder object that provides all information needed for this task.
|
| |
|
| $sourceFolder |
| | Source folder of this task.
|
| |
|
| $targetFolder |
| | Target folder of this task (read from config).
|
| |
|
| $targetFolderTemp |
| | Temporary name of Target folder of this task. Used until inbox processing completed successfully.
|
| |
|
| $itemSubDirs |
| | Array of Item subfolders: key=foldername, value=CIFolder (initialized with its config).
|
| |
|
| $tempFolder |
| | Path of the temp folder for this task.
|
| |
|
| $copyExclude |
| | Contains the value of CONF_COPY_EXCLUDE.
|
| |
|
| $skip = false |
| | True: Skip execution. Default=false (=normal execution).
|
| |
|
| $status |
| | Status of this task (=for current item subfolder).
|
| |
|
|
| $charMappings |
| |
|
| $charMapping |
| |
Cleans files/foldernames of the folder, applying certain replacement rules for 'non-safe' characters.
- Author
- Peter Bubestinger-Steindl (pb@av.nosp@m.-rd..nosp@m.com)
- Copyright
- Copyright 2018 AV-RD e.U. (License: GNU General Public License (v3))
- See also
-
| TaskCleanFilenames::cleanFilename |
( |
|
$filename | ) |
|
Replaces possibly dangerous/problematic characters in $filename string. To be used for file- or foldernames.
| TaskCleanFilenames::init |
( |
| ) |
|
Prepare everything so it's ready for processing.
- Returns
- bool success True if init went fine, False if an error occurred.
| TaskCleanFilenames::loadSettings |
( |
| ) |
|
|
protected |
Load settings from config that are relevant for this task.
| TaskCleanFilenames::renameFile |
( |
|
$fileIn, |
|
|
|
$fileOut |
|
) |
| |
|
protected |
Rename a file from $fileIn to $fileOut.
| TaskCleanFilenames::run |
( |
| ) |
|
Perform the actual steps of this task.
| TaskCleanFilenames::setMapping |
( |
|
$mapping | ) |
|
| TaskCleanFilenames::$CHARS_BRACKETS |
|
static |
Initial value:= array(
"(" => "_",
")" => "_",
"[" => "_",
"]" => "_",
"{" => "_",
"}" => "_",
"<" => "_",
">" => "_",
)
| TaskCleanFilenames::$CHARS_ILLEGAL |
|
static |
Initial value:= array(
"?" => "_",
"*" => "_",
":" => "_",
)
| TaskCleanFilenames::$CHARS_PICKY |
|
static |
Initial value:= array(
"#" => "_",
"," => "_",
";" => "_",
"&" => "and",
)
| TaskCleanFilenames::$CHARS_QUOTATION |
|
static |
Initial value:= array(
"„" => "\"",
"“" => "\"",
"´" => "'",
"`" => "'",
)
| TaskCleanFilenames::$CHARS_QUOTATION2 |
|
static |
Initial value:= array(
"„" => "_",
"“" => "_",
"´" => "_",
"`" => "_",
'"' => "_",
"'" => "_",
)
| TaskCleanFilenames::$CHARS_SLASHES |
|
static |
Initial value:= array(
"\\" => "_",
"/" => "_",
)
| TaskCleanFilenames::$CHARS_UMLAUTS |
|
static |
Initial value:= array(
"ä" => "ae",
"ü" => "ue",
"ö" => "oe",
"ß" => "ss",
"Ä" => "AE",
"Ü" => "UE",
"Ö" => "OE",
)
| TaskCleanFilenames::$CHARS_WHITESPACE |
|
static |
The documentation for this class was generated from the following file:
- /home/pb/avrd/projects/cinbox/bin/tasks/TaskCleanFilenames.php