public function getPage(string $name): Page
    {
        if ($this->page_object_factory === null) {
            throw new RuntimeException('[W406] To create pages you need to pass a factory with setPageObjectFactory()');
        }

        return $this->page_object_factory->createPage($name);
    }
public function getPage(string $name): Page
    {
        if ($this->page_object_factory === null) {
            throw new RuntimeException('[W406] To create pages you need to pass a factory with setPageObjectFactory()');
        }

        return $this->page_object_factory->createPage($name);
    }
public function getPage ( string $ name ) : Page { if ( $ this -> page_object_factory === null ) { throw new RuntimeException ( '[W406] To create pages you need to pass a factory with setPageObjectFactory()' ) ; } return $ this -> page_object_factory -> createPage ( $ name ) ; }
Creates a page object from its name.

@param string $name The name of the page object e.g 'Admin page'.

@throws \RuntimeException

@return Page
Creates a page object from its name .