File helper improvements (Deprecation)
Included in this release:
- JSONFile: Made the
$prettyparameter optional. - JSONFile: Added
getData()as alias forparse(). - JSONFile: Added
setPrettyPrint()to set the option separately. - JSONFile: Added
setTrailingNewline()to add a newline at the end of the file. - JSONFile: Added
setEscapeSlashes()to set whether to escape slashes in the output. - JSONFile: Added
options()to work with all options. - JSONFile: Added
JSONOptionswith the possibility to set options globally. - Optionable: Tweaked the handling of default values.
- Optionable: Added setting option default values.
- Optionable: Added
getArrayAdvanced()for type-specific array handling. - FileFinder: Added
getFiles()for a wider range of type-specific methods to access files. - ClassHelper: Added
findClassesInFolder()to get all classes in a folder. - ClassHelper:
requireClassExists()can now be used interchangeably for classes, interfaces, and traits. - ClassHelper: Added
isClassInstanceOf().
Deprecations
The following FileFinder methods have been deprecated:
FileFinder::getAll()>FileFinder::getMatches()FileFinder::getFileInfos()>FileFinder::getFiles()->typeANY()FileFinder::getPHPFiles()>FileFinder::getFiles()->typePHP()FileFinder::getPHPClassNames()>FileFinder::getFiles()->PHPClassNames()