TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Utility\ResourceUtility Class Reference

Static Public Member Functions

static recursiveFileListSortingHelper ($elementA, $elementB)
 
static nameCompareSortingHelper ($elementA, $elementB)
 

Detailed Description

Utility class for the File Abstraction Layer (aka subpackage Resource in EXT:core)

Definition at line 20 of file ResourceUtility.php.

Member Function Documentation

◆ nameCompareSortingHelper()

static TYPO3\CMS\Core\Utility\ResourceUtility::nameCompareSortingHelper (   $elementA,
  $elementB 
)
static

This is a helper method that can be used with u?sort methods to sort a list of names in natural order. With capitalized first if both equal in lowercase.

Parameters
string$elementA
string$elementB
Returns
int

Definition at line 74 of file ResourceUtility.php.

◆ recursiveFileListSortingHelper()

static TYPO3\CMS\Core\Utility\ResourceUtility::recursiveFileListSortingHelper (   $elementA,
  $elementB 
)
static

This is a helper method that can be used with u?sort methods to sort a list of (relative) file paths, e.g. array("someDir/fileA", "fileA", "fileB", "anotherDir/fileA").

Directories are sorted first in the lists, with the deepest structures first (while every level is sorted alphabetically)

Parameters
string$elementA
string$elementB
Returns
int

Definition at line 33 of file ResourceUtility.php.