\SEOTestSiteTreeController
Synopsis
class SEOTestSiteTreeController
extends Controller
{
- // members
- private static $alternate_domain = NULL;
- private static string $desktop_user_agent = 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36';
- private static string $mobile_user_agent = 'Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev>';
- private static array $ignore_paths = ;
- private static array $allowed_actions = ;
- // methods
- public void init()
- public String getPageData()
- public string getPage()
- private array extractWords()
- public string urlsAndSettings()
- private array getHTMLFieldsData()
- public resource setupCurl()
- public array|scalar|string getCurlDomain()
- public string getCurlURL()
- public string getPageHeaders()
- public string getPageBody()
- public array loadPage()
- public static ErrorPage getPermissionDeniedPage()
Hierarchy
Extends
- Controller
Members
private
- $allowed_actions
- $alternate_domain
- $desktop_user_agent
-
$ignore_paths
Array of regex that will be used by the crawler. - $mobile_user_agent
Methods
private
- extractWords() — Break down the $html provided and returns all words that have an SEO significance
- getHTMLFieldsData() — Parses the data that we got from curling the crawl version of the page and splits the html fields into an array
public
- getCurlDomain() — Return the domain to use to curl the page
- getCurlURL() — Return a url ready to be curled
- getPage() — Get the page contents of the requested url.
- getPageBody() — Get the body of a curl response
- getPageData() — Curl the passed url.
- getPageHeaders() — Get the page headers from a curl response
- getPermissionDeniedPage() — If ErrorPage exists for Error Code 503 return it else create it and return it
- init()
- loadPage() — Curl the passed $url using the X-Crawl-ID header and parse the data into an array
- setupCurl() — Setup a curl request
- urlsAndSettings() — Returns the first batch of urls the crawler will use and it's settings in json format