for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SubPageList\Lister;
use Title;
/**
* Represents a node in a sub page hierarchy.
*
* @since 1.2
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
class Page {
* @var Title
private $title;
* @var Page[]
private $subPages = [];
* @param Title $title
* @param Page[] $subPages
public function __construct( Title $title, array $subPages = [] ) {
$this->title = $title;
foreach ( $subPages as $subPage ) {
$this->addSubPage( $subPage );
}
* @return Title
public function getTitle() {
return $this->title;
* @return Page[]
public function getSubPages() {
return $this->subPages;
* @since 0.1
* @param Page $page
public function addSubPage( Page $page ) {
$this->subPages[] = $page;