PHP Class Bolt\Twig\Handler\ArrayHandler

Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Silex\Application $app )
order ( array $array, string $on, string $onSecondary = '' ) : array Sorts / orders items of an array.
shuffle ( array $array ) : array Randomly shuffle the contents of a passed array.
unique ( $arr1, $arr2 ) : array Takes two arrays and returns a compiled array of unique, sorted values

Private Methods

Méthode Description
orderHelper ( Content | array $a, Content | array $b ) : boolean Helper function for sorting an array of \Bolt\Legacy\Content.

Method Details

__construct() public méthode

public __construct ( Silex\Application $app )
$app Silex\Application

order() public méthode

Sorts / orders items of an array.
public order ( array $array, string $on, string $onSecondary = '' ) : array
$array array
$on string
$onSecondary string
Résultat array

shuffle() public méthode

Randomly shuffle the contents of a passed array.
public shuffle ( array $array ) : array
$array array
Résultat array

unique() public méthode

Takes two arrays and returns a compiled array of unique, sorted values
public unique ( $arr1, $arr2 ) : array
$arr1
$arr2
Résultat array