Getter
Helps with accessing fields on unknown values.
Static Methods
| Returns | Signature and Description |
|---|---|
mixed | get(, )Extracts any field from an object. |
mixed | getId()Gets the MongoDB-style ID from an object. |
Method Details
get
public static function
get(mixed $object, string $field)Extracts any field from an object.
| Name | Type | Description |
|---|---|---|
$object | mixed | The object |
$field | string |
| Type | Description |
|---|---|
mixed | The value found or |
getId
public static function
getId(mixed $object)Gets the MongoDB-style ID from an object.
| Name | Type | Description |
|---|---|---|
$object | mixed | The object |
| Type | Description |
|---|---|
mixed | The ID found or |