- ⌂ repo
- Methods
- Constructor
- execute()
- get()
- get_content_type()
- get_first()
- get_object()
- get_object_by_id()
- get_object_by_oid()
- get_object_by_doid()
- get_object_by_uuid()
- get_objects_by_id()
- get_objects_by_oid()
- get_objects_by_doid()
- get_objects_by_uuid()
- get_root()
- get_row()
- get_rows()
- get_system_property()
- log_alert()
- log_critical()
- log_to_file()
- log_to_html()
- new_collection()
- new_object()
- peek_user()
- pop_user()
- push_super_user()
- push_user()
- query()
- supports_dimensions()
- switch_user()
- uninit()
- with()
repo::get_object_by_uuid()
Retrieve an object from the repository by it's UUID, optionally ensuring it is or extends a given content type.
Prototype
cObject get_object_by_uuid(mixed $uuid, mixed $content_type = NULL)
Parameters
- uuid - Object UUID, provided in binary, hex or string format.
- content_type - Optional Content Type identified by a content type object, the Content Type numeric ID or string Identifier.
Return
The cObject if a matching object is found. Otherwise, NULL.
Example
$contact = $repo->get_object_by_uuid('89a3603d-10f7-11e9-abc5-7368ad2cd4a1', 'Contact');
if($contact !== NULL) {
echo($contact->Name . " - " . $contact->Phone . "\n");
}
Related
get_objects_by_uuid(), get_object_by_oid(), get_object_by_doid(), get_object_by_id(), get_object(), get()