Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/adapter/HeraldAdapter.php
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | abstract class HeraldAdapter extends Phobject { | ||||
| } | } | ||||
| public function getPHID() { | public function getPHID() { | ||||
| return $this->getObject()->getPHID(); | return $this->getObject()->getPHID(); | ||||
| } | } | ||||
| abstract public function getHeraldName(); | abstract public function getHeraldName(); | ||||
| final public function willGetHeraldField($field_key) { | |||||
| // This method is called during rule evaluation, before we engage the | |||||
| // Herald profiler. We make sure we have a concrete implementation so time | |||||
| // spent loading fields out of the classmap is not mistakenly attributed to | |||||
| // whichever field happens to evaluate first. | |||||
| $this->requireFieldImplementation($field_key); | |||||
| } | |||||
| public function getHeraldField($field_key) { | public function getHeraldField($field_key) { | ||||
| return $this->requireFieldImplementation($field_key) | return $this->requireFieldImplementation($field_key) | ||||
| ->getHeraldFieldValue($this->getObject()); | ->getHeraldFieldValue($this->getObject()); | ||||
| } | } | ||||
| public function applyHeraldEffects(array $effects) { | public function applyHeraldEffects(array $effects) { | ||||
| assert_instances_of($effects, 'HeraldEffect'); | assert_instances_of($effects, 'HeraldEffect'); | ||||
| ▲ Show 20 Lines • Show All 1,107 Lines • Show Last 20 Lines | |||||