Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($options) | |
getFile () | |
setFile ($options) | |
addFile ($options) | |
getNewName ($value, $source=false) | |
filter ($value) | |
Protected Member Functions | |
_convertOptions ($options) | |
_getFileName ($file) | |
Protected Attributes | |
$_files = array() | |
Definition at line 33 of file Rename.php.
__construct | ( | $options | ) |
Class constructor
Options argument may be either a string, a Zend_Config object, or an array. If an array or Zend_Config object, it accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the sourcefile 'overwrite' => Shall existing files be overwritten ?
string | array | $options | Target file or directory to be renamed |
string | $target | Source filename or directory (deprecated) |
bool | $overwrite | Should existing files be overwritten (deprecated) |
Definition at line 54 of file Rename.php.
|
protected |
Internal method for creating the file array Supports single and nested arrays
array | $options |
Definition at line 208 of file Rename.php.
|
protected |
Internal method to resolve the requested source and return all other related parameters
string | $file | Filename to get the informations for |
Definition at line 273 of file Rename.php.
addFile | ( | $options | ) |
Adds a new file or directory as target to the existing ones
Array accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the sourcefile 'overwrite' => Shall existing files be overwritten ?
string | array | $options | Old file or directory to be rewritten |
Definition at line 120 of file Rename.php.
filter | ( | $value | ) |
Defined by Zend_Filter_Interface
Renames the file $value to the new name set before Returns the file $value, removing all but digit characters
string | $value | Full path of file to change |
Zend_Filter_Exception |
Implements Zend_Filter_Interface.
Definition at line 184 of file Rename.php.
getFile | ( | ) |
Returns the files to rename and their new name and location
Definition at line 85 of file Rename.php.
getNewName | ( | $value, | |
$source = false |
|||
) |
Returns only the new filename without moving it But existing files will be erased when the overwrite option is true
string | $value | Full path of file to change |
boolean | $source | Return internal informations |
Definition at line 142 of file Rename.php.
setFile | ( | $options | ) |
Sets a new file or directory as target, deleting existing ones
Array accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the sourcefile 'overwrite' => Shall existing files be overwritten ?
string | array | $options | Old file or directory to be rewritten |
Definition at line 101 of file Rename.php.
|
protected |
Internal array of array(source, target, overwrite)
Definition at line 38 of file Rename.php.