Page MenuHomePhabricator

final class LiskDAOSet
Phabricator Technical Documentation (Storage)

You usually don't need to use this class directly as it is controlled by LiskDAO. You can create it if you want to work with objects of same type from different sources as with one set. Let's say you want to get e-mails of all users involved in a revision:

$users = new LiskDAOSet();
$users->addToSet($author);
foreach ($reviewers as $reviewer) {
  $users->addToSet($reviewer);
}
foreach ($ccs as $cc) {
  $users->addToSet($cc);
}
// Preload e-mails of all involved users and return e-mails of author.
$author_emails = $author->loadRelatives(
  new PhabricatorUserEmail(),
  'userPHID',
  'getPHID');

Methods

public function addToSet($dao)

This method is not documented.
Parameters
LiskDAO$dao
Return
wild

public function clearSet()

The main purpose of this method is to break cyclic dependency. It removes all objects from this set and all subsets created by it.

Return
wild

public function loadRelatives($object, $foreign_column, $key_method, $where)

Parameters
LiskDAO$object
$foreign_column
$key_method
$where
Return
wild