pub struct ClassDef {Show 23 fields
pub fqcn: Arc<str>,
pub short_name: Arc<str>,
pub parent: Option<Arc<str>>,
pub interfaces: Vec<Arc<str>>,
pub traits: Vec<Arc<str>>,
pub own_methods: IndexMap<Arc<str>, Arc<MethodDef>>,
pub own_properties: IndexMap<Arc<str>, PropertyDef>,
pub own_constants: IndexMap<Arc<str>, ConstantDef>,
pub mixins: Vec<Arc<str>>,
pub template_params: Vec<TemplateParam>,
pub extends_type_args: Vec<Type>,
pub implements_type_args: Vec<(Arc<str>, Vec<Type>)>,
pub is_abstract: bool,
pub is_final: bool,
pub is_readonly: bool,
pub deprecated: Option<Arc<str>>,
pub is_internal: bool,
pub attribute_flags: Option<i64>,
pub location: Option<Location>,
pub trait_use_locations: Vec<(Arc<str>, Location)>,
pub type_aliases: FxHashMap<Arc<str>, Type>,
pub pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>,
pub trait_insteadof: IndexMap<Arc<str>, Vec<Arc<str>>>,
}Fields§
§fqcn: Arc<str>§short_name: Arc<str>§parent: Option<Arc<str>>§interfaces: Vec<Arc<str>>§traits: Vec<Arc<str>>§own_methods: IndexMap<Arc<str>, Arc<MethodDef>>§own_properties: IndexMap<Arc<str>, PropertyDef>§own_constants: IndexMap<Arc<str>, ConstantDef>§mixins: Vec<Arc<str>>§template_params: Vec<TemplateParam>§extends_type_args: Vec<Type>Type arguments from @extends ParentClass<T1, T2> — maps parent’s template params to concrete types.
implements_type_args: Vec<(Arc<str>, Vec<Type>)>Type arguments from @implements Interface<T1, T2>.
is_abstract: bool§is_final: bool§is_readonly: bool§deprecated: Option<Arc<str>>§is_internal: bool§attribute_flags: Option<i64>Attribute target flags if this class has #[Attribute] annotation.
None = not an attribute class. The value is a bitmask of PHP’s
Attribute::TARGET_* constants (e.g. Attribute::TARGET_CLASS = 1).
location: Option<Location>§trait_use_locations: Vec<(Arc<str>, Location)>Per-use statement locations for each used trait: (fqcn, location) in
declaration order, parallel to traits. Absent from older serialized
slices; defaults to empty.
type_aliases: FxHashMap<Arc<str>, Type>Type aliases declared on this class via @psalm-type / @phpstan-type.
pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>Raw import-type declarations ((local_name, original_name, from_class)) — resolved during finalization.
trait_insteadof: IndexMap<Arc<str>, Vec<Arc<str>>>Trait precedence exclusions from insteadof declarations in this class’s use blocks.
Maps method_name_lowercase → list of trait FQCNs whose version of the method is excluded.
E.g. use A, B { B::hello insteadof A; } stores "hello" → ["A"].