Crate mago_codex

Crate mago_codex 

Source

Modules§

assertion
consts
context
diff
flags
identifier
issue
metadata
misc
populator
reference
scanner
symbol
ttype
visibility

Enums§

ClassConstantOrEnumCase
An enum to represent either a class constant or an enum case.

Functions§

class_exists
Checks if a class exists in the codebase.
class_like_constant_or_enum_case_exists
Checks if a constant or enum case exists on a given class-like.
class_like_exists
Checks if a class-like (class, interface, enum, or trait) exists in the codebase.
class_or_interface_exists
Checks if a class or interface exists in the codebase.
class_or_trait_exists
Checks if a class or trait exists in the codebase.
constant_exists
Checks if a global constant exists in the codebase.
declaring_method_exists
Checks if a method is declared directly on a given class-like (not inherited).
declaring_property_exists
Checks if a property is declared directly on a given class-like (not inherited).
directly_inherits_class
directly_inherits_interface
enum_exists
Checks if an enum exists in the codebase.
function_exists
Checks if a global function exists in the codebase.
get_all_descendants
Recursively collects all descendant class/interface/enum FQCNs for a given class-like structure. Uses the pre-computed all_classlike_descendants map if available, otherwise might be empty. Warning: Recursive; could stack overflow on extremely deep hierarchies if map isn’t precomputed well.
get_anonymous_class
Retrieves the metadata for an anonymous class based on its span.
get_anonymous_class_name
get_class
Retrieves the metadata for a class.
get_class_constant_type
Retrieves the type of a class constant, considering type hints and inferred types. Returns None if the class or constant doesn’t exist, or type cannot be determined.
get_class_like
Retrieves the metadata for any class-like (class, interface, enum, or trait).
get_class_like_constant_or_enum_case
Retrieves the metadata for a class constant or an enum case from a class-like.
get_closure
Retrieves the metadata for a closure based on its position in the source code.
get_constant
Retrieves the metadata for a global constant.
get_declaring_class_for_property
get_declaring_method
Retrieves the metadata for a method, searching the inheritance hierarchy.
get_declaring_method_identifier
get_declaring_property
Retrieves the metadata for a property, searching the inheritance hierarchy.
get_enum
Retrieves the metadata for an enum.
get_function
Retrieves the metadata for a global function.
get_function_like_thrown_types
get_interface
Retrieves the metadata for an interface.
get_method
get_method_by_id
get_method_identifier
get_property
Retrieves the metadata for a property that is declared directly on the given class-like.
get_trait
Retrieves the metadata for a trait.
inherits_class
inherits_interface
interface_exists
Checks if an interface exists in the codebase.
is_instance_of
Checks if a class-like is an instance of another class-like.
is_method_abstract
is_method_final
is_method_overriding
Checks if a method is overridden from a parent class-like.
is_method_static
method_exists
Checks if a method exists on a given class-like (including inherited methods).
method_identifier_exists
property_exists
Checks if a property exists on a given class-like (including inherited properties).
trait_exists
Checks if a trait exists in the codebase.
uses_trait