Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
| PFWikiPageSection | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| isHideIfEmpty | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getHeader | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getHeaderLevel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getText | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @author Yaron Koren |
| 4 | * @file |
| 5 | * @ingroup PF |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * Represents a section (header and contents) in a wiki page. |
| 10 | */ |
| 11 | class PFWikiPageSection { |
| 12 | private $mHeader; |
| 13 | private $mHeaderLevel; |
| 14 | private $mText; |
| 15 | private $mHideIfEmpty; |
| 16 | |
| 17 | function __construct( $sectionName, $headerLevel, $sectionText, $sectionOptions ) { |
| 18 | $this->mHeader = $sectionName; |
| 19 | $this->mHeaderLevel = $headerLevel; |
| 20 | $this->mText = $sectionText; |
| 21 | $this->mHideIfEmpty = $sectionOptions['hideIfEmpty']; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * @return bool |
| 26 | */ |
| 27 | function isHideIfEmpty() { |
| 28 | return $this->mHideIfEmpty; |
| 29 | } |
| 30 | |
| 31 | function getHeader() { |
| 32 | return $this->mHeader; |
| 33 | } |
| 34 | |
| 35 | function getHeaderLevel() { |
| 36 | return $this->mHeaderLevel; |
| 37 | } |
| 38 | |
| 39 | function getText() { |
| 40 | return $this->mText; |
| 41 | } |
| 42 | } |