Syntro\SEO\Dom
Helper class used to retrieve the DOM of a page from its link and remembering the value
- Author: Matthias Leutenegger <hello@syntro.ch>
Synopsis
class Dom
{
- // members
- protected static array $loadedDoms = ;
- protected static array $loadedStrippedDoms = ;
- // methods
- public void __construct()
- public static Dom getDom()
- public static Dom getStrippedDom()
- public static string getTextualRepresentation()
- private static string loadContent()
Members
protected
- $loadedDoms
- $loadedStrippedDoms
Methods
private
- loadContent() — loadContent - loads the content via a mock request (from the draft stage if versioning is enabled).
public
- __construct() — __construct - Barebone constructor
- getDom() — getDom - returns the dom for the given URL
- getStrippedDom() — getStrippedDom - returns a dom instance which has been stripped from header, nav and footer
- getTextualRepresentation() — getTextualRepresentation - returns the content of the page as a single string, retaining spaces between tags