Loads the all the related objects into the main object, by using the links.ini relationships, and sets the calling objects variables with the row name prefixed with an underscode (_) to the resulting objects.
Using this with the earlier column naming convention is depreciated, and links.ini files should be used.
Parameter
string $variableFormat - the default behavior is to assign the resulting objects to variables with the row name prefixed with an underscode (_), however, you can use this value to format the variable differently
if room.occupied_by is linked to a person.id without a modifier - eg _%s results in the equivilant of $object->_occupied_by = $object->getLink('occupied_by'); with a modifier - eg link_%s results in the equivilant of $object->link_occupied_by = $object->getLink('occupied_by');
/** * The following example show a three tables join. * * More joins can be nested as you see fit. */ $person = new DataObjects_Person; $data = array(); if ($person->find()) { while ($person->fetch()) { $person->getLinks(); // Following is another call to getLinks for the second join $person->_convention_id->getLinks(); $data[] = $person->_convention_id->_room_id->ToArray(); } } print_r($data);
Deliver First Class Web Sites: 101 Essential Checklists Want to learn how to make your web sites usable and accessible? Want to ensure that your sites meet current best practice, without spending hours trawling through incomprehensible specifications and recommendations from dozens of different books, research papers, and web sites? Want to make sure that the sites you build are "right the first time," requiring no costly redevelopments?