Skip to content

Commit

Permalink
* Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronef committed Nov 16, 2021
1 parent de6b136 commit 8d7ff53
Showing 1 changed file with 66 additions and 66 deletions.
132 changes: 66 additions & 66 deletions modx.ddtools.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,6 @@ public static function explodeAssoc(
return $result;
}

/**
* unfoldArray
* @version 1.1 (2021-11-16)
*
* @see README.md (\DDTools\ObjectTools::unfold)
*/
public static function unfoldArray(
$array,
$keyPrefix = ''
){
return \DDTools\ObjectTools::unfold([
'object' => $array,
'keyPrefix' => $keyPrefix
]);
}

/**
* sort2dArray
* @version 1.2.1 (2021-03-09)
Expand Down Expand Up @@ -485,56 +469,6 @@ public static function parseFileNameVersion($file){
return $result;
}

/**
* createDir
* @version 1.0 (2019-10-22)
*
* @desc Makes directory using `$modx->config['new_folder_permissions']`. Nested directories will be created too. Doesn't throw an exception if the folder already exists.
*
* @param $params {stdClass|arrayAssociative} — Parameters, the pass-by-name style is used. @required
* @param $params->path {string} — The directory path. @required
*
* @return {boolean} — Success status.
*/
public static function createDir($params){
return \DDTools\FilesTools::createDir($params);
}

/**
* copyDir
* @version 1.1 (2018-10-02)
*
* @desc Copies a required folder with all contents recursively.
*
* @param $sourcePath {string} — Path to the directory, that should copied. @required
* @param $destinationPath {string} — The destination path. @required
*
* @return {boolean} — Returns true on success or false on failure.
*/
public static function copyDir(
$sourcePath,
$destinationPath
){
return \DDTools\FilesTools::copyDir([
'sourcePath' => $sourcePath,
'destinationPath' => $destinationPath
]);
}

/**
* removeDir
* @version 1.1 (2018-10-02)
*
* @desc Removes a required folder with all contents recursively.
*
* @param $path {string} — Path to the directory, that should removed. @required
*
* @return {boolean}
*/
public static function removeDir($path){
return \DDTools\FilesTools::removeDir($path);
}

/**
* generateRandomString
* @version 1.0.3 (2018-06-17)
Expand Down Expand Up @@ -2828,6 +2762,72 @@ public static function getResponse(){
return new \DDTools\Response();
}

/**
* unfoldArray
* @version 1.1 (2021-11-16)
*
* @see README.md (\DDTools\ObjectTools::unfold)
*/
public static function unfoldArray(
$array,
$keyPrefix = ''
){
return \DDTools\ObjectTools::unfold([
'object' => $array,
'keyPrefix' => $keyPrefix
]);
}

/**
* createDir
* @version 1.0 (2019-10-22)
*
* @desc Makes directory using `$modx->config['new_folder_permissions']`. Nested directories will be created too. Doesn't throw an exception if the folder already exists.
*
* @param $params {stdClass|arrayAssociative} — Parameters, the pass-by-name style is used. @required
* @param $params->path {string} — The directory path. @required
*
* @return {boolean} — Success status.
*/
public static function createDir($params){
return \DDTools\FilesTools::createDir($params);
}

/**
* copyDir
* @version 1.1 (2018-10-02)
*
* @desc Copies a required folder with all contents recursively.
*
* @param $sourcePath {string} — Path to the directory, that should copied. @required
* @param $destinationPath {string} — The destination path. @required
*
* @return {boolean} — Returns true on success or false on failure.
*/
public static function copyDir(
$sourcePath,
$destinationPath
){
return \DDTools\FilesTools::copyDir([
'sourcePath' => $sourcePath,
'destinationPath' => $destinationPath
]);
}

/**
* removeDir
* @version 1.1 (2018-10-02)
*
* @desc Removes a required folder with all contents recursively.
*
* @param $path {string} — Path to the directory, that should removed. @required
*
* @return {boolean}
*/
public static function removeDir($path){
return \DDTools\FilesTools::removeDir($path);
}

/**
* screening
* @deprecated Use ddTools::escapeForJS.
Expand Down

0 comments on commit 8d7ff53

Please sign in to comment.