Changeset View
Changeset View
Standalone View
Standalone View
src/hardpoint/ArcanistHardpointList.php
| Show All 40 Lines | final class ArcanistHardpointList | ||||
| public function hasHardpoint($object, $hardpoint) { | public function hasHardpoint($object, $hardpoint) { | ||||
| return isset($this->hardpoints[$hardpoint]); | return isset($this->hardpoints[$hardpoint]); | ||||
| } | } | ||||
| public function hasAttachedHardpoint($object, $hardpoint) { | public function hasAttachedHardpoint($object, $hardpoint) { | ||||
| return isset($this->attached[$hardpoint]); | return isset($this->attached[$hardpoint]); | ||||
| } | } | ||||
| public function getHardpoints() { | |||||
| return $this->hardpoints; | |||||
| } | |||||
| public function getHardpointDefinition($object, $hardpoint) { | public function getHardpointDefinition($object, $hardpoint) { | ||||
| if (!$this->hasHardpoint($object, $hardpoint)) { | if (!$this->hasHardpoint($object, $hardpoint)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Hardpoint ("%s") is not registered on this object (of type "%s") '. | 'Hardpoint ("%s") is not registered on this object (of type "%s") '. | ||||
| 'so the definition object does not exist. Hardpoints are: %s.', | 'so the definition object does not exist. Hardpoints are: %s.', | ||||
| $hardpoint, | $hardpoint, | ||||
| phutil_describe_type($object), | phutil_describe_type($object), | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||