Trait ext_php_rs::class::RegisteredClass [−][src]
pub trait RegisteredClass: Sized + 'static {
const CLASS_NAME: &'static str;
const CONSTRUCTOR: Option<ConstructorMeta<Self>>;
fn get_metadata() -> &'static ClassMetadata<Self>;
fn get_properties<'a>() -> HashMap<&'static str, Property<'a, Self>>;
}
Expand description
Implemented on Rust types which are exported to PHP. Allows users to get and set PHP properties on the object.
Associated Constants
const CLASS_NAME: &'static str
const CLASS_NAME: &'static str
PHP class name of the registered class.
const CONSTRUCTOR: Option<ConstructorMeta<Self>>
const CONSTRUCTOR: Option<ConstructorMeta<Self>>
Optional class constructor.
Required methods
fn get_metadata() -> &'static ClassMetadata<Self>
fn get_metadata() -> &'static ClassMetadata<Self>
Returns a reference to the class metadata, which stores the class entry and handlers.
This must be statically allocated, and is usually done through the
macro@php_class
macro.