- ⌂ cObject
- Methods
- Constructor
- add_variant()
- approve()
- as_array()
- can_add_variant()
- can_delete_variant()
- can_edit_variant()
- can_reorder_variant()
- clone()
- delete()
- edit_variant()
- enum()
- get_active_object()
- get_all_variants()
- get_attributes()
- get_dimensions()
- get_dimension_with()
- get_parent()
- get_primary_cpath()
- get_variant()
- Keywords()
- lock_object()
- reload_data()
- repo()
- revert()
- save()
- store()
- unlock_object()
- update_from_array()
- validate()
cObject::repo()
Return the repository this object is associated with. An object is associated with a repository when it is returned from a repository query, created as a new object with repo::new_object(), or similar.
Prototype
repository repo()
Return
Returns the repository this object is associated with.
Example
$repo = \comand::repo();
$contact = $repo->get('FROM Contact LIMIT 1');
$contact->FirstName = 'Jim';
sleep(60);
// reload field values that may have changed in the repository
// if FirstName has changed in the repository, it will not be
// reloaded because it was modified above.
$contact->reload_data();