Syntro\SEO\Analysis\Analysis
allows the analysis of a link in response to a keyword
- Author: Matthias Leutenegger <hello@syntro.ch>
Synopsis
class Analysis
extends ViewableData
{
- // constants
- 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 = ;
- // members
- protected $link;
- protected $keyword;
- protected $result = NULL;
- protected $hidden = NULL;
- private static array $casting = ;
- // methods
- 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
- SilverStripe\View\ViewableData
Constants
Name | Value |
---|---|
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
private
- $casting
—
array
Ensures that the methods are wrapped in the correct type and values are safely escaped while rendering in the template.
protected
- $keyword
- $link
- $result
Methods
public
- __construct() — __construct - creates an analysis
- 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