Autoloader API

Module: Autoloader

File path: DafPhpFramwork/autoloader.php

Daf autoloading registers a global autoload callback and resolves project classes, PHAR packages, then vendor paths.

Functions

  • autoload(string $name): void - main class resolution flow.
  • load(string $filename): bool - normalizes path separators then require_once.
  • is_win_os(): bool - platform detection for path normalization.
  • resolvePharClassPath(string $name): string|null - maps namespace to phar://... path.
  • VAR_DUMP_DEBUG($value) - debug helper.

Lookup Order

  1. Skip primitive type aliases (int, bool, etc.).
  2. Try app-local class path if namespace starts with app root name.
  3. Try PHAR file path from namespace root.
  4. Try vendor\$name.php.