Skip to main content

Crate alef_backend_php

Crate alef_backend_php 

Source
Expand description

PHP (ext-php-rs) binding generator backend for alef.

Modules§

naming
PHP-specific naming helpers for ResolvedCrateConfig.
trait_bridge
PHP (ext-php-rs) specific trait bridge code generation.

Structs§

PhpBackend

Functions§

is_php_prop_scalar
Returns true if the type is “scalar-compatible” — i.e. ext-php-rs can handle it as a Check if a type is scalar-compatible for PHP properties, considering enum names. #[php(prop)] without needing a manual getter. Scalar-compatible means the mapped Rust type implements IntoZval + FromZval automatically: primitives, String, bool, Duration (→ u64), Path (→ String), Option, Vec (the Vec<T: IntoZval> blanket impl). Anything containing a Named struct, Map, nested Vec, Json, or Bytes requires a getter. Enums are mapped as String in the PHP binding, so they count as scalar.