4 * Convenience class which simplifies the implementation of
5 * @{interface:PhabricatorCustomFieldInterface} by obscuring the details of how
6 * custom fields are stored.
8 * Generally, you should not use this class directly. It is used by
9 * @{class:PhabricatorCustomField} to manage field storage on objects.
11 final class PhabricatorCustomFieldAttachment
extends Phobject
{
13 private $lists = array();
15 public function addCustomFieldList($role, PhabricatorCustomFieldList
$list) {
16 $this->lists
[$role] = $list;
20 public function getCustomFieldList($role) {
21 if (empty($this->lists
[$role])) {
22 throw new PhabricatorCustomFieldNotAttachedException(
24 "Role list '%s' is not available!",
27 return $this->lists
[$role];