1: <?php
2:
3: namespace PHPixie\ORM\Relationships\Relationship\Implementation\Preloader\Result;
4:
5: abstract class Single extends \PHPixie\ORM\Relationships\Relationship\Implementation\Preloader\Result
6: {
7: protected function getMappedFor($model)
8: {
9: $id = $this->getMappedIdFor($model);
10:
11: if($id === null)
12: return null;
13:
14: return $this->getEntity($id);
15: }
16:
17: abstract protected function getMappedIdFor($model);
18: }
19: