Skip to content

Framework Detection

Data Helpers automatically detects which frameworks are available and enables appropriate integrations.

Framework detection happens at runtime by checking for framework-specific classes:

// Laravel Detection
if (class_exists(\Illuminate\Support\Collection::class)) {
// Enable Laravel Collection support
}
// Doctrine Detection
if (class_exists(\Doctrine\Common\Collections\Collection::class)) {
// Enable Doctrine Collection support
}
// Symfony Detection
if (class_exists(\Symfony\Component\HttpFoundation\Request::class)) {
// Enable Symfony Request support
}

Automatically detected features:

  • Collections (Illuminate\Support\Collection)
  • Eloquent Models (Illuminate\Database\Eloquent\Model)
  • Service Provider auto-registration
  • Controller dependency injection

Automatically detected features:

  • Collections (Doctrine\Common\Collections\ArrayCollection)
  • Entities with Doctrine ORM
  • Value Resolver for controllers
  • Request data extraction

Automatically detected features:

  • Collections (Doctrine\Common\Collections\Collection)
  • Entities with relationships
  • Lazy loading support

Works out of the box with:

  • Arrays
  • Objects
  • JSON strings
  • XML strings

No configuration files or environment variables needed. Framework support is enabled automatically when the framework is present.

  • No Setup Required - Just install and use
  • Framework Agnostic - Same API across all frameworks
  • Optimal Performance - Only loads framework-specific code when needed
  • Easy Testing - Works in any environment