TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
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

static 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.

static 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.