use-php-autoload 0.0.1

PHP autoload metadata primitives for RustUse.
Documentation
  • Coverage
  • 22.22%
    8 out of 36 items documented1 out of 30 items with examples
  • Size
  • Source code size: 9.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 825.58 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-php
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-php-autoload

PHP autoload metadata primitives for RustUse.

Experimental

use-php-autoload is experimental while use-php remains below 0.3.0.

Example

use use_php_autoload::{AutoloadPath, ClassmapEntry, Psr4Mapping, Psr4Prefix};

let mapping = Psr4Mapping::new(Psr4Prefix::new("App\\")?)
    .with_path(AutoloadPath::new("src/")?);
let classmap = ClassmapEntry::new("Legacy_Class", AutoloadPath::new("legacy/Legacy_Class.php")?);

assert_eq!(mapping.prefix().as_str(), "App\\");
assert_eq!(classmap.class_name(), "Legacy_Class");
# Ok::<(), use_php_autoload::PhpAutoloadError>(())

Scope

  • PSR-4 prefix mappings, classmap entries, files entries, and autoload strategy labels.

Non-goals

  • Composer JSON parsing, package resolution, filesystem scanning, or runtime autoloading.

License

Licensed under either Apache-2.0 or MIT.