Piwik\Measurable\
Provides access to individual measurables.
The class defines the following methods:
__construct()
ash; Constructor. Inherited from Site
setSites()
ash; Sets the cached site data with an array that associates site IDs with individual site data. Inherited from Site
__toString()
ash; Returns a string representation of the site this instance references. Inherited from Site
getName()
ash; Returns the name of the site. Inherited from Site
getMainUrl()
ash; Returns the main url of the site. Inherited from Site
getId()
ash; Returns the id of the site. Inherited from Site
getType()
ash; Returns the website type (by default "website"
, which means it is a single website). Inherited from Site
getCreationDate()
ash; Returns the creation date of the site. Inherited from Site
getTimezone()
ash; Returns the timezone of the size. Inherited from Site
getCurrency()
ash; Returns the currency of the site. Inherited from Site
getExcludedIps()
ash; Returns the excluded ips of the site. Inherited from Site
getExcludedQueryParameters()
ash; Returns the excluded query parameters of the site. Inherited from Site
isEcommerceEnabled()
ash; Returns whether ecommerce is enabled for the site. Inherited from Site
getSearchKeywordParameters()
ash; Returns the site search keyword query parameters for the site. Inherited from Site
getSearchCategoryParameters()
ash; Returns the site search category query parameters for the site. Inherited from Site
isSiteSearchEnabled()
ash; Returns whether Site Search Tracking is enabled for the site. Inherited from Site
getCreatorLogin()
ash; Returns the user that created this site. Inherited from Site
getIdSitesFromIdSitesString()
ash; Checks the given string for valid site IDs and returns them as an array. Inherited from Site
clearCache()
ash; Clears the site data cache. Inherited from Site
clearCacheForSite()
ash; Clears the site data cache. Inherited from Site
getNameFor()
ash; Returns the name of the site with the specified ID. Inherited from Site
getGroupFor()
ash; Returns the group of the site with the specified ID. Inherited from Site
getTimezoneFor()
ash; Returns the timezone of the site with the specified ID. Inherited from Site
getTypeFor()
ash; Returns the type of the site with the specified ID. Inherited from Site
getCreationDateFor()
ash; Returns the creation date of the site with the specified ID. Inherited from Site
getMainUrlFor()
ash; Returns the url for the site with the specified ID. Inherited from Site
isEcommerceEnabledFor()
ash; Returns whether the site with the specified ID is ecommerce enabled or not. Inherited from Site
isSiteSearchEnabledFor()
ash; Returns whether the site with the specified ID is Site Search enabled. Inherited from Site
getCurrencyFor()
ash; Returns the currency of the site with the specified ID. Inherited from Site
getCurrencySymbolFor()
ash; Returns the currency of the site with the specified ID. Inherited from Site
getCurrencyList()
ash; Returns the list of all known currency symbols. Inherited from Site
getExcludedIpsFor()
ash; Returns the excluded IP addresses of the site with the specified ID. Inherited from Site
getExcludedQueryParametersFor()
ash; Returns the excluded query parameters for the site with the specified ID. Inherited from Site
getCreatorLoginFor()
ash; Returns the user that created this site. Inherited from Site
__construct()
Constructor.
$idsite
(int
) —
The ID of the site we want data for.Piwik\Exception\UnexpectedWebsiteFoundException
setSites()
Sets the cached site data with an array that associates site IDs with individual site data.
$sites
(array
) —
The array of sites data. Indexed by site ID. eg, array('1' => array('name' => 'Site 1', ...), '2' => array('name' => 'Site 2', ...))`__toString()
Returns a string representation of the site this instance references.
Useful for debugging.
string
value.getName()
Returns the name of the site.
string
value.Exception
— if data for the site cannot be found.getMainUrl()
Returns the main url of the site.
string
value.Exception
— if data for the site cannot be found.getId()
Returns the id of the site.
int
value.Exception
— if data for the site cannot be found.getType()
Returns the website type (by default "website"
, which means it is a single website).
string
value.getCreationDate()
Returns the creation date of the site.
Date
value.Exception
— if data for the site cannot be found.getTimezone()
Returns the timezone of the size.
string
value.Exception
— if data for the site cannot be found.getCurrency()
Returns the currency of the site.
string
value.Exception
— if data for the site cannot be found.getExcludedIps()
Returns the excluded ips of the site.
string
value.Exception
— if data for the site cannot be found.getExcludedQueryParameters()
Returns the excluded query parameters of the site.
string
value.Exception
— if data for the site cannot be found.isEcommerceEnabled()
Returns whether ecommerce is enabled for the site.
bool
value.Exception
— if data for the site cannot be found.getSearchKeywordParameters()
Returns the site search keyword query parameters for the site.
string
value.Exception
— if data for the site cannot be found.getSearchCategoryParameters()
Returns the site search category query parameters for the site.
string
value.Exception
— if data for the site cannot be found.isSiteSearchEnabled()
Returns whether Site Search Tracking is enabled for the site.
bool
value.Exception
— if data for the site cannot be found.getCreatorLogin()
Returns the user that created this site.
string
|null
—
If null, the site was created before the creation user was tracked.getIdSitesFromIdSitesString()
Checks the given string for valid site IDs and returns them as an array.
It accepts the following parameter(s):
$ids
(string
|array
) —
Comma separated idSite list, eg, '1,2,3,4'
or an array of IDs, eg, array(1, 2, 3, 4)
.$_restrictSitesToLogin
(bool
|string
) —
Implementation detail. Used only when running as a scheduled task.Returns: array
—
An array of valid, unique integers.
clearCache()
Clears the site data cache.
See also setSites() and setSitesFromArray().
clearCacheForSite()
Clears the site data cache.
See also setSites() and setSitesFromArray().
It accepts the following parameter(s):
$idSite
It does not return anything or a mixed result.
getNameFor()
Returns the name of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getGroupFor()
Returns the group of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getTimezoneFor()
Returns the timezone of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getTypeFor()
Returns the type of the site with the specified ID.
It accepts the following parameter(s):
$idsite
It returns a string
value.
getCreationDateFor()
Returns the creation date of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getMainUrlFor()
Returns the url for the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.isEcommerceEnabledFor()
Returns whether the site with the specified ID is ecommerce enabled or not.
$idsite
(int
) —
The site ID.string
value.isSiteSearchEnabledFor()
Returns whether the site with the specified ID is Site Search enabled.
$idsite
(int
) —
The site ID.string
value.getCurrencyFor()
Returns the currency of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getCurrencySymbolFor()
Returns the currency of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getCurrencyList()
Returns the list of all known currency symbols.
\Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()
array
—
An array mapping currency codes to their respective currency symbols
and a description, eg, array('USD' => array('$', 'US dollar'))
.getExcludedIpsFor()
Returns the excluded IP addresses of the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getExcludedQueryParametersFor()
Returns the excluded query parameters for the site with the specified ID.
$idsite
(int
) —
The site ID.string
value.getCreatorLoginFor()
Returns the user that created this site.
It accepts the following parameter(s):
$idsite
(int
) —
The site ID.Returns: string
|null
—
If null, the site was created before the creation user was tracked.