Syntro\SEO\Analysis\ContentFocusAnalysis
checks the content for the focus keyword
- Author: Matthias Leutenegger <hello@syntro.ch>
Synopsis
class ContentFocusAnalysis
extends Analysis
{
- // constants
- const CONTENT_FOCUS_NOT_FOUND = 'CONTENT_FOCUS_NOT_FOUND';
- const CONTENT_FOCUS_SUCCESS = 'CONTENT_FOCUS_SUCCESS';
- const CONTENT_FOCUS_UNSET = 'CONTENT_FOCUS_UNSET';
- // Inherited constants from Analysis
- const STATE_GOOD = 1;
- const STATE_NONE = 0;
- const STATE_WARN = 1;
- const STATE_BAD = 2;
- const STATE_CAUTION = 3;
- const STATE_INVALID = 4;
- const STATE_COLOR_MAP = ;
- const STATE_ICON_MAP = ;
- // Inherited members from Analysis
- protected $link;
- protected $keyword;
- protected $result;
- protected $hidden;
- // methods
- public boolean isHidden()
- public array getOptions()
- public int findOccurrences()
- public int|string getResult()
- // Inherited methods from Analysis
- public void __construct()
- public Dom getDom()
- public Dom getStrippedDom()
- public string getPageContent()
- public string getFocus()
- public string rememberedResult()
- public bool getRememberedHidden()
- public string getIcon()
- public array getOption()
- public int|string getState()
- public string getHint()
- public string forTemplate()
- public abstract boolean isHidden()
- public abstract array getOptions()
- public abstract int|string getResult()
Hierarchy
Extends
Constants
Name | Value |
---|---|
CONTENT_FOCUS_NOT_FOUND | 'CONTENT_FOCUS_NOT_FOUND' |
CONTENT_FOCUS_SUCCESS | 'CONTENT_FOCUS_SUCCESS' |
CONTENT_FOCUS_UNSET | 'CONTENT_FOCUS_UNSET' |
STATE_GOOD | 1 |
STATE_NONE | 0 |
STATE_WARN | 1 |
STATE_BAD | 2 |
STATE_CAUTION | 3 |
STATE_INVALID | 4 |
STATE_COLOR_MAP | |
STATE_ICON_MAP |
Members
protected
- $keyword
- $link
- $result
Methods
public
- findOccurrences() — findOccurrences
- getOptions() — getOptions - returns an array containing possible outcomes of this analysis
- getResult() — getResult - returns the result of this analysis. The result must correspond to a key in the getOptions() array.
- isHidden() — isHidden - if true, this analysis should be hidden
Inherited from Syntro\SEO\Analysis\Analysis
public
- forTemplate() — forTemplate - returns a string to render to a template
- getDom() — getDom - get the dom of the page to be analyzed
- getFocus() — getFocus - return the focus this analysis should consider
- getHint() — getHint - returns the hint text for this analysis
- getIcon() — getIcon - returns the icon to display
- getOption() — getOption - returns the option this test has found to apply
- getOptions() — getOptions - returns an array containing possible outcomes of this analysis
- getPageContent() — getPageContent - returns the content as a string
- getRememberedHidden() — getRememberedHidden - returns the cached hidden value
- getResult() — getResult - returns the result of this analysis. The result must correspond to a key in the getOptions() array.
- getState() — getState - returns the state of this analysis
- getStrippedDom() — getStrippedDom - returns the dom stripped of footer, header and nav components
- isHidden() — isHidden - if true, this analysis should be hidden
- rememberedResult() — rememberedResult - returns the cached result