| 1 | <?php |
||
| 12 | class ContentResolver |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var Content |
||
| 16 | */ |
||
| 17 | protected $content = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var ContentRepository |
||
| 21 | */ |
||
| 22 | protected $repo; |
||
| 23 | |||
| 24 | public function __construct(ContentRepository $repo) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array|\ArrayAccess $context |
||
| 31 | * @param null|string|Content $content |
||
| 32 | * @return self |
||
| 33 | * @throws InvalidContentReferenceException If $content is a string, but not |
||
| 34 | * a valid content reference. |
||
| 35 | */ |
||
| 36 | public function resolveFromContext($context, $content = null) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return Option The current Content |
||
| 61 | */ |
||
| 62 | public function getContent() |
||
| 66 | } |
||
| 67 |