Skip to main content

NativeArea

Trait NativeArea 

Source
pub trait NativeArea {
    // Provided methods
    fn functions(&self) -> Vec<FunctionBuilder<'static>> { ... }
    fn register_classes(&self) -> Result<(), String> { ... }
    fn request_start(&self) { ... }
    fn request_end(&self) { ... }
}
Expand description

One area of the extension.

Provided Methods§

Source

fn functions(&self) -> Vec<FunctionBuilder<'static>>

Global functions this area adds; registered once, at module startup.

Source

fn register_classes(&self) -> Result<(), String>

Registers this area’s classes (with ext_php_rs::builders::ClassBuilder); runs once, at module startup.

Source

fn request_start(&self)

Runs after each request has started and the extension’s own PHP setup has run, before any other PHP code.

Source

fn request_end(&self)

Runs as each request ends, also after a fatal error or exit() (from the module’s request shutdown).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§