Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 7d505df

Browse files
author
Vincenzo Trapani
committed
Move constants into the interface
1 parent c1219e3 commit 7d505df

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Amara/OneHydra/Object/PageObject.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ class PageObject implements PageObjectInterface {
2727
/** @var \stdClass */
2828
private $serverSide;
2929

30-
CONST MAIN_LINKS_SECTION = 'main links';
31-
32-
CONST RELATED_LINKS_SECTION = 'related links';
33-
3430
/**
3531
* @return \stdClass
3632
*/
@@ -133,14 +129,14 @@ public function setServerSide($serverSide) {
133129
* @return array
134130
*/
135131
public function getMainLinks() {
136-
return $this->getLinkSection(PageObject::MAIN_LINKS_SECTION);
132+
return $this->getLinkSection(PageObjectInterface::MAIN_LINKS_SECTION);
137133
}
138134

139135
/**
140136
* @return array
141137
*/
142138
public function getRelatedLinks() {
143-
return $this->getLinkSection(PageObject::RELATED_LINKS_SECTION);
139+
return $this->getLinkSection(PageObjectInterface::RELATED_LINKS_SECTION);
144140
}
145141

146142
/**

src/Amara/OneHydra/Object/PageObjectInterface.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
namespace Amara\OneHydra\Object;
77

88
interface PageObjectInterface {
9+
10+
CONST MAIN_LINKS_SECTION = 'main links';
11+
12+
CONST RELATED_LINKS_SECTION = 'related links';
13+
914
/**
1015
* @return \stdClass
1116
*/

0 commit comments

Comments
 (0)