FUEL CMS User Guide : Version 1.4.4


Fuel Page Analysis Class

This class extends the Fuel_advanced_module class.

Properties Reference

Property Default Value Description
public
url none The URL to analyze
protected
_xpath N/A

Function Reference [+]

$this->fuel->page_analysis->initialize([$params=array()])

Initialize the page analysis object. Accepts an associative array as input, containing backup preferences. Also will set the values in the config as properties of this object.

Returns

void

Parameters

(array) $params config preferences

$this->fuel->page_analysis->set_page('$url')

Sets the page to analyze.

Returns

void

Parameters

(string) $url The URL of the page to analyze

$this->fuel->page_analysis->find('$tag', ['$multiple'=TRUE])

Finds HTML content to analyze.

Returns

mixed Will return a string if $multiple is set to FALSE and an array if $multiple is set to TRUE

Parameters

(string) $tag The HTML tag to search for
(boolean) $multiple Determines if multiple tags should be found or if it should stop after finding one. Default is TRUE (optional)

$this->fuel->page_analysis->title()

Returns the title of the page.

Returns

string

$this->fuel->page_analysis->meta_description()

Returns the meta description of the page.

Returns

string

$this->fuel->page_analysis->meta_keywords()

Returns the meta keywords of the page.

Returns

string

$this->fuel->page_analysis->heading(['$h'='1'])

Returns the main heading of the page.

Returns

string

Parameters

(string) $h Heading size. Deafult is 1 for an h1 tag

$this->fuel->page_analysis->top_keywords(['$limit'=20])

Returns the top keywords found on the page.

Returns

string

Parameters

(int) $limit Number of top keywords to return. Default is 20 (optional)

$this->fuel->page_analysis->first_paragraph_words(['$limit'=100])

Returns the contents of the first paragraphs of the page.

Returns

string

Parameters

(int) $limit Number of words to display. Default is 100 (optional)

$this->fuel->page_analysis->image_alt()

Returns the pages image alt attributes.

Returns

array

Returns the pages outbound links.

Returns

array

$this->fuel->page_analysis->report('$url')

Returns an array of the reporting results.

Returns

string

Parameters

(string) $url The page URL to analyze