-
-
Notifications
You must be signed in to change notification settings - Fork 0
Quick start
github-actions[bot] edited this page Jul 16, 2026
·
1 revision
composer require cloudcastle/support<?php
declare(strict_types=1);
use CloudCastle\Support\Str;
use CloudCastle\Support\Arr;
use CloudCastle\Support\Helpers;
// Строки (UTF-8): форматы имён, срезы, маскирование ПД
echo Str::studly('foo_bar_baz'); // FooBarBaz
echo Str::snake('fooBarBaz'); // foo_bar_baz
echo Str::mask('4111111111111111', '*', 0, 12); // ************1111
echo Str::plural('category'); // categories
// Массивы: точечная нотация (fail-safe)
$config = ['app' => ['db' => ['host' => 'localhost']]];
echo Arr::get($config, 'app.db.host'); // localhost
echo Arr::get($config, 'app.db.pass', '—'); // — (нет ключа)
// Хелперы потока: повтор восстановимой операции
$result = Helpers::retry(
times: 3,
callback: static fn (): string => fetchRemoteValue(),
sleepMs: 200,
when: static fn (Throwable $e): bool => $e instanceof RuntimeException,
);- 🧩 Возможности (хаб) — разбор каждой группы утилит
- 🔤 Строки (Str) · 🗃️ Массивы (Arr) · 🧰 Хелперы
- Архитектура
- Тестирование
- FAQ
CloudCastle Support · · PHP 8.1+
GitHub · Packagist · Releases · Discussions
Email · Telegram · VK · Сетка · 💜 Поддержать проект
Исходники Wiki — каталог wiki/ в репозитории (синхронизация через GitHub Actions)