This directory contains runnable PHP scripts for the current public API and service flow.
php docs/examples/01-basic-generation.php- 01-basic-generation.php — simple random generation and seed usage.
- 02-profiles-and-shortcuts.php — profile helpers and shortcuts (
Profiles,ProfileBuilder). - 03-specific-browser-specs.php — browser-focused
GenerationSpecconstraints. - 04-complex-constraints.php — combined OS/device/version/locale/arch constraints.
- 05-strategies.php — strategy examples (strategy class resolution in
UserAgentService). - 06-error-handling.php — handling invalid or impossible constraints (
InvalidSpecException,NoCandidateException,GenerationPolicyException). - 07-deterministic-history.php — seeded generation and
RandomSpecexamples. - facade-demo.php — static facade (
UserAgent::chrome()->windows()->generate(),batch(),unique(),exclude()).