PHP code example of senseexception / intl-bundle
1. Go to this page and download the library: Download senseexception/intl-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
senseexception / intl-bundle example snippets
php
return [
// ...
Budgegeria\Bundle\IntlBundle\BudgegeriaIntlBundle::class => ['all' => true],
// ...
];
php
class Foo
{
/**
* Injecting services "budgegeria_intl_bundle.sorter.my_sorter" or
* "budgegeria_intl_bundle.sorter.sorter_wo_locale"
*/
public function __construct(private Budgegeria\IntlSort\Sorter\Sorter $sorter)
{
}
public function bar(): void
{
$sortedArray = $this->sorter->sort(['a', 'y', 'ä']);
}
}