TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Utility\ResourceUtility Class Reference

Static Public Member Functions

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! 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 72 of file ResourceUtility.php.

References $result.

◆ 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 32 of file ResourceUtility.php.

References $result.