ObjectId
in package
FinalYes
Marks a property as the object identifier for plain PHP objects.
Objects carrying this attribute are cached by reference (like Doctrine entities) instead of being serialized inline.
Example: class MyCustomObject { #[ObjectId] private int $id;
private string $name;
}
Attributes
- #[Attribute]
- \Attribute::TARGET_PROPERTY