Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / infrastructure / customfield / field / PhabricatorCustomFieldAttachment.php
blob31813c0c3297459692bc8de4cc2029ece66d82da
1 <?php
3 /**
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;
17 return $this;
20 public function getCustomFieldList($role) {
21 if (empty($this->lists[$role])) {
22 throw new PhabricatorCustomFieldNotAttachedException(
23 pht(
24 "Role list '%s' is not available!",
25 $role));
27 return $this->lists[$role];