w3roman / php-helper
PHP Helper
1.0.1
2025-04-01 18:24 UTC
Requires
- php: ^8.0
- ext-fileinfo: *
- ext-mbstring: *
- ext-simplexml: *
- ext-zip: *
Requires (Dev)
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2025-04-01 18:52:58 UTC
README
Installation
composer req w3roman/php-helper
Usage
Methods
addPrefixToArrayKeys(array $array, string $prefix, bool $recursively = true): array; addPostfixToArrayKeys(array $array, string $postfix, bool $recursively = true): array; addZeroPrefix(string $value, int $order = 1): string; arrayToXml(array $data, SimpleXMLElement &$xmlData = null): string; auth(array $credentials): bool; clearAllCookies(): bool; createSitemap(array $items, bool $addUrlsetTag = true): string createSitemapIndex(array $items, bool $addSitemapindexTag = true): string createSqlValuesString(array $values, string $valueWrapper = '"'): string; csvStringToArray(string $csvString, bool $removeFirstLine = false): array; filterListOfArraysByKeyValuePairs(array $inputArray, array $searchParams): array; getBase64Image(string $absolutePathToImage): string; getClassNameFromObject(object $object): string; getClassNameFromString(string $className): string; getDatesBetweenDates(string $startDate, string $endDate, string $format = 'Y-m-d'): array; getFilesInDirectory(string $pathToDirectory, bool $recursively = false, array $fileExtensions = [], &$result = []): array; getFullUrl(): string; getNormalizedDayOfWeek(int $dayOfWeek): int; getRandomWeightedElement(array $weightedValues); getResponseHeader(string $header, array $response): string; getTimezoneOffset(string $timeZone): int; insertAfterKey(array $array, string $afterKey, string $key, string $new); isAjax(): bool; mbUcfirst(string $string): string; parseCookies(string $cookiesString): array prettyVarExportSoft(array $array): string; prettyVarExportHard(array $array): string; putArrayToCsvFile(string $filename, array $array): bool; quickSort(array $array): array; rangeGenerator(int $start, int $limit, int $step = 1): Generator; removeCookie(string $name): bool; removeDirectoryRecursively(string $pathToDirectory): bool; removeDuplicatesFromMultiDimensionalArray(array $array): array; secondsToTime(int $seconds): array; sortByDate(array $array, string $key, bool $asc = true): array; strRepeatWithSeparator(string $input, int $multiplier, string $separator = ''): string; tabDelimitedStringToArray(string $string): array; unzip(string $pathToArchive, string $extractTo);
Tests
make tests