Module prelude

Source
Expand description

A module typically glob-imported containing the typically required macros and imports.

Re-exports§

pub use crate::builders::ModuleBuilder;
pub use crate::closure::Closure;closure
pub use crate::exception::PhpException;
pub use crate::exception::PhpResult;
pub use crate::types::ZendCallable;

Macros§

php_print
Prints to the PHP standard output, without a newline.
php_println
Prints to the PHP standard output, with a newline.

Attribute Macros§

php_class
Annotates a struct that will be exported to PHP as a class.
php_const
Attribute used to annotate constants to be exported to PHP.
php_extern
Attribute used to annotate extern blocks which are deemed as PHP functions.
php_function
Attribute used to annotate a function as a PHP function.
php_impl
Annotates a structs impl block, declaring that all methods and constants declared inside the impl block will be declared as PHP methods and constants.
php_module
Annotates a function that will be used by PHP to retrieve information about the module.
php_startup
Annotates a function that will be called by PHP when the module starts up. Generally used to register classes and constants.

Derive Macros§

ZvalConvert
Derives the traits required to convert a struct or enum to and from a Zval. Both FromZval and IntoZval are implemented on types which use this macro.