id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
209,100 | matomo-org/matomo | plugins/CoreAdminHome/Model/DuplicateActionRemover.php | DuplicateActionRemover.getSitesAndDatesOfRowsUsingDuplicates | public function getSitesAndDatesOfRowsUsingDuplicates($table, $duplicateIdActions)
{
$idactionColumns = $this->getIdActionTableColumnsFromMetadata();
$idactionColumns = array_values($idactionColumns[$table]);
$table = Common::prefixTable($table);
$sql = "SELECT idsite, DATE(server_t... | php | public function getSitesAndDatesOfRowsUsingDuplicates($table, $duplicateIdActions)
{
$idactionColumns = $this->getIdActionTableColumnsFromMetadata();
$idactionColumns = array_values($idactionColumns[$table]);
$table = Common::prefixTable($table);
$sql = "SELECT idsite, DATE(server_t... | [
"public",
"function",
"getSitesAndDatesOfRowsUsingDuplicates",
"(",
"$",
"table",
",",
"$",
"duplicateIdActions",
")",
"{",
"$",
"idactionColumns",
"=",
"$",
"this",
"->",
"getIdActionTableColumnsFromMetadata",
"(",
")",
";",
"$",
"idactionColumns",
"=",
"array_values... | Returns the server time and idsite of rows in a log table that reference at least one action
in a set.
@param string $table
@param int[] $duplicateIdActions
@return array with two elements **idsite** and **server_time**. idsite is the site ID and server_time
is the date of the log. | [
"Returns",
"the",
"server",
"time",
"and",
"idsite",
"of",
"rows",
"in",
"a",
"log",
"table",
"that",
"reference",
"at",
"least",
"one",
"action",
"in",
"a",
"set",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/Model/DuplicateActionRemover.php#L142-L151 |
209,101 | matomo-org/matomo | core/DataAccess/Actions.php | Actions.delete | public function delete($idActions)
{
foreach ($idActions as &$id) {
$id = (int)$id;
}
$table = Common::prefixTable('log_action');
$sql = "DELETE FROM $table WHERE idaction IN (" . implode(",", $idActions) . ")";
Db::query($sql);
} | php | public function delete($idActions)
{
foreach ($idActions as &$id) {
$id = (int)$id;
}
$table = Common::prefixTable('log_action');
$sql = "DELETE FROM $table WHERE idaction IN (" . implode(",", $idActions) . ")";
Db::query($sql);
} | [
"public",
"function",
"delete",
"(",
"$",
"idActions",
")",
"{",
"foreach",
"(",
"$",
"idActions",
"as",
"&",
"$",
"id",
")",
"{",
"$",
"id",
"=",
"(",
"int",
")",
"$",
"id",
";",
"}",
"$",
"table",
"=",
"Common",
"::",
"prefixTable",
"(",
"'log_... | Removes a list of actions from the log_action table by ID.
@param int[] $idActions | [
"Removes",
"a",
"list",
"of",
"actions",
"from",
"the",
"log_action",
"table",
"by",
"ID",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/Actions.php#L23-L33 |
209,102 | matomo-org/matomo | core/Tracker/Db/Pdo/Mysql.php | Mysql.fetch | public function fetch($query, $parameters = array())
{
try {
$sth = $this->query($query, $parameters);
if ($sth === false) {
return false;
}
return $sth->fetch(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
throw new DbExcep... | php | public function fetch($query, $parameters = array())
{
try {
$sth = $this->query($query, $parameters);
if ($sth === false) {
return false;
}
return $sth->fetch(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
throw new DbExcep... | [
"public",
"function",
"fetch",
"(",
"$",
"query",
",",
"$",
"parameters",
"=",
"array",
"(",
")",
")",
"{",
"try",
"{",
"$",
"sth",
"=",
"$",
"this",
"->",
"query",
"(",
"$",
"query",
",",
"$",
"parameters",
")",
";",
"if",
"(",
"$",
"sth",
"==... | Returns the first row of a query result, using optional bound parameters.
@param string $query Query
@param array $parameters Parameters to bind
@return bool|mixed
@see query()
@throws Exception|DbException if an exception occurred | [
"Returns",
"the",
"first",
"row",
"of",
"a",
"query",
"result",
"using",
"optional",
"bound",
"parameters",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Db/Pdo/Mysql.php#L195-L206 |
209,103 | matomo-org/matomo | core/Plugin/SettingsProvider.php | SettingsProvider.getAllSystemSettings | public function getAllSystemSettings()
{
$cacheId = CacheId::languageAware('AllSystemSettings');
$cache = PiwikCache::getTransientCache();
if (!$cache->contains($cacheId)) {
$pluginNames = $this->pluginManager->getActivatedPlugins();
$byPluginName = array();
... | php | public function getAllSystemSettings()
{
$cacheId = CacheId::languageAware('AllSystemSettings');
$cache = PiwikCache::getTransientCache();
if (!$cache->contains($cacheId)) {
$pluginNames = $this->pluginManager->getActivatedPlugins();
$byPluginName = array();
... | [
"public",
"function",
"getAllSystemSettings",
"(",
")",
"{",
"$",
"cacheId",
"=",
"CacheId",
"::",
"languageAware",
"(",
"'AllSystemSettings'",
")",
";",
"$",
"cache",
"=",
"PiwikCache",
"::",
"getTransientCache",
"(",
")",
";",
"if",
"(",
"!",
"$",
"cache",... | Returns all available system settings. A plugin has to specify a file named `SystemSettings.php` containing a
class named `SystemSettings` that extends `Piwik\Settings\Plugin\SystemSettings` in order to be considered as
a system setting. Otherwise the settings for a plugin won't be available.
@return SystemSettings[] ... | [
"Returns",
"all",
"available",
"system",
"settings",
".",
"A",
"plugin",
"has",
"to",
"specify",
"a",
"file",
"named",
"SystemSettings",
".",
"php",
"containing",
"a",
"class",
"named",
"SystemSettings",
"that",
"extends",
"Piwik",
"\\",
"Settings",
"\\",
"Plu... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/SettingsProvider.php#L84-L105 |
209,104 | matomo-org/matomo | libs/HTML/QuickForm2/JavascriptBuilder.php | HTML_QuickForm2_JavascriptBuilder.startForm | public function startForm(HTML_QuickForm2 $form)
{
$this->formId = $form->getId();
$this->rules[$this->formId] = array();
} | php | public function startForm(HTML_QuickForm2 $form)
{
$this->formId = $form->getId();
$this->rules[$this->formId] = array();
} | [
"public",
"function",
"startForm",
"(",
"HTML_QuickForm2",
"$",
"form",
")",
"{",
"$",
"this",
"->",
"formId",
"=",
"$",
"form",
"->",
"getId",
"(",
")",
";",
"$",
"this",
"->",
"rules",
"[",
"$",
"this",
"->",
"formId",
"]",
"=",
"array",
"(",
")"... | Sets the form currently being processed
@param HTML_QuickForm2 | [
"Sets",
"the",
"form",
"currently",
"being",
"processed"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/JavascriptBuilder.php#L80-L84 |
209,105 | matomo-org/matomo | core/Filechecks.php | Filechecks.canAutoUpdate | public static function canAutoUpdate()
{
if (!is_writable(PIWIK_INCLUDE_PATH . '/') ||
!is_writable(PIWIK_DOCUMENT_ROOT . '/index.php') ||
!is_writable(PIWIK_INCLUDE_PATH . '/core') ||
!is_writable(PIWIK_USER_PATH . '/config/global.ini.php')
) {
return... | php | public static function canAutoUpdate()
{
if (!is_writable(PIWIK_INCLUDE_PATH . '/') ||
!is_writable(PIWIK_DOCUMENT_ROOT . '/index.php') ||
!is_writable(PIWIK_INCLUDE_PATH . '/core') ||
!is_writable(PIWIK_USER_PATH . '/config/global.ini.php')
) {
return... | [
"public",
"static",
"function",
"canAutoUpdate",
"(",
")",
"{",
"if",
"(",
"!",
"is_writable",
"(",
"PIWIK_INCLUDE_PATH",
".",
"'/'",
")",
"||",
"!",
"is_writable",
"(",
"PIWIK_DOCUMENT_ROOT",
".",
"'/index.php'",
")",
"||",
"!",
"is_writable",
"(",
"PIWIK_INC... | Check if this installation can be auto-updated.
For performance, we look for clues rather than an exhaustive test.
@return bool | [
"Check",
"if",
"this",
"installation",
"can",
"be",
"auto",
"-",
"updated",
".",
"For",
"performance",
"we",
"look",
"for",
"clues",
"rather",
"than",
"an",
"exhaustive",
"test",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L21-L31 |
209,106 | matomo-org/matomo | core/Filechecks.php | Filechecks.checkDirectoriesWritable | public static function checkDirectoriesWritable($directoriesToCheck)
{
$resultCheck = array();
foreach ($directoriesToCheck as $directoryToCheck) {
if (!preg_match('/^' . preg_quote(PIWIK_USER_PATH, '/') . '/', $directoryToCheck)) {
$directoryToCheck = PIWIK_USER_PATH . $... | php | public static function checkDirectoriesWritable($directoriesToCheck)
{
$resultCheck = array();
foreach ($directoriesToCheck as $directoryToCheck) {
if (!preg_match('/^' . preg_quote(PIWIK_USER_PATH, '/') . '/', $directoryToCheck)) {
$directoryToCheck = PIWIK_USER_PATH . $... | [
"public",
"static",
"function",
"checkDirectoriesWritable",
"(",
"$",
"directoriesToCheck",
")",
"{",
"$",
"resultCheck",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"directoriesToCheck",
"as",
"$",
"directoryToCheck",
")",
"{",
"if",
"(",
"!",
"preg_mat... | Checks if directories are writable and create them if they do not exist.
@param array $directoriesToCheck array of directories to check - if not given default Piwik directories that needs write permission are checked
@return array directory name => true|false (is writable) | [
"Checks",
"if",
"directories",
"are",
"writable",
"and",
"create",
"them",
"if",
"they",
"do",
"not",
"exist",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L39-L55 |
209,107 | matomo-org/matomo | core/Filechecks.php | Filechecks.dieIfDirectoriesNotWritable | public static function dieIfDirectoriesNotWritable($directoriesToCheck = null)
{
$resultCheck = self::checkDirectoriesWritable($directoriesToCheck);
if (array_search(false, $resultCheck) === false) {
return;
}
$directoryList = '';
foreach ($resultCheck as $dir =>... | php | public static function dieIfDirectoriesNotWritable($directoriesToCheck = null)
{
$resultCheck = self::checkDirectoriesWritable($directoriesToCheck);
if (array_search(false, $resultCheck) === false) {
return;
}
$directoryList = '';
foreach ($resultCheck as $dir =>... | [
"public",
"static",
"function",
"dieIfDirectoriesNotWritable",
"(",
"$",
"directoriesToCheck",
"=",
"null",
")",
"{",
"$",
"resultCheck",
"=",
"self",
"::",
"checkDirectoriesWritable",
"(",
"$",
"directoriesToCheck",
")",
";",
"if",
"(",
"array_search",
"(",
"fals... | Checks that the directories Piwik needs write access are actually writable
Displays a nice error page if permissions are missing on some directories
@param array $directoriesToCheck Array of directory names to check | [
"Checks",
"that",
"the",
"directories",
"Piwik",
"needs",
"write",
"access",
"are",
"actually",
"writable",
"Displays",
"a",
"nice",
"error",
"page",
"if",
"permissions",
"are",
"missing",
"on",
"some",
"directories"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L63-L103 |
209,108 | matomo-org/matomo | core/Filechecks.php | Filechecks.getAutoUpdateMakeWritableMessage | public static function getAutoUpdateMakeWritableMessage()
{
$realpath = Filesystem::realpath(PIWIK_INCLUDE_PATH . '/');
$message = '';
$message .= "<code>" . self::getCommandToChangeOwnerOfPiwikFiles() . "</code><br />";
$message .= "<code>chmod -R 0755 " . $realpath . "</code><br />... | php | public static function getAutoUpdateMakeWritableMessage()
{
$realpath = Filesystem::realpath(PIWIK_INCLUDE_PATH . '/');
$message = '';
$message .= "<code>" . self::getCommandToChangeOwnerOfPiwikFiles() . "</code><br />";
$message .= "<code>chmod -R 0755 " . $realpath . "</code><br />... | [
"public",
"static",
"function",
"getAutoUpdateMakeWritableMessage",
"(",
")",
"{",
"$",
"realpath",
"=",
"Filesystem",
"::",
"realpath",
"(",
"PIWIK_INCLUDE_PATH",
".",
"'/'",
")",
";",
"$",
"message",
"=",
"''",
";",
"$",
"message",
".=",
"\"<code>\"",
".",
... | Returns the help message when the auto update can't run because of missing permissions
@return string | [
"Returns",
"the",
"help",
"message",
"when",
"the",
"auto",
"update",
"can",
"t",
"run",
"because",
"of",
"missing",
"permissions"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L110-L118 |
209,109 | matomo-org/matomo | core/Filechecks.php | Filechecks.getErrorMessageMissingPermissions | public static function getErrorMessageMissingPermissions($path)
{
$message = "Please check that the web server has enough permission to write to these files/directories:<br />";
if (SettingsServer::isWindows()) {
$message .= "On Windows, check that the folder is not read only and is wri... | php | public static function getErrorMessageMissingPermissions($path)
{
$message = "Please check that the web server has enough permission to write to these files/directories:<br />";
if (SettingsServer::isWindows()) {
$message .= "On Windows, check that the folder is not read only and is wri... | [
"public",
"static",
"function",
"getErrorMessageMissingPermissions",
"(",
"$",
"path",
")",
"{",
"$",
"message",
"=",
"\"Please check that the web server has enough permission to write to these files/directories:<br />\"",
";",
"if",
"(",
"SettingsServer",
"::",
"isWindows",
"(... | Returns friendly error message explaining how to fix permissions
@param string $path to the directory missing permissions
@return string Error message | [
"Returns",
"friendly",
"error",
"message",
"explaining",
"how",
"to",
"fix",
"permissions"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L126-L143 |
209,110 | matomo-org/matomo | core/Filechecks.php | Filechecks.getMakeWritableCommand | private static function getMakeWritableCommand($realpath)
{
$realpath = Common::sanitizeInputValue($realpath);
if (SettingsServer::isWindows()) {
return "<code>cacls $realpath /t /g " . Common::sanitizeInputValue(self::getUser()) . ":f</code><br />\n";
}
return "<code>chm... | php | private static function getMakeWritableCommand($realpath)
{
$realpath = Common::sanitizeInputValue($realpath);
if (SettingsServer::isWindows()) {
return "<code>cacls $realpath /t /g " . Common::sanitizeInputValue(self::getUser()) . ":f</code><br />\n";
}
return "<code>chm... | [
"private",
"static",
"function",
"getMakeWritableCommand",
"(",
"$",
"realpath",
")",
"{",
"$",
"realpath",
"=",
"Common",
"::",
"sanitizeInputValue",
"(",
"$",
"realpath",
")",
";",
"if",
"(",
"SettingsServer",
"::",
"isWindows",
"(",
")",
")",
"{",
"return... | Returns the help text displayed to suggest which command to run to give writable access to a file or directory
@param string $realpath
@return string | [
"Returns",
"the",
"help",
"text",
"displayed",
"to",
"suggest",
"which",
"command",
"to",
"run",
"to",
"give",
"writable",
"access",
"to",
"a",
"file",
"or",
"directory"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filechecks.php#L180-L187 |
209,111 | matomo-org/matomo | libs/HTML/QuickForm2/Factory.php | HTML_QuickForm2_Factory.registerElement | public static function registerElement($type, $className, $includeFile = null)
{
self::$elementTypes[strtolower($type)] = array($className, $includeFile);
} | php | public static function registerElement($type, $className, $includeFile = null)
{
self::$elementTypes[strtolower($type)] = array($className, $includeFile);
} | [
"public",
"static",
"function",
"registerElement",
"(",
"$",
"type",
",",
"$",
"className",
",",
"$",
"includeFile",
"=",
"null",
")",
"{",
"self",
"::",
"$",
"elementTypes",
"[",
"strtolower",
"(",
"$",
"type",
")",
"]",
"=",
"array",
"(",
"$",
"class... | Registers a new element type
@param string Type name (treated case-insensitively)
@param string Class name
@param string File containing the class, leave empty if class already loaded | [
"Registers",
"a",
"new",
"element",
"type"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Factory.php#L131-L134 |
209,112 | matomo-org/matomo | libs/HTML/QuickForm2/Factory.php | HTML_QuickForm2_Factory.createElement | public static function createElement($type, $name = null, $attributes = null,
array $data = array())
{
$type = strtolower($type);
if (!isset(self::$elementTypes[$type])) {
throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is... | php | public static function createElement($type, $name = null, $attributes = null,
array $data = array())
{
$type = strtolower($type);
if (!isset(self::$elementTypes[$type])) {
throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is... | [
"public",
"static",
"function",
"createElement",
"(",
"$",
"type",
",",
"$",
"name",
"=",
"null",
",",
"$",
"attributes",
"=",
"null",
",",
"array",
"$",
"data",
"=",
"array",
"(",
")",
")",
"{",
"$",
"type",
"=",
"strtolower",
"(",
"$",
"type",
")... | Creates a new element object of the given type
@param string Type name (treated case-insensitively)
@param mixed Element name (passed to element's constructor)
@param mixed Element attributes (passed to element's constructor)
@param array Element-specific data (passed to element's constructor)
@retu... | [
"Creates",
"a",
"new",
"element",
"object",
"of",
"the",
"given",
"type"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Factory.php#L161-L173 |
209,113 | matomo-org/matomo | libs/HTML/QuickForm2/Factory.php | HTML_QuickForm2_Factory.registerRule | public static function registerRule($type, $className, $includeFile = null,
$config = null)
{
self::$registeredRules[strtolower($type)] = array($className, $includeFile, $config);
} | php | public static function registerRule($type, $className, $includeFile = null,
$config = null)
{
self::$registeredRules[strtolower($type)] = array($className, $includeFile, $config);
} | [
"public",
"static",
"function",
"registerRule",
"(",
"$",
"type",
",",
"$",
"className",
",",
"$",
"includeFile",
"=",
"null",
",",
"$",
"config",
"=",
"null",
")",
"{",
"self",
"::",
"$",
"registeredRules",
"[",
"strtolower",
"(",
"$",
"type",
")",
"]... | Registers a new rule type
@param string Rule type name (treated case-insensitively)
@param string Class name
@param string File containing the class, leave empty if class already loaded
@param mixed Configuration data for rules of the given type | [
"Registers",
"a",
"new",
"rule",
"type"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Factory.php#L184-L188 |
209,114 | matomo-org/matomo | libs/HTML/QuickForm2/Factory.php | HTML_QuickForm2_Factory.createRule | public static function createRule($type, HTML_QuickForm2_Node $owner,
$message = '', $config = null)
{
$type = strtolower($type);
if (!isset(self::$registeredRules[$type])) {
throw new HTML_QuickForm2_InvalidArgumentException("Rule '$type' is not kno... | php | public static function createRule($type, HTML_QuickForm2_Node $owner,
$message = '', $config = null)
{
$type = strtolower($type);
if (!isset(self::$registeredRules[$type])) {
throw new HTML_QuickForm2_InvalidArgumentException("Rule '$type' is not kno... | [
"public",
"static",
"function",
"createRule",
"(",
"$",
"type",
",",
"HTML_QuickForm2_Node",
"$",
"owner",
",",
"$",
"message",
"=",
"''",
",",
"$",
"config",
"=",
"null",
")",
"{",
"$",
"type",
"=",
"strtolower",
"(",
"$",
"type",
")",
";",
"if",
"(... | Creates a new Rule of the given type
@param string Rule type name (treated case-insensitively)
@param HTML_QuickForm2_Node Element to validate by the rule
@param string Message to display if validation fails
@param mixed Configuration data for the rule... | [
"Creates",
"a",
"new",
"Rule",
"of",
"the",
"given",
"type"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Factory.php#L215-L231 |
209,115 | matomo-org/matomo | libs/Zend/Db/Table/Select.php | Zend_Db_Table_Select.setTable | public function setTable(Zend_Db_Table_Abstract $table)
{
$this->_adapter = $table->getAdapter();
$this->_info = $table->info();
$this->_table = $table;
return $this;
} | php | public function setTable(Zend_Db_Table_Abstract $table)
{
$this->_adapter = $table->getAdapter();
$this->_info = $table->info();
$this->_table = $table;
return $this;
} | [
"public",
"function",
"setTable",
"(",
"Zend_Db_Table_Abstract",
"$",
"table",
")",
"{",
"$",
"this",
"->",
"_adapter",
"=",
"$",
"table",
"->",
"getAdapter",
"(",
")",
";",
"$",
"this",
"->",
"_info",
"=",
"$",
"table",
"->",
"info",
"(",
")",
";",
... | Sets the primary table name and retrieves the table schema.
@param Zend_Db_Table_Abstract $adapter
@return Zend_Db_Select This Zend_Db_Select object. | [
"Sets",
"the",
"primary",
"table",
"name",
"and",
"retrieves",
"the",
"table",
"schema",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Select.php#L97-L104 |
209,116 | matomo-org/matomo | libs/Zend/Db/Table/Select.php | Zend_Db_Table_Select.isReadOnly | public function isReadOnly()
{
$readOnly = false;
$fields = $this->getPart(Zend_Db_Table_Select::COLUMNS);
$cols = $this->_info[Zend_Db_Table_Abstract::COLS];
if (!count($fields)) {
return $readOnly;
}
foreach ($fields as $columnEntry) {
... | php | public function isReadOnly()
{
$readOnly = false;
$fields = $this->getPart(Zend_Db_Table_Select::COLUMNS);
$cols = $this->_info[Zend_Db_Table_Abstract::COLS];
if (!count($fields)) {
return $readOnly;
}
foreach ($fields as $columnEntry) {
... | [
"public",
"function",
"isReadOnly",
"(",
")",
"{",
"$",
"readOnly",
"=",
"false",
";",
"$",
"fields",
"=",
"$",
"this",
"->",
"getPart",
"(",
"Zend_Db_Table_Select",
"::",
"COLUMNS",
")",
";",
"$",
"cols",
"=",
"$",
"this",
"->",
"_info",
"[",
"Zend_Db... | Tests query to determine if expressions or aliases columns exist.
@return boolean | [
"Tests",
"query",
"to",
"determine",
"if",
"expressions",
"or",
"aliases",
"columns",
"exist",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Select.php#L126-L156 |
209,117 | matomo-org/matomo | libs/Zend/Db/Table/Select.php | Zend_Db_Table_Select.assemble | public function assemble()
{
$fields = $this->getPart(Zend_Db_Table_Select::COLUMNS);
$primary = $this->_info[Zend_Db_Table_Abstract::NAME];
$schema = $this->_info[Zend_Db_Table_Abstract::SCHEMA];
if (count($this->_parts[self::UNION]) == 0) {
// If no fields are spec... | php | public function assemble()
{
$fields = $this->getPart(Zend_Db_Table_Select::COLUMNS);
$primary = $this->_info[Zend_Db_Table_Abstract::NAME];
$schema = $this->_info[Zend_Db_Table_Abstract::SCHEMA];
if (count($this->_parts[self::UNION]) == 0) {
// If no fields are spec... | [
"public",
"function",
"assemble",
"(",
")",
"{",
"$",
"fields",
"=",
"$",
"this",
"->",
"getPart",
"(",
"Zend_Db_Table_Select",
"::",
"COLUMNS",
")",
";",
"$",
"primary",
"=",
"$",
"this",
"->",
"_info",
"[",
"Zend_Db_Table_Abstract",
"::",
"NAME",
"]",
... | Performs a validation on the select query before passing back to the parent class.
Ensures that only columns from the primary Zend_Db_Table are returned in the result.
@return string|null This object as a SELECT string (or null if a string cannot be produced) | [
"Performs",
"a",
"validation",
"on",
"the",
"select",
"query",
"before",
"passing",
"back",
"to",
"the",
"parent",
"class",
".",
"Ensures",
"that",
"only",
"columns",
"from",
"the",
"primary",
"Zend_Db_Table",
"are",
"returned",
"in",
"the",
"result",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Select.php#L190-L223 |
209,118 | matomo-org/matomo | libs/HTML/QuickForm2/Rule/Length.php | HTML_QuickForm2_Rule_Length.mergeMinMaxLength | protected static function mergeMinMaxLength($length, $config)
{
if (array_key_exists('min', $config) || array_key_exists('max', $config)) {
if (!array_key_exists('min', $length) && array_key_exists('min', $config)) {
$length['min'] = $config['min'];
}
if (... | php | protected static function mergeMinMaxLength($length, $config)
{
if (array_key_exists('min', $config) || array_key_exists('max', $config)) {
if (!array_key_exists('min', $length) && array_key_exists('min', $config)) {
$length['min'] = $config['min'];
}
if (... | [
"protected",
"static",
"function",
"mergeMinMaxLength",
"(",
"$",
"length",
",",
"$",
"config",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"'min'",
",",
"$",
"config",
")",
"||",
"array_key_exists",
"(",
"'max'",
",",
"$",
"config",
")",
")",
"{",
"if... | Adds the 'min' and 'max' fields from one array to the other
@param array Rule configuration, array with 'min' and 'max' keys
@param array Additional configuration, fields will be added to
$length if it doesn't contain such a key already
@return array | [
"Adds",
"the",
"min",
"and",
"max",
"fields",
"from",
"one",
"array",
"to",
"the",
"other"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Length.php#L127-L145 |
209,119 | matomo-org/matomo | libs/HTML/QuickForm2/Rule/Length.php | HTML_QuickForm2_Rule_Length.setConfig | public function setConfig($config)
{
if (is_array($config)) {
$config = self::mergeMinMaxLength(array(), $config)
+ array('min' => 0, 'max' => 0);
}
if (is_array($config) && ($config['min'] < 0 || $config['max'] < 0) ||
!is_array($config) && $con... | php | public function setConfig($config)
{
if (is_array($config)) {
$config = self::mergeMinMaxLength(array(), $config)
+ array('min' => 0, 'max' => 0);
}
if (is_array($config) && ($config['min'] < 0 || $config['max'] < 0) ||
!is_array($config) && $con... | [
"public",
"function",
"setConfig",
"(",
"$",
"config",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"config",
")",
")",
"{",
"$",
"config",
"=",
"self",
"::",
"mergeMinMaxLength",
"(",
"array",
"(",
")",
",",
"$",
"config",
")",
"+",
"array",
"(",
"'... | Sets the allowed length limits
$config can be either of the following
- integer (rule checks for exact length)
- array(minlength, maxlength)
- array(['min' => minlength, ]['max' => maxlength])
@param int|array Length limits
@return HTML_QuickForm2_Rule
@throws HTML_QuickForm2_InvalidArgumentException if bogu... | [
"Sets",
"the",
"allowed",
"length",
"limits"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Length.php#L203-L234 |
209,120 | matomo-org/matomo | libs/HTML/QuickForm2/Rule/Regex.php | HTML_QuickForm2_Rule_Regex.getJavascriptCallback | protected function getJavascriptCallback()
{
$regex = $this->getConfig();
if ($pos = strpos($regex, 'u', strrpos($regex, '/'))) {
$regex = substr($regex, 0, $pos) . substr($regex, $pos + 1);
$regex = preg_replace('/(?<!\\\\)(?>\\\\\\\\)*\\\\x{([a-fA-F0-9]+)}/', '\\u$1', $reg... | php | protected function getJavascriptCallback()
{
$regex = $this->getConfig();
if ($pos = strpos($regex, 'u', strrpos($regex, '/'))) {
$regex = substr($regex, 0, $pos) . substr($regex, $pos + 1);
$regex = preg_replace('/(?<!\\\\)(?>\\\\\\\\)*\\\\x{([a-fA-F0-9]+)}/', '\\u$1', $reg... | [
"protected",
"function",
"getJavascriptCallback",
"(",
")",
"{",
"$",
"regex",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
";",
"if",
"(",
"$",
"pos",
"=",
"strpos",
"(",
"$",
"regex",
",",
"'u'",
",",
"strrpos",
"(",
"$",
"regex",
",",
"'/'",
"... | Returns the client-side validation callback
For this to work properly, slashes have to be used as regex delimiters.
The method takes care of transforming PHP unicode escapes in regexps to
JS unicode escapes if using 'u' modifier (see bug #12376)
@return string | [
"Returns",
"the",
"client",
"-",
"side",
"validation",
"callback"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Regex.php#L120-L131 |
209,121 | matomo-org/matomo | plugins/Annotations/API.php | API.add | public function add($idSite, $date, $note, $starred = 0)
{
$this->checkUserCanAddNotesFor($idSite);
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot add one note to multiple sites.");
$this->checkDateIsValid($date);
// add, save & return a new annotation
$anno... | php | public function add($idSite, $date, $note, $starred = 0)
{
$this->checkUserCanAddNotesFor($idSite);
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot add one note to multiple sites.");
$this->checkDateIsValid($date);
// add, save & return a new annotation
$anno... | [
"public",
"function",
"add",
"(",
"$",
"idSite",
",",
"$",
"date",
",",
"$",
"note",
",",
"$",
"starred",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"checkUserCanAddNotesFor",
"(",
"$",
"idSite",
")",
";",
"$",
"this",
"->",
"checkSingleIdSite",
"(",
"$"... | Create a new annotation for a site.
@param string $idSite The site ID to add the annotation to.
@param string $date The date the annotation is attached to.
@param string $note The text of the annotation.
@param int $starred Either 0 or 1. Whether the annotation should be starred.
@return array Returns an array of two ... | [
"Create",
"a",
"new",
"annotation",
"for",
"a",
"site",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L42-L55 |
209,122 | matomo-org/matomo | plugins/Annotations/API.php | API.save | public function save($idSite, $idNote, $date = null, $note = null, $starred = null)
{
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time.");
$this->checkDateIsValid($date, $canBeNull = true);
// get the annotations for the site
$annot... | php | public function save($idSite, $idNote, $date = null, $note = null, $starred = null)
{
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time.");
$this->checkDateIsValid($date, $canBeNull = true);
// get the annotations for the site
$annot... | [
"public",
"function",
"save",
"(",
"$",
"idSite",
",",
"$",
"idNote",
",",
"$",
"date",
"=",
"null",
",",
"$",
"note",
"=",
"null",
",",
"$",
"starred",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"checkSingleIdSite",
"(",
"$",
"idSite",
",",
"$",
... | Modifies an annotation for a site and returns the modified annotation
and its ID.
If the current user is not allowed to modify an annotation, an exception
will be thrown. A user can modify a note if:
- the user has admin access for the site, OR
- the user has view access, is not the anonymous user and is the user that... | [
"Modifies",
"an",
"annotation",
"for",
"a",
"site",
"and",
"returns",
"the",
"modified",
"annotation",
"and",
"its",
"ID",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L79-L95 |
209,123 | matomo-org/matomo | plugins/Annotations/API.php | API.delete | public function delete($idSite, $idNote)
{
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
$annotations = new AnnotationList($idSite);
// check permissions
$this->checkUserCanModifyOrDelete($idSite, $annotations->get($idSit... | php | public function delete($idSite, $idNote)
{
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
$annotations = new AnnotationList($idSite);
// check permissions
$this->checkUserCanModifyOrDelete($idSite, $annotations->get($idSit... | [
"public",
"function",
"delete",
"(",
"$",
"idSite",
",",
"$",
"idNote",
")",
"{",
"$",
"this",
"->",
"checkSingleIdSite",
"(",
"$",
"idSite",
",",
"$",
"extraMessage",
"=",
"\"Note: Cannot delete annotations from multiple sites.\"",
")",
";",
"$",
"annotations",
... | Removes an annotation from a site's list of annotations.
If the current user is not allowed to delete the annotation, an exception
will be thrown. A user can delete a note if:
- the user has admin access for the site, OR
- the user has view access, is not the anonymous user and is the user that
created the note
@para... | [
"Removes",
"an",
"annotation",
"from",
"a",
"site",
"s",
"list",
"of",
"annotations",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L109-L121 |
209,124 | matomo-org/matomo | plugins/Annotations/API.php | API.deleteAll | public function deleteAll($idSite)
{
Piwik::checkUserHasSuperUserAccess();
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
$annotations = new AnnotationList($idSite);
// remove the notes & save the list
$annotation... | php | public function deleteAll($idSite)
{
Piwik::checkUserHasSuperUserAccess();
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
$annotations = new AnnotationList($idSite);
// remove the notes & save the list
$annotation... | [
"public",
"function",
"deleteAll",
"(",
"$",
"idSite",
")",
"{",
"Piwik",
"::",
"checkUserHasSuperUserAccess",
"(",
")",
";",
"$",
"this",
"->",
"checkSingleIdSite",
"(",
"$",
"idSite",
",",
"$",
"extraMessage",
"=",
"\"Note: Cannot delete annotations from multiple ... | Removes all annotations for a single site. Only super users can use this method.
@param string $idSite The ID of the site to remove annotations for. | [
"Removes",
"all",
"annotations",
"for",
"a",
"single",
"site",
".",
"Only",
"super",
"users",
"can",
"use",
"this",
"method",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L128-L139 |
209,125 | matomo-org/matomo | plugins/Annotations/API.php | API.get | public function get($idSite, $idNote)
{
Piwik::checkUserHasViewAccess($idSite);
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Specify only one site ID when getting ONE note.");
// get single annotation
$annotations = new AnnotationList($idSite);
return $annotatio... | php | public function get($idSite, $idNote)
{
Piwik::checkUserHasViewAccess($idSite);
$this->checkSingleIdSite($idSite, $extraMessage = "Note: Specify only one site ID when getting ONE note.");
// get single annotation
$annotations = new AnnotationList($idSite);
return $annotatio... | [
"public",
"function",
"get",
"(",
"$",
"idSite",
",",
"$",
"idNote",
")",
"{",
"Piwik",
"::",
"checkUserHasViewAccess",
"(",
"$",
"idSite",
")",
";",
"$",
"this",
"->",
"checkSingleIdSite",
"(",
"$",
"idSite",
",",
"$",
"extraMessage",
"=",
"\"Note: Specif... | Returns a single note for one site.
@param string $idSite The site ID to add the annotation to.
@param string $idNote The ID of the note to get.
@return array The annotation. It will contain the following properties:
- date: The date the annotation was recorded for.
- note: The note text.
- starred: Whether the note i... | [
"Returns",
"a",
"single",
"note",
"for",
"one",
"site",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L154-L163 |
209,126 | matomo-org/matomo | plugins/Annotations/API.php | API.getAnnotationCountForDates | public function getAnnotationCountForDates($idSite, $date, $period, $lastN = false, $getAnnotationText = false)
{
Piwik::checkUserHasViewAccess($idSite);
// get start & end date for request. lastN is ignored if $period == 'range'
list($startDate, $endDate) = self::getDateRangeForPeriod($dat... | php | public function getAnnotationCountForDates($idSite, $date, $period, $lastN = false, $getAnnotationText = false)
{
Piwik::checkUserHasViewAccess($idSite);
// get start & end date for request. lastN is ignored if $period == 'range'
list($startDate, $endDate) = self::getDateRangeForPeriod($dat... | [
"public",
"function",
"getAnnotationCountForDates",
"(",
"$",
"idSite",
",",
"$",
"date",
",",
"$",
"period",
",",
"$",
"lastN",
"=",
"false",
",",
"$",
"getAnnotationText",
"=",
"false",
")",
"{",
"Piwik",
"::",
"checkUserHasViewAccess",
"(",
"$",
"idSite",... | Returns the count of annotations for a list of periods, including the count of
starred annotations.
@param string $idSite The site ID to add the annotation to.
@param string|bool $date The date of the period.
@param string $period The period type.
@param int|bool $lastN Whether to get counts for the last N number of p... | [
"Returns",
"the",
"count",
"of",
"annotations",
"for",
"a",
"list",
"of",
"periods",
"including",
"the",
"count",
"of",
"starred",
"annotations",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L222-L274 |
209,127 | matomo-org/matomo | plugins/Annotations/API.php | API.getDateRangeForPeriod | public static function getDateRangeForPeriod($date, $period, $lastN = false)
{
if ($date === false) {
return array(false, false);
}
$isMultiplePeriod = Range::isMultiplePeriod($date, $period);
// if the range is just a normal period (or the period is a range in which ca... | php | public static function getDateRangeForPeriod($date, $period, $lastN = false)
{
if ($date === false) {
return array(false, false);
}
$isMultiplePeriod = Range::isMultiplePeriod($date, $period);
// if the range is just a normal period (or the period is a range in which ca... | [
"public",
"static",
"function",
"getDateRangeForPeriod",
"(",
"$",
"date",
",",
"$",
"period",
",",
"$",
"lastN",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"date",
"===",
"false",
")",
"{",
"return",
"array",
"(",
"false",
",",
"false",
")",
";",
"}",
... | Returns start & end dates for the range described by a period and optional lastN
argument.
@param string|bool $date The start date of the period (or the date range of a range
period).
@param string $period The period type ('day', 'week', 'month', 'year' or 'range').
@param bool|int $lastN Whether to include the last N... | [
"Returns",
"start",
"&",
"end",
"dates",
"for",
"the",
"range",
"described",
"by",
"a",
"period",
"and",
"optional",
"lastN",
"argument",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L317-L344 |
209,128 | matomo-org/matomo | plugins/Annotations/API.php | API.checkDateIsValid | private function checkDateIsValid($date, $canBeNull = false)
{
if ($date === null
&& $canBeNull
) {
return;
}
Date::factory($date);
} | php | private function checkDateIsValid($date, $canBeNull = false)
{
if ($date === null
&& $canBeNull
) {
return;
}
Date::factory($date);
} | [
"private",
"function",
"checkDateIsValid",
"(",
"$",
"date",
",",
"$",
"canBeNull",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"date",
"===",
"null",
"&&",
"$",
"canBeNull",
")",
"{",
"return",
";",
"}",
"Date",
"::",
"factory",
"(",
"$",
"date",
")",
... | Utility function, makes sure date string is valid date, and throws if
otherwise. | [
"Utility",
"function",
"makes",
"sure",
"date",
"string",
"is",
"valid",
"date",
"and",
"throws",
"if",
"otherwise",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L362-L371 |
209,129 | matomo-org/matomo | libs/Zend/Validate/File/IsImage.php | Zend_Validate_File_IsImage._throw | protected function _throw($file, $errorType)
{
$this->_value = $file['name'];
switch($errorType) {
case Zend_Validate_File_MimeType::FALSE_TYPE :
$errorType = self::FALSE_TYPE;
break;
case Zend_Validate_File_MimeType::NOT_DETECTED :
... | php | protected function _throw($file, $errorType)
{
$this->_value = $file['name'];
switch($errorType) {
case Zend_Validate_File_MimeType::FALSE_TYPE :
$errorType = self::FALSE_TYPE;
break;
case Zend_Validate_File_MimeType::NOT_DETECTED :
... | [
"protected",
"function",
"_throw",
"(",
"$",
"file",
",",
"$",
"errorType",
")",
"{",
"$",
"this",
"->",
"_value",
"=",
"$",
"file",
"[",
"'name'",
"]",
";",
"switch",
"(",
"$",
"errorType",
")",
"{",
"case",
"Zend_Validate_File_MimeType",
"::",
"FALSE_T... | Throws an error of the given type
Duplicates parent method due to OOP Problem with late static binding in PHP 5.2
@param string $file
@param string $errorType
@return false | [
"Throws",
"an",
"error",
"of",
"the",
"given",
"type",
"Duplicates",
"parent",
"method",
"due",
"to",
"OOP",
"Problem",
"with",
"late",
"static",
"binding",
"in",
"PHP",
"5",
".",
"2"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/IsImage.php#L155-L172 |
209,130 | matomo-org/matomo | core/DbHelper.php | DbHelper.deleteArchiveTables | public static function deleteArchiveTables()
{
foreach (ArchiveTableCreator::getTablesArchivesInstalled() as $table) {
Log::debug("Dropping table $table");
Db::query("DROP TABLE IF EXISTS `$table`");
}
ArchiveTableCreator::refreshTableList($forceReload = true);
... | php | public static function deleteArchiveTables()
{
foreach (ArchiveTableCreator::getTablesArchivesInstalled() as $table) {
Log::debug("Dropping table $table");
Db::query("DROP TABLE IF EXISTS `$table`");
}
ArchiveTableCreator::refreshTableList($forceReload = true);
... | [
"public",
"static",
"function",
"deleteArchiveTables",
"(",
")",
"{",
"foreach",
"(",
"ArchiveTableCreator",
"::",
"getTablesArchivesInstalled",
"(",
")",
"as",
"$",
"table",
")",
"{",
"Log",
"::",
"debug",
"(",
"\"Dropping table $table\"",
")",
";",
"Db",
"::",... | Deletes archive tables. For use in tests. | [
"Deletes",
"archive",
"tables",
".",
"For",
"use",
"in",
"tests",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DbHelper.php#L204-L213 |
209,131 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.setElementTemplateForGroupClass | public function setElementTemplateForGroupClass($groupClass, $elementClass, $template)
{
$this->elementTemplatesForGroupClass[strtolower($groupClass)][strtolower($elementClass)] = $template;
return $this;
} | php | public function setElementTemplateForGroupClass($groupClass, $elementClass, $template)
{
$this->elementTemplatesForGroupClass[strtolower($groupClass)][strtolower($elementClass)] = $template;
return $this;
} | [
"public",
"function",
"setElementTemplateForGroupClass",
"(",
"$",
"groupClass",
",",
"$",
"elementClass",
",",
"$",
"template",
")",
"{",
"$",
"this",
"->",
"elementTemplatesForGroupClass",
"[",
"strtolower",
"(",
"$",
"groupClass",
")",
"]",
"[",
"strtolower",
... | Sets grouped elements templates using group class
Templates set via {@link setTemplateForClass()} will not be used for
grouped form elements. When searching for a template to use, the renderer
will first consider template set for a specific group id, then the
group templates set by group class.
@param string Grou... | [
"Sets",
"grouped",
"elements",
"templates",
"using",
"group",
"class"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L227-L231 |
209,132 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.setElementTemplateForGroupId | public function setElementTemplateForGroupId($groupId, $elementClass, $template)
{
$this->elementTemplatesForGroupId[$groupId][strtolower($elementClass)] = $template;
return $this;
} | php | public function setElementTemplateForGroupId($groupId, $elementClass, $template)
{
$this->elementTemplatesForGroupId[$groupId][strtolower($elementClass)] = $template;
return $this;
} | [
"public",
"function",
"setElementTemplateForGroupId",
"(",
"$",
"groupId",
",",
"$",
"elementClass",
",",
"$",
"template",
")",
"{",
"$",
"this",
"->",
"elementTemplatesForGroupId",
"[",
"$",
"groupId",
"]",
"[",
"strtolower",
"(",
"$",
"elementClass",
")",
"]... | Sets grouped elements templates using group id
Templates set via {@link setTemplateForClass()} will not be used for
grouped form elements. When searching for a template to use, the renderer
will first consider template set for a specific group id, then the
group templates set by group class.
@param string Group i... | [
"Sets",
"grouped",
"elements",
"templates",
"using",
"group",
"id"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L246-L250 |
209,133 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.reset | public function reset()
{
$this->html = array(array());
$this->hiddenHtml = '';
$this->errors = array();
$this->hasRequired = false;
$this->groupId = array();
return $this;
} | php | public function reset()
{
$this->html = array(array());
$this->hiddenHtml = '';
$this->errors = array();
$this->hasRequired = false;
$this->groupId = array();
return $this;
} | [
"public",
"function",
"reset",
"(",
")",
"{",
"$",
"this",
"->",
"html",
"=",
"array",
"(",
"array",
"(",
")",
")",
";",
"$",
"this",
"->",
"hiddenHtml",
"=",
"''",
";",
"$",
"this",
"->",
"errors",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->... | Resets the accumulated data
This method is called automatically by startForm() method, but should
be called manually before calling other rendering methods separately.
@return HTML_QuickForm2_Renderer_Default | [
"Resets",
"the",
"accumulated",
"data"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L260-L269 |
209,134 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.renderElement | public function renderElement(HTML_QuickForm2_Node $element)
{
$elTpl = $this->prepareTemplate($this->findTemplate($element), $element);
$this->html[count($this->html) - 1][] = str_replace(array('{element}', '{id}'),
array($element, $elemen... | php | public function renderElement(HTML_QuickForm2_Node $element)
{
$elTpl = $this->prepareTemplate($this->findTemplate($element), $element);
$this->html[count($this->html) - 1][] = str_replace(array('{element}', '{id}'),
array($element, $elemen... | [
"public",
"function",
"renderElement",
"(",
"HTML_QuickForm2_Node",
"$",
"element",
")",
"{",
"$",
"elTpl",
"=",
"$",
"this",
"->",
"prepareTemplate",
"(",
"$",
"this",
"->",
"findTemplate",
"(",
"$",
"element",
")",
",",
"$",
"element",
")",
";",
"$",
"... | Renders a generic element
@param HTML_QuickForm2_Node Element being rendered | [
"Renders",
"a",
"generic",
"element"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L287-L292 |
209,135 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.renderHidden | public function renderHidden(HTML_QuickForm2_Node $element)
{
if ($this->options['group_hiddens']) {
$this->hiddenHtml .= $element->__toString();
} else {
$this->html[count($this->html) - 1][] = str_replace('{element}', $element,
... | php | public function renderHidden(HTML_QuickForm2_Node $element)
{
if ($this->options['group_hiddens']) {
$this->hiddenHtml .= $element->__toString();
} else {
$this->html[count($this->html) - 1][] = str_replace('{element}', $element,
... | [
"public",
"function",
"renderHidden",
"(",
"HTML_QuickForm2_Node",
"$",
"element",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"options",
"[",
"'group_hiddens'",
"]",
")",
"{",
"$",
"this",
"->",
"hiddenHtml",
".=",
"$",
"element",
"->",
"__toString",
"(",
")"... | Renders a hidden element
@param HTML_QuickForm2_Node Hidden element being rendered | [
"Renders",
"a",
"hidden",
"element"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L299-L307 |
209,136 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.finishContainer | public function finishContainer(HTML_QuickForm2_Node $container)
{
array_pop($this->groupId);
$cTpl = str_replace(
array('{attributes}', '{id}'),
array($container->getAttributes(true), $container->getId()),
$this->prepareTemplate($this->findTemplate($container, ... | php | public function finishContainer(HTML_QuickForm2_Node $container)
{
array_pop($this->groupId);
$cTpl = str_replace(
array('{attributes}', '{id}'),
array($container->getAttributes(true), $container->getId()),
$this->prepareTemplate($this->findTemplate($container, ... | [
"public",
"function",
"finishContainer",
"(",
"HTML_QuickForm2_Node",
"$",
"container",
")",
"{",
"array_pop",
"(",
"$",
"this",
"->",
"groupId",
")",
";",
"$",
"cTpl",
"=",
"str_replace",
"(",
"array",
"(",
"'{attributes}'",
",",
"'{id}'",
")",
",",
"array"... | Finishes rendering a generic container, called after processing contained elements
@param HTML_QuickForm2_Node Container being rendered | [
"Finishes",
"rendering",
"a",
"generic",
"container",
"called",
"after",
"processing",
"contained",
"elements"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L325-L340 |
209,137 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.finishGroup | public function finishGroup(HTML_QuickForm2_Node $group)
{
$gTpl = str_replace(
array('{attributes}', '{id}'),
array($group->getAttributes(true), array_pop($this->groupId)),
$this->prepareTemplate($this->findTemplate($group, '{content}'), $group)
);
$sepa... | php | public function finishGroup(HTML_QuickForm2_Node $group)
{
$gTpl = str_replace(
array('{attributes}', '{id}'),
array($group->getAttributes(true), array_pop($this->groupId)),
$this->prepareTemplate($this->findTemplate($group, '{content}'), $group)
);
$sepa... | [
"public",
"function",
"finishGroup",
"(",
"HTML_QuickForm2_Node",
"$",
"group",
")",
"{",
"$",
"gTpl",
"=",
"str_replace",
"(",
"array",
"(",
"'{attributes}'",
",",
"'{id}'",
")",
",",
"array",
"(",
"$",
"group",
"->",
"getAttributes",
"(",
"true",
")",
",... | Finishes rendering a group, called after processing grouped elements
@param HTML_QuickForm2_Node Group being rendered | [
"Finishes",
"rendering",
"a",
"group",
"called",
"after",
"processing",
"grouped",
"elements"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L358-L380 |
209,138 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.finishForm | public function finishForm(HTML_QuickForm2_Node $form)
{
$formTpl = str_replace(
array('{attributes}', '{hidden}', '{errors}'),
array($form->getAttributes(true), $this->hiddenHtml,
$this->outputGroupedErrors()),
$this->findTemplate($form, '{content}')
... | php | public function finishForm(HTML_QuickForm2_Node $form)
{
$formTpl = str_replace(
array('{attributes}', '{hidden}', '{errors}'),
array($form->getAttributes(true), $this->hiddenHtml,
$this->outputGroupedErrors()),
$this->findTemplate($form, '{content}')
... | [
"public",
"function",
"finishForm",
"(",
"HTML_QuickForm2_Node",
"$",
"form",
")",
"{",
"$",
"formTpl",
"=",
"str_replace",
"(",
"array",
"(",
"'{attributes}'",
",",
"'{hidden}'",
",",
"'{errors}'",
")",
",",
"array",
"(",
"$",
"form",
"->",
"getAttributes",
... | Finishes rendering a form, called after processing contained elements
@param HTML_QuickForm2_Node Form being rendered | [
"Finishes",
"rendering",
"a",
"form",
"called",
"after",
"processing",
"contained",
"elements"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L397-L425 |
209,139 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.outputGroupedErrors | public function outputGroupedErrors()
{
if (empty($this->errors)) {
return '';
}
if (!empty($this->options['errors_prefix'])) {
$errorHtml = str_replace(array('<qf:message>', '</qf:message>', '{message}'),
array('', '', $this->opti... | php | public function outputGroupedErrors()
{
if (empty($this->errors)) {
return '';
}
if (!empty($this->options['errors_prefix'])) {
$errorHtml = str_replace(array('<qf:message>', '</qf:message>', '{message}'),
array('', '', $this->opti... | [
"public",
"function",
"outputGroupedErrors",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"errors",
")",
")",
"{",
"return",
"''",
";",
"}",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"options",
"[",
"'errors_prefix'",
"]",
")",
... | Creates a error list if 'group_errors' option is true
@return string HTML with a list of all validation errors | [
"Creates",
"a",
"error",
"list",
"if",
"group_errors",
"option",
"is",
"true"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L432-L455 |
209,140 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.findTemplate | public function findTemplate(HTML_QuickForm2_Node $element, $default = '{element}')
{
if (!empty($this->templatesForId[$element->getId()])) {
return $this->templatesForId[$element->getId()];
}
$class = strtolower(get_class($element));
$groupId = end($this-... | php | public function findTemplate(HTML_QuickForm2_Node $element, $default = '{element}')
{
if (!empty($this->templatesForId[$element->getId()])) {
return $this->templatesForId[$element->getId()];
}
$class = strtolower(get_class($element));
$groupId = end($this-... | [
"public",
"function",
"findTemplate",
"(",
"HTML_QuickForm2_Node",
"$",
"element",
",",
"$",
"default",
"=",
"'{element}'",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"templatesForId",
"[",
"$",
"element",
"->",
"getId",
"(",
")",
"]",
")... | Finds a proper template for the element
Templates are scanned in a predefined order. First, if a template was
set for a specific element by id, it is returned, no matter if the
element belongs to a group. If the element does not belong to a group,
we try to match a template using the element class.
But, if the element... | [
"Finds",
"a",
"proper",
"template",
"for",
"the",
"element"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L472-L510 |
209,141 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.markRequired | public function markRequired($elTpl, $required)
{
if ($required) {
$this->hasRequired = true;
$elTpl = str_replace(array('<qf:required>', '</qf:required>'),
array('', ''), $elTpl);
} else {
$elTpl = preg_replace('!<qf:required>.*<... | php | public function markRequired($elTpl, $required)
{
if ($required) {
$this->hasRequired = true;
$elTpl = str_replace(array('<qf:required>', '</qf:required>'),
array('', ''), $elTpl);
} else {
$elTpl = preg_replace('!<qf:required>.*<... | [
"public",
"function",
"markRequired",
"(",
"$",
"elTpl",
",",
"$",
"required",
")",
"{",
"if",
"(",
"$",
"required",
")",
"{",
"$",
"this",
"->",
"hasRequired",
"=",
"true",
";",
"$",
"elTpl",
"=",
"str_replace",
"(",
"array",
"(",
"'<qf:required>'",
"... | Marks element required or removes "required" block
@param string Element template
@param bool Whether element is required
@return string Template with processed "required" block | [
"Marks",
"element",
"required",
"or",
"removes",
"required",
"block"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L534-L544 |
209,142 | matomo-org/matomo | libs/HTML/QuickForm2/Renderer/Default.php | HTML_QuickForm2_Renderer_Default.outputError | public function outputError($elTpl, $error)
{
if ($error && !$this->options['group_errors']) {
$elTpl = str_replace(array('<qf:error>', '</qf:error>', '{error}'),
array('', '', $error), $elTpl);
} else {
if ($error && $this->options['group_er... | php | public function outputError($elTpl, $error)
{
if ($error && !$this->options['group_errors']) {
$elTpl = str_replace(array('<qf:error>', '</qf:error>', '{error}'),
array('', '', $error), $elTpl);
} else {
if ($error && $this->options['group_er... | [
"public",
"function",
"outputError",
"(",
"$",
"elTpl",
",",
"$",
"error",
")",
"{",
"if",
"(",
"$",
"error",
"&&",
"!",
"$",
"this",
"->",
"options",
"[",
"'group_errors'",
"]",
")",
"{",
"$",
"elTpl",
"=",
"str_replace",
"(",
"array",
"(",
"'<qf:er... | Outputs element error, removes empty error blocks
@param string Element template
@param string Validation error for the element
@return string Template with error substitutions done | [
"Outputs",
"element",
"error",
"removes",
"empty",
"error",
"blocks"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L553-L565 |
209,143 | matomo-org/matomo | core/Plugin/WidgetsProvider.php | WidgetsProvider.getWidgetConfigs | public function getWidgetConfigs()
{
$widgetClasses = $this->getAllWidgetClassNames();
$configs = array();
/**
* Triggered to add custom widget configs. To filder widgets have a look at the {@hook Widget.filterWidgets}
* event.
*
* **Example**
*... | php | public function getWidgetConfigs()
{
$widgetClasses = $this->getAllWidgetClassNames();
$configs = array();
/**
* Triggered to add custom widget configs. To filder widgets have a look at the {@hook Widget.filterWidgets}
* event.
*
* **Example**
*... | [
"public",
"function",
"getWidgetConfigs",
"(",
")",
"{",
"$",
"widgetClasses",
"=",
"$",
"this",
"->",
"getAllWidgetClassNames",
"(",
")",
";",
"$",
"configs",
"=",
"array",
"(",
")",
";",
"/**\n * Triggered to add custom widget configs. To filder widgets have a... | Get all existing widget configs.
@return WidgetConfig[] | [
"Get",
"all",
"existing",
"widget",
"configs",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/WidgetsProvider.php#L39-L70 |
209,144 | matomo-org/matomo | core/Plugin/WidgetsProvider.php | WidgetsProvider.getWidgetContainerConfigs | public function getWidgetContainerConfigs()
{
$configs = array();
$widgetContainerConfigs = $this->getAllWidgetContainerConfigClassNames();
foreach ($widgetContainerConfigs as $widgetClass) {
$configs[] = StaticContainer::get($widgetClass);
}
return $configs;
... | php | public function getWidgetContainerConfigs()
{
$configs = array();
$widgetContainerConfigs = $this->getAllWidgetContainerConfigClassNames();
foreach ($widgetContainerConfigs as $widgetClass) {
$configs[] = StaticContainer::get($widgetClass);
}
return $configs;
... | [
"public",
"function",
"getWidgetContainerConfigs",
"(",
")",
"{",
"$",
"configs",
"=",
"array",
"(",
")",
";",
"$",
"widgetContainerConfigs",
"=",
"$",
"this",
"->",
"getAllWidgetContainerConfigClassNames",
"(",
")",
";",
"foreach",
"(",
"$",
"widgetContainerConfi... | Get all existing widget container configs.
@return WidgetContainerConfig[] | [
"Get",
"all",
"existing",
"widget",
"container",
"configs",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/WidgetsProvider.php#L76-L86 |
209,145 | matomo-org/matomo | core/Plugin/WidgetsProvider.php | WidgetsProvider.factory | public function factory($module, $action)
{
if (empty($module) || empty($action)) {
return;
}
try {
if (!$this->pluginManager->isPluginActivated($module)) {
return;
}
$plugin = $this->pluginManager->getLoadedPlugin($module);
... | php | public function factory($module, $action)
{
if (empty($module) || empty($action)) {
return;
}
try {
if (!$this->pluginManager->isPluginActivated($module)) {
return;
}
$plugin = $this->pluginManager->getLoadedPlugin($module);
... | [
"public",
"function",
"factory",
"(",
"$",
"module",
",",
"$",
"action",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"module",
")",
"||",
"empty",
"(",
"$",
"action",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"!",
"$",
"this",
"->",... | Get the widget defined by the given module and action.
@param string $module Aka plugin name, eg 'CoreHome'
@param string $action An action eg 'renderMe'
@return Widget|null
@throws \Exception Throws an exception if the widget is not enabled. | [
"Get",
"the",
"widget",
"defined",
"by",
"the",
"given",
"module",
"and",
"action",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/WidgetsProvider.php#L96-L123 |
209,146 | matomo-org/matomo | plugins/UsersManager/LastSeenTimeLogger.php | LastSeenTimeLogger.logCurrentUserLastSeenTime | public function logCurrentUserLastSeenTime()
{
$module = Common::getRequestVar('module', false);
$currentUserLogin = Piwik::getCurrentUserLogin();
// only log time for non-anonymous visits to the reporting UI
if ($module == 'API'
|| $module == 'Proxy'
|| Piwi... | php | public function logCurrentUserLastSeenTime()
{
$module = Common::getRequestVar('module', false);
$currentUserLogin = Piwik::getCurrentUserLogin();
// only log time for non-anonymous visits to the reporting UI
if ($module == 'API'
|| $module == 'Proxy'
|| Piwi... | [
"public",
"function",
"logCurrentUserLastSeenTime",
"(",
")",
"{",
"$",
"module",
"=",
"Common",
"::",
"getRequestVar",
"(",
"'module'",
",",
"false",
")",
";",
"$",
"currentUserLogin",
"=",
"Piwik",
"::",
"getCurrentUserLogin",
"(",
")",
";",
"// only log time ... | Saves the current time for a user as an option if the current request is for something
in the reporting UI, the current user is not anonymous and the time hasn't been saved
in the last 5 minutes. | [
"Saves",
"the",
"current",
"time",
"for",
"a",
"user",
"as",
"an",
"option",
"if",
"the",
"current",
"request",
"is",
"for",
"something",
"in",
"the",
"reporting",
"UI",
"the",
"current",
"user",
"is",
"not",
"anonymous",
"and",
"the",
"time",
"hasn",
"t... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/LastSeenTimeLogger.php#L35-L61 |
209,147 | matomo-org/matomo | core/Archive.php | Archive.build | public static function build($idSites, $period, $strDate, $segment = false, $_restrictSitesToLogin = false)
{
return StaticContainer::get(ArchiveQueryFactory::class)->build($idSites, $period, $strDate, $segment,
$_restrictSitesToLogin);
} | php | public static function build($idSites, $period, $strDate, $segment = false, $_restrictSitesToLogin = false)
{
return StaticContainer::get(ArchiveQueryFactory::class)->build($idSites, $period, $strDate, $segment,
$_restrictSitesToLogin);
} | [
"public",
"static",
"function",
"build",
"(",
"$",
"idSites",
",",
"$",
"period",
",",
"$",
"strDate",
",",
"$",
"segment",
"=",
"false",
",",
"$",
"_restrictSitesToLogin",
"=",
"false",
")",
"{",
"return",
"StaticContainer",
"::",
"get",
"(",
"ArchiveQuer... | Returns a new Archive instance that will query archive data for the given set of
sites and periods, using an optional Segment.
This method uses data that is found in query parameters, so the parameters to this
function can be string values.
If you want to create an Archive instance with an array of Period instances, ... | [
"Returns",
"a",
"new",
"Archive",
"instance",
"that",
"will",
"query",
"archive",
"data",
"for",
"the",
"given",
"set",
"of",
"sites",
"and",
"periods",
"using",
"an",
"optional",
"Segment",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L209-L213 |
209,148 | matomo-org/matomo | core/Archive.php | Archive.factory | public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false,
$isMultipleDate = false)
{
return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll,
$isMultipleDate);
... | php | public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false,
$isMultipleDate = false)
{
return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll,
$isMultipleDate);
... | [
"public",
"static",
"function",
"factory",
"(",
"Segment",
"$",
"segment",
",",
"array",
"$",
"periods",
",",
"array",
"$",
"idSites",
",",
"$",
"idSiteIsAll",
"=",
"false",
",",
"$",
"isMultipleDate",
"=",
"false",
")",
"{",
"return",
"StaticContainer",
"... | Returns a new Archive instance that will query archive data for the given set of
sites and periods, using an optional segment.
This method uses an array of Period instances and a Segment instance, instead of strings
like {@link build()}.
If you want to create an Archive instance using data found in query parameters,
... | [
"Returns",
"a",
"new",
"Archive",
"instance",
"that",
"will",
"query",
"archive",
"data",
"for",
"the",
"given",
"set",
"of",
"sites",
"and",
"periods",
"using",
"an",
"optional",
"segment",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L237-L242 |
209,149 | matomo-org/matomo | core/Archive.php | Archive.getNumeric | public function getNumeric($names)
{
$data = $this->get($names, 'numeric');
$resultIndices = $this->getResultIndices();
$result = $data->getIndexedArray($resultIndices);
// if only one metric is returned, just return it as a numeric value
if (empty($resultIndices)
... | php | public function getNumeric($names)
{
$data = $this->get($names, 'numeric');
$resultIndices = $this->getResultIndices();
$result = $data->getIndexedArray($resultIndices);
// if only one metric is returned, just return it as a numeric value
if (empty($resultIndices)
... | [
"public",
"function",
"getNumeric",
"(",
"$",
"names",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"get",
"(",
"$",
"names",
",",
"'numeric'",
")",
";",
"$",
"resultIndices",
"=",
"$",
"this",
"->",
"getResultIndices",
"(",
")",
";",
"$",
"result"... | Queries and returns metric data in an array.
If multiple sites were requested in {@link build()} or {@link factory()} the result will
be indexed by site ID.
If multiple periods were requested in {@link build()} or {@link factory()} the result will
be indexed by period.
The site ID index is always first, so if multip... | [
"Queries",
"and",
"returns",
"metric",
"data",
"in",
"an",
"array",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L262-L278 |
209,150 | matomo-org/matomo | core/Archive.php | Archive.getDataTableFromNumeric | public function getDataTableFromNumeric($names)
{
$data = $this->get($names, 'numeric');
return $data->getDataTable($this->getResultIndices());
} | php | public function getDataTableFromNumeric($names)
{
$data = $this->get($names, 'numeric');
return $data->getDataTable($this->getResultIndices());
} | [
"public",
"function",
"getDataTableFromNumeric",
"(",
"$",
"names",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"get",
"(",
"$",
"names",
",",
"'numeric'",
")",
";",
"return",
"$",
"data",
"->",
"getDataTable",
"(",
"$",
"this",
"->",
"getResultIndice... | Queries and returns metric data in a DataTable instance.
If multiple sites were requested in {@link build()} or {@link factory()} the result will
be a DataTable\Map that is indexed by site ID.
If multiple periods were requested in {@link build()} or {@link factory()} the result will
be a {@link DataTable\Map} that is... | [
"Queries",
"and",
"returns",
"metric",
"data",
"in",
"a",
"DataTable",
"instance",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L301-L305 |
209,151 | matomo-org/matomo | core/Archive.php | Archive.getDataTable | public function getDataTable($name, $idSubtable = null)
{
$data = $this->get($name, 'blob', $idSubtable);
return $data->getDataTable($this->getResultIndices());
} | php | public function getDataTable($name, $idSubtable = null)
{
$data = $this->get($name, 'blob', $idSubtable);
return $data->getDataTable($this->getResultIndices());
} | [
"public",
"function",
"getDataTable",
"(",
"$",
"name",
",",
"$",
"idSubtable",
"=",
"null",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"get",
"(",
"$",
"name",
",",
"'blob'",
",",
"$",
"idSubtable",
")",
";",
"return",
"$",
"data",
"->",
"getD... | Queries and returns one or more reports as DataTable instances.
This method will query blob data that is a serialized array of of {@link DataTable\Row}'s and
unserialize it.
If multiple sites were requested in {@link build()} or {@link factory()} the result will
be a {@link DataTable\Map} that is indexed by site ID.
... | [
"Queries",
"and",
"returns",
"one",
"or",
"more",
"reports",
"as",
"DataTable",
"instances",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L346-L350 |
209,152 | matomo-org/matomo | core/Archive.php | Archive.getDataTableExpanded | public function getDataTableExpanded($name, $idSubtable = null, $depth = null, $addMetadataSubtableId = true)
{
$data = $this->get($name, 'blob', self::ID_SUBTABLE_LOAD_ALL_SUBTABLES);
return $data->getExpandedDataTable($this->getResultIndices(), $idSubtable, $depth, $addMetadataSubtableId);
} | php | public function getDataTableExpanded($name, $idSubtable = null, $depth = null, $addMetadataSubtableId = true)
{
$data = $this->get($name, 'blob', self::ID_SUBTABLE_LOAD_ALL_SUBTABLES);
return $data->getExpandedDataTable($this->getResultIndices(), $idSubtable, $depth, $addMetadataSubtableId);
} | [
"public",
"function",
"getDataTableExpanded",
"(",
"$",
"name",
",",
"$",
"idSubtable",
"=",
"null",
",",
"$",
"depth",
"=",
"null",
",",
"$",
"addMetadataSubtableId",
"=",
"true",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"get",
"(",
"$",
"name",... | Queries and returns one report with all of its subtables loaded.
If multiple sites were requested in {@link build()} or {@link factory()} the result will
be a DataTable\Map that is indexed by site ID.
If multiple periods were requested in {@link build()} or {@link factory()} the result will
be a DataTable\Map that is... | [
"Queries",
"and",
"returns",
"one",
"report",
"with",
"all",
"of",
"its",
"subtables",
"loaded",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L374-L378 |
209,153 | matomo-org/matomo | core/Archive.php | Archive.getRequestedPlugins | private function getRequestedPlugins($archiveNames)
{
$result = array();
foreach ($archiveNames as $name) {
$result[] = self::getPluginForReport($name);
}
return array_unique($result);
} | php | private function getRequestedPlugins($archiveNames)
{
$result = array();
foreach ($archiveNames as $name) {
$result[] = self::getPluginForReport($name);
}
return array_unique($result);
} | [
"private",
"function",
"getRequestedPlugins",
"(",
"$",
"archiveNames",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"archiveNames",
"as",
"$",
"name",
")",
"{",
"$",
"result",
"[",
"]",
"=",
"self",
"::",
"getPluginForRepor... | Returns the list of plugins that archive the given reports.
@param array $archiveNames
@return array | [
"Returns",
"the",
"list",
"of",
"plugins",
"that",
"archive",
"the",
"given",
"reports",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L386-L395 |
209,154 | matomo-org/matomo | core/Archive.php | Archive.createDataTableFromArchive | public static function createDataTableFromArchive($recordName, $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null, $depth = null)
{
Piwik::checkUserHasViewAccess($idSite);
if ($flat && !$idSubtable) {
$expanded = true;
}
$archive = A... | php | public static function createDataTableFromArchive($recordName, $idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable = null, $depth = null)
{
Piwik::checkUserHasViewAccess($idSite);
if ($flat && !$idSubtable) {
$expanded = true;
}
$archive = A... | [
"public",
"static",
"function",
"createDataTableFromArchive",
"(",
"$",
"recordName",
",",
"$",
"idSite",
",",
"$",
"period",
",",
"$",
"date",
",",
"$",
"segment",
",",
"$",
"expanded",
"=",
"false",
",",
"$",
"flat",
"=",
"false",
",",
"$",
"idSubtable... | Helper function that creates an Archive instance and queries for report data using
query parameter data. API methods can use this method to reduce code redundancy.
@param string $recordName The name of the report to return.
@param int|string|array $idSite @see {@link build()}
@param string $period @see {@link build()}... | [
"Helper",
"function",
"that",
"creates",
"an",
"Archive",
"instance",
"and",
"queries",
"for",
"report",
"data",
"using",
"query",
"parameter",
"data",
".",
"API",
"methods",
"can",
"use",
"this",
"method",
"to",
"reduce",
"code",
"redundancy",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L423-L454 |
209,155 | matomo-org/matomo | core/Archive.php | Archive.get | protected function get($archiveNames, $archiveDataType, $idSubtable = null)
{
if (!is_array($archiveNames)) {
$archiveNames = array($archiveNames);
}
// apply idSubtable
if ($idSubtable !== null
&& $idSubtable != self::ID_SUBTABLE_LOAD_ALL_SUBTABLES
)... | php | protected function get($archiveNames, $archiveDataType, $idSubtable = null)
{
if (!is_array($archiveNames)) {
$archiveNames = array($archiveNames);
}
// apply idSubtable
if ($idSubtable !== null
&& $idSubtable != self::ID_SUBTABLE_LOAD_ALL_SUBTABLES
)... | [
"protected",
"function",
"get",
"(",
"$",
"archiveNames",
",",
"$",
"archiveDataType",
",",
"$",
"idSubtable",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"archiveNames",
")",
")",
"{",
"$",
"archiveNames",
"=",
"array",
"(",
"$",
"arc... | Queries archive tables for data and returns the result.
@param array|string $archiveNames
@param $archiveDataType
@param null|int $idSubtable
@return Archive\DataCollection | [
"Queries",
"archive",
"tables",
"for",
"data",
"and",
"returns",
"the",
"result",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L525-L577 |
209,156 | matomo-org/matomo | core/Archive.php | Archive.getDoneStringForPlugin | private function getDoneStringForPlugin($plugin, $idSites)
{
return Rules::getDoneStringFlagFor(
$idSites,
$this->params->getSegment(),
$this->getPeriodLabel(),
$plugin
);
} | php | private function getDoneStringForPlugin($plugin, $idSites)
{
return Rules::getDoneStringFlagFor(
$idSites,
$this->params->getSegment(),
$this->getPeriodLabel(),
$plugin
);
} | [
"private",
"function",
"getDoneStringForPlugin",
"(",
"$",
"plugin",
",",
"$",
"idSites",
")",
"{",
"return",
"Rules",
"::",
"getDoneStringFlagFor",
"(",
"$",
"idSites",
",",
"$",
"this",
"->",
"params",
"->",
"getSegment",
"(",
")",
",",
"$",
"this",
"->"... | Returns the done string flag for a plugin using this instance's segment & periods.
@param string $plugin
@return string | [
"Returns",
"the",
"done",
"string",
"flag",
"for",
"a",
"plugin",
"using",
"this",
"instance",
"s",
"segment",
"&",
"periods",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L707-L715 |
209,157 | matomo-org/matomo | core/Archive.php | Archive.getResultIndices | private function getResultIndices()
{
$indices = array();
if (count($this->params->getIdSites()) > 1
|| $this->forceIndexedBySite
) {
$indices['site'] = 'idSite';
}
if (count($this->params->getPeriods()) > 1
|| $this->forceIndexedByDate
... | php | private function getResultIndices()
{
$indices = array();
if (count($this->params->getIdSites()) > 1
|| $this->forceIndexedBySite
) {
$indices['site'] = 'idSite';
}
if (count($this->params->getPeriods()) > 1
|| $this->forceIndexedByDate
... | [
"private",
"function",
"getResultIndices",
"(",
")",
"{",
"$",
"indices",
"=",
"array",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"params",
"->",
"getIdSites",
"(",
")",
")",
">",
"1",
"||",
"$",
"this",
"->",
"forceIndexedBySite",
"... | Returns an array describing what metadata to use when indexing a query result.
For use with DataCollection.
@return array | [
"Returns",
"an",
"array",
"describing",
"what",
"metadata",
"to",
"use",
"when",
"indexing",
"a",
"query",
"result",
".",
"For",
"use",
"with",
"DataCollection",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L729-L746 |
209,158 | matomo-org/matomo | core/Archive.php | Archive.getArchiveGroupOfPlugin | private function getArchiveGroupOfPlugin($plugin)
{
$periods = $this->params->getPeriods();
$periodLabel = reset($periods)->getLabel();
if (Rules::shouldProcessReportsAllPlugins($this->params->getIdSites(), $this->params->getSegment(), $periodLabel)) {
return self::ARCHI... | php | private function getArchiveGroupOfPlugin($plugin)
{
$periods = $this->params->getPeriods();
$periodLabel = reset($periods)->getLabel();
if (Rules::shouldProcessReportsAllPlugins($this->params->getIdSites(), $this->params->getSegment(), $periodLabel)) {
return self::ARCHI... | [
"private",
"function",
"getArchiveGroupOfPlugin",
"(",
"$",
"plugin",
")",
"{",
"$",
"periods",
"=",
"$",
"this",
"->",
"params",
"->",
"getPeriods",
"(",
")",
";",
"$",
"periodLabel",
"=",
"reset",
"(",
"$",
"periods",
")",
"->",
"getLabel",
"(",
")",
... | Returns the archiving group identifier given a plugin.
More than one plugin can be called at once when archiving. In such a case
we don't want to launch archiving three times for three plugins if doing
it once is enough, so getArchiveIds makes sure to get the archive group of
all reports.
If the period isn't a range,... | [
"Returns",
"the",
"archiving",
"group",
"identifier",
"given",
"a",
"plugin",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L797-L807 |
209,159 | matomo-org/matomo | core/Archive.php | Archive.getPluginForReport | public static function getPluginForReport($report)
{
// Core metrics are always processed in Core, for the requested date/period/segment
if (in_array($report, Metrics::getVisitsMetricNames())) {
$report = 'VisitsSummary_CoreMetrics';
} // Goal_* metrics are processed by the Goals... | php | public static function getPluginForReport($report)
{
// Core metrics are always processed in Core, for the requested date/period/segment
if (in_array($report, Metrics::getVisitsMetricNames())) {
$report = 'VisitsSummary_CoreMetrics';
} // Goal_* metrics are processed by the Goals... | [
"public",
"static",
"function",
"getPluginForReport",
"(",
"$",
"report",
")",
"{",
"// Core metrics are always processed in Core, for the requested date/period/segment",
"if",
"(",
"in_array",
"(",
"$",
"report",
",",
"Metrics",
"::",
"getVisitsMetricNames",
"(",
")",
")... | Returns the name of the plugin that archives a given report.
@param string $report Archive data name, eg, `'nb_visits'`, `'DevicesDetection_...'`, etc.
@return string Plugin name.
@throws \Exception If a plugin cannot be found or if the plugin for the report isn't
activated. | [
"Returns",
"the",
"name",
"of",
"the",
"plugin",
"that",
"archives",
"a",
"given",
"report",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L817-L837 |
209,160 | matomo-org/matomo | libs/Zend/Db/Table/Rowset/Abstract.php | Zend_Db_Table_Rowset_Abstract.setTable | public function setTable(Zend_Db_Table_Abstract $table)
{
$this->_table = $table;
$this->_connected = false;
// @todo This works only if we have iterated through
// the result set once to instantiate the rows.
foreach ($this as $row) {
$connected = $row->setTable(... | php | public function setTable(Zend_Db_Table_Abstract $table)
{
$this->_table = $table;
$this->_connected = false;
// @todo This works only if we have iterated through
// the result set once to instantiate the rows.
foreach ($this as $row) {
$connected = $row->setTable(... | [
"public",
"function",
"setTable",
"(",
"Zend_Db_Table_Abstract",
"$",
"table",
")",
"{",
"$",
"this",
"->",
"_table",
"=",
"$",
"table",
";",
"$",
"this",
"->",
"_connected",
"=",
"false",
";",
"// @todo This works only if we have iterated through",
"// the result s... | Set the table object, to re-establish a live connection
to the database for a Rowset that has been de-serialized.
@param Zend_Db_Table_Abstract $table
@return boolean
@throws Zend_Db_Table_Row_Exception | [
"Set",
"the",
"table",
"object",
"to",
"re",
"-",
"establish",
"a",
"live",
"connection",
"to",
"the",
"database",
"for",
"a",
"Rowset",
"that",
"has",
"been",
"de",
"-",
"serialized",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Rowset/Abstract.php#L196-L209 |
209,161 | matomo-org/matomo | libs/Zend/Db/Table/Rowset/Abstract.php | Zend_Db_Table_Rowset_Abstract.toArray | public function toArray()
{
// @todo This works only if we have iterated through
// the result set once to instantiate the rows.
foreach ($this->_rows as $i => $row) {
$this->_data[$i] = $row->toArray();
}
return $this->_data;
} | php | public function toArray()
{
// @todo This works only if we have iterated through
// the result set once to instantiate the rows.
foreach ($this->_rows as $i => $row) {
$this->_data[$i] = $row->toArray();
}
return $this->_data;
} | [
"public",
"function",
"toArray",
"(",
")",
"{",
"// @todo This works only if we have iterated through",
"// the result set once to instantiate the rows.",
"foreach",
"(",
"$",
"this",
"->",
"_rows",
"as",
"$",
"i",
"=>",
"$",
"row",
")",
"{",
"$",
"this",
"->",
"_da... | Returns all data as an array.
Updates the $_data property with current row object values.
@return array | [
"Returns",
"all",
"data",
"as",
"an",
"array",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Rowset/Abstract.php#L402-L410 |
209,162 | matomo-org/matomo | plugins/LanguagesManager/Model.php | Model.set12HourClock | public function set12HourClock($login, $use12HourClock)
{
$query = 'INSERT INTO ' . $this->table .
' (login, use_12_hour_clock) VALUES (?,?) ON DUPLICATE KEY UPDATE use_12_hour_clock=?';
$bind = array($login, $use12HourClock, $use12HourClock);
Db::query($query, $bind);
... | php | public function set12HourClock($login, $use12HourClock)
{
$query = 'INSERT INTO ' . $this->table .
' (login, use_12_hour_clock) VALUES (?,?) ON DUPLICATE KEY UPDATE use_12_hour_clock=?';
$bind = array($login, $use12HourClock, $use12HourClock);
Db::query($query, $bind);
... | [
"public",
"function",
"set12HourClock",
"(",
"$",
"login",
",",
"$",
"use12HourClock",
")",
"{",
"$",
"query",
"=",
"'INSERT INTO '",
".",
"$",
"this",
"->",
"table",
".",
"' (login, use_12_hour_clock) VALUES (?,?) ON DUPLICATE KEY UPDATE use_12_hour_clock=?'",
";",
"$"... | Sets whether the given user wants to use 12 hout clock
@param string $login
@param string $use12HourClock
@return bool | [
"Sets",
"whether",
"the",
"given",
"user",
"wants",
"to",
"use",
"12",
"hout",
"clock"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/Model.php#L80-L88 |
209,163 | matomo-org/matomo | plugins/UserCountry/Archiver.php | Archiver.makeRegionCityLabelsUnique | private function makeRegionCityLabelsUnique(&$row)
{
// remove the location separator from the region/city/country we get from the query
foreach ($this->dimensions as $column) {
$row[$column] = str_replace(self::LOCATION_SEPARATOR, '', $row[$column]);
}
if (!empty($row[s... | php | private function makeRegionCityLabelsUnique(&$row)
{
// remove the location separator from the region/city/country we get from the query
foreach ($this->dimensions as $column) {
$row[$column] = str_replace(self::LOCATION_SEPARATOR, '', $row[$column]);
}
if (!empty($row[s... | [
"private",
"function",
"makeRegionCityLabelsUnique",
"(",
"&",
"$",
"row",
")",
"{",
"// remove the location separator from the region/city/country we get from the query",
"foreach",
"(",
"$",
"this",
"->",
"dimensions",
"as",
"$",
"column",
")",
"{",
"$",
"row",
"[",
... | Makes sure the region and city of a query row are unique.
@param array $row | [
"Makes",
"sure",
"the",
"region",
"and",
"city",
"of",
"a",
"query",
"row",
"are",
"unique",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/Archiver.php#L103-L117 |
209,164 | matomo-org/matomo | core/API/DataTableManipulator.php | DataTableManipulator.loadSubtable | protected function loadSubtable($dataTable, $row)
{
if (!($this->apiModule && $this->apiMethod && count($this->request))) {
return null;
}
$request = $this->request;
$idSubTable = $row->getIdSubDataTable();
if ($idSubTable === null) {
return null;
... | php | protected function loadSubtable($dataTable, $row)
{
if (!($this->apiModule && $this->apiMethod && count($this->request))) {
return null;
}
$request = $this->request;
$idSubTable = $row->getIdSubDataTable();
if ($idSubTable === null) {
return null;
... | [
"protected",
"function",
"loadSubtable",
"(",
"$",
"dataTable",
",",
"$",
"row",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"this",
"->",
"apiModule",
"&&",
"$",
"this",
"->",
"apiMethod",
"&&",
"count",
"(",
"$",
"this",
"->",
"request",
")",
")",
")",
"... | Load the subtable for a row.
Returns null if none is found.
@param DataTable $dataTable
@param Row $row
@return DataTable | [
"Load",
"the",
"subtable",
"for",
"a",
"row",
".",
"Returns",
"null",
"if",
"none",
"is",
"found",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator.php#L103-L128 |
209,165 | matomo-org/matomo | core/API/DataTableManipulator.php | DataTableManipulator.getApiMethodForSubtable | protected function getApiMethodForSubtable($request)
{
if (!$this->apiMethodForSubtable) {
if (!empty($request['idSite'])) {
$idSite = $request['idSite'];
} else {
$idSite = 'all';
}
$apiParameters = array();
$entit... | php | protected function getApiMethodForSubtable($request)
{
if (!$this->apiMethodForSubtable) {
if (!empty($request['idSite'])) {
$idSite = $request['idSite'];
} else {
$idSite = 'all';
}
$apiParameters = array();
$entit... | [
"protected",
"function",
"getApiMethodForSubtable",
"(",
"$",
"request",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"apiMethodForSubtable",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"request",
"[",
"'idSite'",
"]",
")",
")",
"{",
"$",
"idSite",
"=... | Extract the API method for loading subtables from the meta data
@throws Exception
@return string | [
"Extract",
"the",
"API",
"method",
"for",
"loading",
"subtables",
"from",
"the",
"meta",
"data"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator.php#L146-L184 |
209,166 | matomo-org/matomo | plugins/UserCountry/Columns/Country.php | Country.getHost | private function getHost($ipStr)
{
$ip = IP::fromStringIP($ipStr);
$host = $ip->getHostname();
$host = ($host === null ? $ipStr : $host);
return trim(strtolower($host));
} | php | private function getHost($ipStr)
{
$ip = IP::fromStringIP($ipStr);
$host = $ip->getHostname();
$host = ($host === null ? $ipStr : $host);
return trim(strtolower($host));
} | [
"private",
"function",
"getHost",
"(",
"$",
"ipStr",
")",
"{",
"$",
"ip",
"=",
"IP",
"::",
"fromStringIP",
"(",
"$",
"ipStr",
")",
";",
"$",
"host",
"=",
"$",
"ip",
"->",
"getHostname",
"(",
")",
";",
"$",
"host",
"=",
"(",
"$",
"host",
"===",
... | Returns the hostname given the IP address string
@param string $ipStr IP Address
@return string hostname (or human-readable IP address) | [
"Returns",
"the",
"hostname",
"given",
"the",
"IP",
"address",
"string"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/Columns/Country.php#L139-L147 |
209,167 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager.hasCache | public function hasCache($name)
{
if (isset($this->_caches[$name])
|| $this->hasCacheTemplate($name)
) {
return true;
}
return false;
} | php | public function hasCache($name)
{
if (isset($this->_caches[$name])
|| $this->hasCacheTemplate($name)
) {
return true;
}
return false;
} | [
"public",
"function",
"hasCache",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_caches",
"[",
"$",
"name",
"]",
")",
"||",
"$",
"this",
"->",
"hasCacheTemplate",
"(",
"$",
"name",
")",
")",
"{",
"return",
"true",
";",
... | Check if the Cache Manager contains the named cache object, or a named
configuration template to lazy load the cache object
@param string $name
@return bool | [
"Check",
"if",
"the",
"Cache",
"Manager",
"contains",
"the",
"named",
"cache",
"object",
"or",
"a",
"named",
"configuration",
"template",
"to",
"lazy",
"load",
"the",
"cache",
"object"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L134-L142 |
209,168 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager.getCache | public function getCache($name)
{
if (isset($this->_caches[$name])) {
return $this->_caches[$name];
}
if (isset($this->_optionTemplates[$name])) {
if ($name == self::PAGECACHE
&& (!isset($this->_optionTemplates[$name]['backend']['options']['tag_cache']... | php | public function getCache($name)
{
if (isset($this->_caches[$name])) {
return $this->_caches[$name];
}
if (isset($this->_optionTemplates[$name])) {
if ($name == self::PAGECACHE
&& (!isset($this->_optionTemplates[$name]['backend']['options']['tag_cache']... | [
"public",
"function",
"getCache",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_caches",
"[",
"$",
"name",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_caches",
"[",
"$",
"name",
"]",
";",
"}",
"if",
"(",
"isse... | Fetch the named cache object, or instantiate and return a cache object
using a named configuration template
@param string $name
@return Zend_Cache_Core | [
"Fetch",
"the",
"named",
"cache",
"object",
"or",
"instantiate",
"and",
"return",
"a",
"cache",
"object",
"using",
"a",
"named",
"configuration",
"template"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L151-L177 |
209,169 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager.getCaches | public function getCaches()
{
$caches = $this->_caches;
foreach ($this->_optionTemplates as $name => $tmp) {
if (!isset($caches[$name])) {
$caches[$name] = $this->getCache($name);
}
}
return $caches;
} | php | public function getCaches()
{
$caches = $this->_caches;
foreach ($this->_optionTemplates as $name => $tmp) {
if (!isset($caches[$name])) {
$caches[$name] = $this->getCache($name);
}
}
return $caches;
} | [
"public",
"function",
"getCaches",
"(",
")",
"{",
"$",
"caches",
"=",
"$",
"this",
"->",
"_caches",
";",
"foreach",
"(",
"$",
"this",
"->",
"_optionTemplates",
"as",
"$",
"name",
"=>",
"$",
"tmp",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"cache... | Fetch all available caches
@return array An array of all available caches with it's names as key | [
"Fetch",
"all",
"available",
"caches"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L184-L193 |
209,170 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager.setCacheTemplate | public function setCacheTemplate($name, $options)
{
if ($options instanceof Zend_Config) {
$options = $options->toArray();
} elseif (!is_array($options)) {
// require_once 'Zend/Cache/Exception.php';
throw new Zend_Cache_Exception('Options passed must be in'
... | php | public function setCacheTemplate($name, $options)
{
if ($options instanceof Zend_Config) {
$options = $options->toArray();
} elseif (!is_array($options)) {
// require_once 'Zend/Cache/Exception.php';
throw new Zend_Cache_Exception('Options passed must be in'
... | [
"public",
"function",
"setCacheTemplate",
"(",
"$",
"name",
",",
"$",
"options",
")",
"{",
"if",
"(",
"$",
"options",
"instanceof",
"Zend_Config",
")",
"{",
"$",
"options",
"=",
"$",
"options",
"->",
"toArray",
"(",
")",
";",
"}",
"elseif",
"(",
"!",
... | Set a named configuration template from which a cache object can later
be lazy loaded
@param string $name
@param array $options
@return Zend_Cache_Manager | [
"Set",
"a",
"named",
"configuration",
"template",
"from",
"which",
"a",
"cache",
"object",
"can",
"later",
"be",
"lazy",
"loaded"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L203-L214 |
209,171 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager.setTemplateOptions | public function setTemplateOptions($name, $options)
{
if ($options instanceof Zend_Config) {
$options = $options->toArray();
} elseif (!is_array($options)) {
// require_once 'Zend/Cache/Exception.php';
throw new Zend_Cache_Exception('Options passed must be in'
... | php | public function setTemplateOptions($name, $options)
{
if ($options instanceof Zend_Config) {
$options = $options->toArray();
} elseif (!is_array($options)) {
// require_once 'Zend/Cache/Exception.php';
throw new Zend_Cache_Exception('Options passed must be in'
... | [
"public",
"function",
"setTemplateOptions",
"(",
"$",
"name",
",",
"$",
"options",
")",
"{",
"if",
"(",
"$",
"options",
"instanceof",
"Zend_Config",
")",
"{",
"$",
"options",
"=",
"$",
"options",
"->",
"toArray",
"(",
")",
";",
"}",
"elseif",
"(",
"!",... | Pass an array containing changes to be applied to a named
configuration
template
@param string $name
@param array $options
@return Zend_Cache_Manager
@throws Zend_Cache_Exception for invalid options format or if option templates do not have $name | [
"Pass",
"an",
"array",
"containing",
"changes",
"to",
"be",
"applied",
"to",
"a",
"named",
"configuration",
"template"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L253-L269 |
209,172 | matomo-org/matomo | libs/Zend/Cache/Manager.php | Zend_Cache_Manager._mergeOptions | protected function _mergeOptions(array $current, array $options)
{
if (isset($options['frontend']['name'])) {
$current['frontend']['name'] = $options['frontend']['name'];
}
if (isset($options['backend']['name'])) {
$current['backend']['name'] = $options['backend']['na... | php | protected function _mergeOptions(array $current, array $options)
{
if (isset($options['frontend']['name'])) {
$current['frontend']['name'] = $options['frontend']['name'];
}
if (isset($options['backend']['name'])) {
$current['backend']['name'] = $options['backend']['na... | [
"protected",
"function",
"_mergeOptions",
"(",
"array",
"$",
"current",
",",
"array",
"$",
"options",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"options",
"[",
"'frontend'",
"]",
"[",
"'name'",
"]",
")",
")",
"{",
"$",
"current",
"[",
"'frontend'",
"]",
... | Simple method to merge two configuration arrays
@param array $current
@param array $options
@return array | [
"Simple",
"method",
"to",
"merge",
"two",
"configuration",
"arrays"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L278-L297 |
209,173 | matomo-org/matomo | libs/Zend/Validate/File/Size.php | Zend_Validate_File_Size._toByteString | protected function _toByteString($size)
{
$sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
for ($i=0; $size >= 1024 && $i < 9; $i++) {
$size /= 1024;
}
return round($size, 2) . $sizes[$i];
} | php | protected function _toByteString($size)
{
$sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
for ($i=0; $size >= 1024 && $i < 9; $i++) {
$size /= 1024;
}
return round($size, 2) . $sizes[$i];
} | [
"protected",
"function",
"_toByteString",
"(",
"$",
"size",
")",
"{",
"$",
"sizes",
"=",
"array",
"(",
"'B'",
",",
"'kB'",
",",
"'MB'",
",",
"'GB'",
",",
"'TB'",
",",
"'PB'",
",",
"'EB'",
",",
"'ZB'",
",",
"'YB'",
")",
";",
"for",
"(",
"$",
"i",
... | Returns the formatted size
@param integer $size
@return string | [
"Returns",
"the",
"formatted",
"size"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/Size.php#L327-L335 |
209,174 | matomo-org/matomo | libs/Zend/Validate/File/Size.php | Zend_Validate_File_Size._fromByteString | protected function _fromByteString($size)
{
if (is_numeric($size)) {
return (integer) $size;
}
$type = trim(substr($size, -2, 1));
$value = substr($size, 0, -1);
if (!is_numeric($value)) {
$value = substr($value, 0, -1);
}
switch (s... | php | protected function _fromByteString($size)
{
if (is_numeric($size)) {
return (integer) $size;
}
$type = trim(substr($size, -2, 1));
$value = substr($size, 0, -1);
if (!is_numeric($value)) {
$value = substr($value, 0, -1);
}
switch (s... | [
"protected",
"function",
"_fromByteString",
"(",
"$",
"size",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"size",
")",
")",
"{",
"return",
"(",
"integer",
")",
"$",
"size",
";",
"}",
"$",
"type",
"=",
"trim",
"(",
"substr",
"(",
"$",
"size",
",",
... | Returns the unformatted size
@param string $size
@return integer | [
"Returns",
"the",
"unformatted",
"size"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/Size.php#L343-L386 |
209,175 | matomo-org/matomo | core/API/DataTableManipulator/LabelFilter.php | LabelFilter.filter | public function filter($labels, $dataTable, $addLabelIndex = false)
{
if (!is_array($labels)) {
$labels = array($labels);
}
$this->labels = $labels;
$this->addLabelIndex = (bool)$addLabelIndex;
return $this->manipulate($dataTable);
} | php | public function filter($labels, $dataTable, $addLabelIndex = false)
{
if (!is_array($labels)) {
$labels = array($labels);
}
$this->labels = $labels;
$this->addLabelIndex = (bool)$addLabelIndex;
return $this->manipulate($dataTable);
} | [
"public",
"function",
"filter",
"(",
"$",
"labels",
",",
"$",
"dataTable",
",",
"$",
"addLabelIndex",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"labels",
")",
")",
"{",
"$",
"labels",
"=",
"array",
"(",
"$",
"labels",
")",
";",
... | Filter a data table by label.
The filtered table is returned, which might be a new instance.
$apiModule, $apiMethod and $request are needed load sub-datatables
for the recursive search. If the label is not recursive, these parameters
are not needed.
@param string $labels the labels to search for
@param DataTable $dat... | [
"Filter",
"a",
"data",
"table",
"by",
"label",
".",
"The",
"filtered",
"table",
"is",
"returned",
"which",
"might",
"be",
"a",
"new",
"instance",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator/LabelFilter.php#L47-L56 |
209,176 | matomo-org/matomo | core/API/DataTableManipulator/LabelFilter.php | LabelFilter.doFilterRecursiveDescend | private function doFilterRecursiveDescend($labelParts, $dataTable)
{
// we need to make sure to rebuild the index as some filters change the label column directly via
// $row->setColumn('label', '') which would not be noticed in the label index otherwise.
$dataTable->rebuildIndex();
... | php | private function doFilterRecursiveDescend($labelParts, $dataTable)
{
// we need to make sure to rebuild the index as some filters change the label column directly via
// $row->setColumn('label', '') which would not be noticed in the label index otherwise.
$dataTable->rebuildIndex();
... | [
"private",
"function",
"doFilterRecursiveDescend",
"(",
"$",
"labelParts",
",",
"$",
"dataTable",
")",
"{",
"// we need to make sure to rebuild the index as some filters change the label column directly via",
"// $row->setColumn('label', '') which would not be noticed in the label index othe... | Method for the recursive descend
@param array $labelParts
@param DataTable $dataTable
@return Row|bool | [
"Method",
"for",
"the",
"recursive",
"descend"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator/LabelFilter.php#L65-L99 |
209,177 | matomo-org/matomo | core/API/DataTableManipulator/LabelFilter.php | LabelFilter.getLabelVariations | private function getLabelVariations($originalLabel)
{
static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles');
$originalLabel = trim($originalLabel);
$isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR;
if ($isTerminal) {
... | php | private function getLabelVariations($originalLabel)
{
static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles');
$originalLabel = trim($originalLabel);
$isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR;
if ($isTerminal) {
... | [
"private",
"function",
"getLabelVariations",
"(",
"$",
"originalLabel",
")",
"{",
"static",
"$",
"pageTitleReports",
"=",
"array",
"(",
"'getPageTitles'",
",",
"'getEntryPageTitles'",
",",
"'getExitPageTitles'",
")",
";",
"$",
"originalLabel",
"=",
"trim",
"(",
"$... | Use variations of the label to make it easier to specify the desired label
Note: The HTML Encoded version must be tried first, since in ResponseBuilder the $label is unsanitized
via Common::unsanitizeLabelParameter.
@param string $originalLabel
@return array | [
"Use",
"variations",
"of",
"the",
"label",
"to",
"make",
"it",
"easier",
"to",
"specify",
"the",
"desired",
"label"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator/LabelFilter.php#L125-L160 |
209,178 | matomo-org/matomo | plugins/SegmentEditor/API.php | API.delete | public function delete($idSegment)
{
$segment = $this->getSegmentOrFail($idSegment);
$this->checkUserCanEditOrDeleteSegment($segment);
/**
* Triggered before a segment is deleted or made invisible.
*
* This event can be used by plugins to throw an exception
... | php | public function delete($idSegment)
{
$segment = $this->getSegmentOrFail($idSegment);
$this->checkUserCanEditOrDeleteSegment($segment);
/**
* Triggered before a segment is deleted or made invisible.
*
* This event can be used by plugins to throw an exception
... | [
"public",
"function",
"delete",
"(",
"$",
"idSegment",
")",
"{",
"$",
"segment",
"=",
"$",
"this",
"->",
"getSegmentOrFail",
"(",
"$",
"idSegment",
")",
";",
"$",
"this",
"->",
"checkUserCanEditOrDeleteSegment",
"(",
"$",
"segment",
")",
";",
"/**\n ... | Deletes a stored segment.
@param $idSegment
@return bool | [
"Deletes",
"a",
"stored",
"segment",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SegmentEditor/API.php#L192-L210 |
209,179 | matomo-org/matomo | plugins/SegmentEditor/API.php | API.update | public function update($idSegment, $name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
{
$segment = $this->getSegmentOrFail($idSegment);
$this->checkUserCanEditOrDeleteSegment($segment);
$idSite = $this->checkIdSite($idSite);
$this->checkSegmentName(... | php | public function update($idSegment, $name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
{
$segment = $this->getSegmentOrFail($idSegment);
$this->checkUserCanEditOrDeleteSegment($segment);
$idSite = $this->checkIdSite($idSite);
$this->checkSegmentName(... | [
"public",
"function",
"update",
"(",
"$",
"idSegment",
",",
"$",
"name",
",",
"$",
"definition",
",",
"$",
"idSite",
"=",
"false",
",",
"$",
"autoArchive",
"=",
"false",
",",
"$",
"enabledAllUsers",
"=",
"false",
")",
"{",
"$",
"segment",
"=",
"$",
"... | Modifies an existing stored segment.
@param int $idSegment The ID of the stored segment to modify.
@param string $name The new name of the segment.
@param string $definition The new definition of the segment.
@param bool $idSite If supplied, associates the stored segment with as single site.
@param bool $autoArchive W... | [
"Modifies",
"an",
"existing",
"stored",
"segment",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SegmentEditor/API.php#L229-L262 |
209,180 | matomo-org/matomo | plugins/SegmentEditor/API.php | API.add | public function add($name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
{
$this->checkUserCanAddNewSegment($idSite);
$idSite = $this->checkIdSite($idSite);
$this->checkSegmentName($name);
$definition = $this->checkSegmentValue($definition, $idSite);
... | php | public function add($name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
{
$this->checkUserCanAddNewSegment($idSite);
$idSite = $this->checkIdSite($idSite);
$this->checkSegmentName($name);
$definition = $this->checkSegmentValue($definition, $idSite);
... | [
"public",
"function",
"add",
"(",
"$",
"name",
",",
"$",
"definition",
",",
"$",
"idSite",
"=",
"false",
",",
"$",
"autoArchive",
"=",
"false",
",",
"$",
"enabledAllUsers",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"checkUserCanAddNewSegment",
"(",
"$",... | Adds a new stored segment.
@param string $name The new name of the segment.
@param string $definition The new definition of the segment.
@param bool $idSite If supplied, associates the stored segment with as single site.
@param bool $autoArchive Whether to automatically archive data with the segment or not.
@param boo... | [
"Adds",
"a",
"new",
"stored",
"segment",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SegmentEditor/API.php#L275-L298 |
209,181 | matomo-org/matomo | plugins/SegmentEditor/API.php | API.get | public function get($idSegment)
{
Piwik::checkUserHasSomeViewAccess();
if (!is_numeric($idSegment)) {
throw new Exception("idSegment should be numeric.");
}
$segment = $this->getModel()->getSegment($idSegment);
if (empty($segment)) {
return false;
... | php | public function get($idSegment)
{
Piwik::checkUserHasSomeViewAccess();
if (!is_numeric($idSegment)) {
throw new Exception("idSegment should be numeric.");
}
$segment = $this->getModel()->getSegment($idSegment);
if (empty($segment)) {
return false;
... | [
"public",
"function",
"get",
"(",
"$",
"idSegment",
")",
"{",
"Piwik",
"::",
"checkUserHasSomeViewAccess",
"(",
")",
";",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"idSegment",
")",
")",
"{",
"throw",
"new",
"Exception",
"(",
"\"idSegment should be numeric.\"",
... | Returns a stored segment by ID
@param $idSegment
@throws Exception
@return bool | [
"Returns",
"a",
"stored",
"segment",
"by",
"ID"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SegmentEditor/API.php#L307-L335 |
209,182 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setType | public function setType($type)
{
$allowed = array(
Zend_Mime::MULTIPART_ALTERNATIVE,
Zend_Mime::MULTIPART_MIXED,
Zend_Mime::MULTIPART_RELATED,
);
if (!in_array($type, $allowed)) {
/**
* @see Zend_Mail_Exception
*/
... | php | public function setType($type)
{
$allowed = array(
Zend_Mime::MULTIPART_ALTERNATIVE,
Zend_Mime::MULTIPART_MIXED,
Zend_Mime::MULTIPART_RELATED,
);
if (!in_array($type, $allowed)) {
/**
* @see Zend_Mail_Exception
*/
... | [
"public",
"function",
"setType",
"(",
"$",
"type",
")",
"{",
"$",
"allowed",
"=",
"array",
"(",
"Zend_Mime",
"::",
"MULTIPART_ALTERNATIVE",
",",
"Zend_Mime",
"::",
"MULTIPART_MIXED",
",",
"Zend_Mime",
"::",
"MULTIPART_RELATED",
",",
")",
";",
"if",
"(",
"!",... | Set content type
Should only be used for manually setting multipart content types.
@param string $type Content type
@return Zend_Mail Implements fluent interface
@throws Zend_Mail_Exception for types not supported by Zend_Mime | [
"Set",
"content",
"type"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L240-L257 |
209,183 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setHeaderEncoding | public function setHeaderEncoding($encoding)
{
$allowed = array(
Zend_Mime::ENCODING_BASE64,
Zend_Mime::ENCODING_QUOTEDPRINTABLE
);
if (!in_array($encoding, $allowed)) {
/**
* @see Zend_Mail_Exception
*/
// require_onc... | php | public function setHeaderEncoding($encoding)
{
$allowed = array(
Zend_Mime::ENCODING_BASE64,
Zend_Mime::ENCODING_QUOTEDPRINTABLE
);
if (!in_array($encoding, $allowed)) {
/**
* @see Zend_Mail_Exception
*/
// require_onc... | [
"public",
"function",
"setHeaderEncoding",
"(",
"$",
"encoding",
")",
"{",
"$",
"allowed",
"=",
"array",
"(",
"Zend_Mime",
"::",
"ENCODING_BASE64",
",",
"Zend_Mime",
"::",
"ENCODING_QUOTEDPRINTABLE",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"$",
"encoding",
... | Set the encoding of mail headers
@param string $encoding Zend_Mime::ENCODING_QUOTEDPRINTABLE or Zend_Mime::ENCODING_BASE64
@return Zend_Mail Provides fluent interface | [
"Set",
"the",
"encoding",
"of",
"mail",
"headers"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L335-L351 |
209,184 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setBodyText | public function setBodyText($txt, $charset = null, $encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE)
{
if ($charset === null) {
$charset = $this->_charset;
}
$mp = new Zend_Mime_Part($txt);
$mp->encoding = $encoding;
$mp->type = Zend_Mime::TYPE_TEXT;
$mp->... | php | public function setBodyText($txt, $charset = null, $encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE)
{
if ($charset === null) {
$charset = $this->_charset;
}
$mp = new Zend_Mime_Part($txt);
$mp->encoding = $encoding;
$mp->type = Zend_Mime::TYPE_TEXT;
$mp->... | [
"public",
"function",
"setBodyText",
"(",
"$",
"txt",
",",
"$",
"charset",
"=",
"null",
",",
"$",
"encoding",
"=",
"Zend_Mime",
"::",
"ENCODING_QUOTEDPRINTABLE",
")",
"{",
"if",
"(",
"$",
"charset",
"===",
"null",
")",
"{",
"$",
"charset",
"=",
"$",
"t... | Sets the text body for the message.
@param string $txt
@param string $charset
@param string $encoding
@return Zend_Mail Provides fluent interface | [
"Sets",
"the",
"text",
"body",
"for",
"the",
"message",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L361-L376 |
209,185 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.getBodyText | public function getBodyText($textOnly = false)
{
if ($textOnly && $this->_bodyText) {
$body = $this->_bodyText;
return $body->getContent();
}
return $this->_bodyText;
} | php | public function getBodyText($textOnly = false)
{
if ($textOnly && $this->_bodyText) {
$body = $this->_bodyText;
return $body->getContent();
}
return $this->_bodyText;
} | [
"public",
"function",
"getBodyText",
"(",
"$",
"textOnly",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"textOnly",
"&&",
"$",
"this",
"->",
"_bodyText",
")",
"{",
"$",
"body",
"=",
"$",
"this",
"->",
"_bodyText",
";",
"return",
"$",
"body",
"->",
"getCon... | Return text body Zend_Mime_Part or string
@param bool textOnly Whether to return just the body text content or the MIME part; defaults to false, the MIME part
@return false|Zend_Mime_Part|string | [
"Return",
"text",
"body",
"Zend_Mime_Part",
"or",
"string"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L384-L392 |
209,186 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.getBodyHtml | public function getBodyHtml($htmlOnly = false)
{
if ($htmlOnly && $this->_bodyHtml) {
$body = $this->_bodyHtml;
return $body->getContent();
}
return $this->_bodyHtml;
} | php | public function getBodyHtml($htmlOnly = false)
{
if ($htmlOnly && $this->_bodyHtml) {
$body = $this->_bodyHtml;
return $body->getContent();
}
return $this->_bodyHtml;
} | [
"public",
"function",
"getBodyHtml",
"(",
"$",
"htmlOnly",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"htmlOnly",
"&&",
"$",
"this",
"->",
"_bodyHtml",
")",
"{",
"$",
"body",
"=",
"$",
"this",
"->",
"_bodyHtml",
";",
"return",
"$",
"body",
"->",
"getCon... | Return Zend_Mime_Part representing body HTML
@param bool $htmlOnly Whether to return the body HTML only, or the MIME part; defaults to false, the MIME part
@return false|Zend_Mime_Part|string | [
"Return",
"Zend_Mime_Part",
"representing",
"body",
"HTML"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L425-L433 |
209,187 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.addAttachment | public function addAttachment(Zend_Mime_Part $attachment)
{
$this->addPart($attachment);
$this->hasAttachments = true;
return $this;
} | php | public function addAttachment(Zend_Mime_Part $attachment)
{
$this->addPart($attachment);
$this->hasAttachments = true;
return $this;
} | [
"public",
"function",
"addAttachment",
"(",
"Zend_Mime_Part",
"$",
"attachment",
")",
"{",
"$",
"this",
"->",
"addPart",
"(",
"$",
"attachment",
")",
";",
"$",
"this",
"->",
"hasAttachments",
"=",
"true",
";",
"return",
"$",
"this",
";",
"}"
] | Adds an existing attachment to the mail message
@param Zend_Mime_Part $attachment
@return Zend_Mail Provides fluent interface | [
"Adds",
"an",
"existing",
"attachment",
"to",
"the",
"mail",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L441-L447 |
209,188 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.createAttachment | public function createAttachment($body,
$mimeType = Zend_Mime::TYPE_OCTETSTREAM,
$disposition = Zend_Mime::DISPOSITION_ATTACHMENT,
$encoding = Zend_Mime::ENCODING_BASE64,
... | php | public function createAttachment($body,
$mimeType = Zend_Mime::TYPE_OCTETSTREAM,
$disposition = Zend_Mime::DISPOSITION_ATTACHMENT,
$encoding = Zend_Mime::ENCODING_BASE64,
... | [
"public",
"function",
"createAttachment",
"(",
"$",
"body",
",",
"$",
"mimeType",
"=",
"Zend_Mime",
"::",
"TYPE_OCTETSTREAM",
",",
"$",
"disposition",
"=",
"Zend_Mime",
"::",
"DISPOSITION_ATTACHMENT",
",",
"$",
"encoding",
"=",
"Zend_Mime",
"::",
"ENCODING_BASE64"... | Creates a Zend_Mime_Part attachment
Attachment is automatically added to the mail object after creation. The
attachment object is returned to allow for further manipulation.
@param string $body
@param string $mimeType
@param string $disposition
@param string $encoding
@param strin... | [
"Creates",
"a",
"Zend_Mime_Part",
"attachment"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L463-L479 |
209,189 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail._encodeHeader | protected function _encodeHeader($value)
{
if (Zend_Mime::isPrintable($value) === false) {
if ($this->getHeaderEncoding() === Zend_Mime::ENCODING_QUOTEDPRINTABLE) {
$value = Zend_Mime::encodeQuotedPrintableHeader($value, $this->getCharset(), Zend_Mime::LINELENGTH, Zend_Mime::LINE... | php | protected function _encodeHeader($value)
{
if (Zend_Mime::isPrintable($value) === false) {
if ($this->getHeaderEncoding() === Zend_Mime::ENCODING_QUOTEDPRINTABLE) {
$value = Zend_Mime::encodeQuotedPrintableHeader($value, $this->getCharset(), Zend_Mime::LINELENGTH, Zend_Mime::LINE... | [
"protected",
"function",
"_encodeHeader",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"Zend_Mime",
"::",
"isPrintable",
"(",
"$",
"value",
")",
"===",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getHeaderEncoding",
"(",
")",
"===",
"Zend_Mime",
"::",
... | Encode header fields
Encodes header content according to RFC1522 if it contains non-printable
characters.
@param string $value
@return string | [
"Encode",
"header",
"fields"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L500-L511 |
209,190 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail._storeHeader | protected function _storeHeader($headerName, $value, $append = false)
{
if (isset($this->_headers[$headerName])) {
$this->_headers[$headerName][] = $value;
} else {
$this->_headers[$headerName] = array($value);
}
if ($append) {
$this->_headers[$he... | php | protected function _storeHeader($headerName, $value, $append = false)
{
if (isset($this->_headers[$headerName])) {
$this->_headers[$headerName][] = $value;
} else {
$this->_headers[$headerName] = array($value);
}
if ($append) {
$this->_headers[$he... | [
"protected",
"function",
"_storeHeader",
"(",
"$",
"headerName",
",",
"$",
"value",
",",
"$",
"append",
"=",
"false",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_headers",
"[",
"$",
"headerName",
"]",
")",
")",
"{",
"$",
"this",
"->",
"... | Add a header to the message
Adds a header to this message. If append is true and the header already
exists, raises a flag indicating that the header should be appended.
@param string $headerName
@param string $value
@param bool $append | [
"Add",
"a",
"header",
"to",
"the",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L523-L535 |
209,191 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail._addRecipientAndHeader | protected function _addRecipientAndHeader($headerName, $email, $name)
{
$email = $this->_filterEmail($email);
$name = $this->_filterName($name);
// prevent duplicates
$this->_recipients[$email] = 1;
$this->_storeHeader($headerName, $this->_formatAddress($email, $name), true)... | php | protected function _addRecipientAndHeader($headerName, $email, $name)
{
$email = $this->_filterEmail($email);
$name = $this->_filterName($name);
// prevent duplicates
$this->_recipients[$email] = 1;
$this->_storeHeader($headerName, $this->_formatAddress($email, $name), true)... | [
"protected",
"function",
"_addRecipientAndHeader",
"(",
"$",
"headerName",
",",
"$",
"email",
",",
"$",
"name",
")",
"{",
"$",
"email",
"=",
"$",
"this",
"->",
"_filterEmail",
"(",
"$",
"email",
")",
";",
"$",
"name",
"=",
"$",
"this",
"->",
"_filterNa... | Helper function for adding a recipient and the corresponding header
@param string $headerName
@param string $email
@param string $name | [
"Helper",
"function",
"for",
"adding",
"a",
"recipient",
"and",
"the",
"corresponding",
"header"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L555-L562 |
209,192 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.clearHeader | public function clearHeader($headerName)
{
if (isset($this->_headers[$headerName])){
unset($this->_headers[$headerName]);
}
return $this;
} | php | public function clearHeader($headerName)
{
if (isset($this->_headers[$headerName])){
unset($this->_headers[$headerName]);
}
return $this;
} | [
"public",
"function",
"clearHeader",
"(",
"$",
"headerName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_headers",
"[",
"$",
"headerName",
"]",
")",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"_headers",
"[",
"$",
"headerName",
"]",
")",
... | Clear header from the message
@param string $headerName
@return Zend_Mail Provides fluent inter | [
"Clear",
"header",
"from",
"the",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L640-L646 |
209,193 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.clearRecipients | public function clearRecipients()
{
$this->_recipients = array();
$this->_to = array();
$this->clearHeader('To');
$this->clearHeader('Cc');
$this->clearHeader('Bcc');
return $this;
} | php | public function clearRecipients()
{
$this->_recipients = array();
$this->_to = array();
$this->clearHeader('To');
$this->clearHeader('Cc');
$this->clearHeader('Bcc');
return $this;
} | [
"public",
"function",
"clearRecipients",
"(",
")",
"{",
"$",
"this",
"->",
"_recipients",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"_to",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"clearHeader",
"(",
"'To'",
")",
";",
"$",
"this",
"->"... | Clears list of recipient email addresses
@return Zend_Mail Provides fluent interface | [
"Clears",
"list",
"of",
"recipient",
"email",
"addresses"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L653-L663 |
209,194 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setFrom | public function setFrom($email, $name = null)
{
if (null !== $this->_from) {
/**
* @see Zend_Mail_Exception
*/
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception('From Header set twice');
}
$email = $this->_... | php | public function setFrom($email, $name = null)
{
if (null !== $this->_from) {
/**
* @see Zend_Mail_Exception
*/
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception('From Header set twice');
}
$email = $this->_... | [
"public",
"function",
"setFrom",
"(",
"$",
"email",
",",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"_from",
")",
"{",
"/**\n * @see Zend_Mail_Exception\n */",
"// require_once 'Zend/Mail/Exception.php';",
... | Sets From-header and sender of the message
@param string $email
@param string $name
@return Zend_Mail Provides fluent interface
@throws Zend_Mail_Exception if called subsequent times | [
"Sets",
"From",
"-",
"header",
"and",
"sender",
"of",
"the",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L673-L689 |
209,195 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setFromToDefaultFrom | public function setFromToDefaultFrom() {
$from = self::getDefaultFrom();
if($from === null) {
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception(
'No default From Address set to use');
}
$this->setFrom($from['email'], $from['... | php | public function setFromToDefaultFrom() {
$from = self::getDefaultFrom();
if($from === null) {
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception(
'No default From Address set to use');
}
$this->setFrom($from['email'], $from['... | [
"public",
"function",
"setFromToDefaultFrom",
"(",
")",
"{",
"$",
"from",
"=",
"self",
"::",
"getDefaultFrom",
"(",
")",
";",
"if",
"(",
"$",
"from",
"===",
"null",
")",
"{",
"// require_once 'Zend/Mail/Exception.php';",
"throw",
"new",
"Zend_Mail_Exception",
"(... | Sets From-name and -email based on the defaults
@return Zend_Mail Provides fluent interface | [
"Sets",
"From",
"-",
"name",
"and",
"-",
"email",
"based",
"on",
"the",
"defaults"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L800-L811 |
209,196 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setReplyToFromDefault | public function setReplyToFromDefault() {
$replyTo = self::getDefaultReplyTo();
if($replyTo === null) {
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception(
'No default Reply-To Address set to use');
}
$this->setReplyTo($reply... | php | public function setReplyToFromDefault() {
$replyTo = self::getDefaultReplyTo();
if($replyTo === null) {
// require_once 'Zend/Mail/Exception.php';
throw new Zend_Mail_Exception(
'No default Reply-To Address set to use');
}
$this->setReplyTo($reply... | [
"public",
"function",
"setReplyToFromDefault",
"(",
")",
"{",
"$",
"replyTo",
"=",
"self",
"::",
"getDefaultReplyTo",
"(",
")",
";",
"if",
"(",
"$",
"replyTo",
"===",
"null",
")",
"{",
"// require_once 'Zend/Mail/Exception.php';",
"throw",
"new",
"Zend_Mail_Except... | Sets ReplyTo-name and -email based on the defaults
@return Zend_Mail Provides fluent interface | [
"Sets",
"ReplyTo",
"-",
"name",
"and",
"-",
"email",
"based",
"on",
"the",
"defaults"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L850-L861 |
209,197 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setReturnPath | public function setReturnPath($email)
{
if ($this->_returnPath === null) {
$email = $this->_filterEmail($email);
$this->_returnPath = $email;
$this->_storeHeader('Return-Path', $email, false);
} else {
/**
* @see Zend_Mail_Exception
... | php | public function setReturnPath($email)
{
if ($this->_returnPath === null) {
$email = $this->_filterEmail($email);
$this->_returnPath = $email;
$this->_storeHeader('Return-Path', $email, false);
} else {
/**
* @see Zend_Mail_Exception
... | [
"public",
"function",
"setReturnPath",
"(",
"$",
"email",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_returnPath",
"===",
"null",
")",
"{",
"$",
"email",
"=",
"$",
"this",
"->",
"_filterEmail",
"(",
"$",
"email",
")",
";",
"$",
"this",
"->",
"_returnPa... | Sets the Return-Path header of the message
@param string $email
@return Zend_Mail Provides fluent interface
@throws Zend_Mail_Exception if set multiple times | [
"Sets",
"the",
"Return",
"-",
"Path",
"header",
"of",
"the",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L870-L884 |
209,198 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setSubject | public function setSubject($subject)
{
if ($this->_subject === null) {
$subject = $this->_filterOther($subject);
$this->_subject = $this->_encodeHeader($subject);
$this->_storeHeader('Subject', $this->_subject);
} else {
/**
* @see Zend_Ma... | php | public function setSubject($subject)
{
if ($this->_subject === null) {
$subject = $this->_filterOther($subject);
$this->_subject = $this->_encodeHeader($subject);
$this->_storeHeader('Subject', $this->_subject);
} else {
/**
* @see Zend_Ma... | [
"public",
"function",
"setSubject",
"(",
"$",
"subject",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_subject",
"===",
"null",
")",
"{",
"$",
"subject",
"=",
"$",
"this",
"->",
"_filterOther",
"(",
"$",
"subject",
")",
";",
"$",
"this",
"->",
"_subject"... | Sets the subject of the message
@param string $subject
@return Zend_Mail Provides fluent interface
@throws Zend_Mail_Exception | [
"Sets",
"the",
"subject",
"of",
"the",
"message"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L922-L936 |
209,199 | matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail.setDate | public function setDate($date = null)
{
if ($this->_date === null) {
if ($date === null) {
$date = date('r');
} else if (is_int($date)) {
$date = date('r', $date);
} else if (is_string($date)) {
$date = strtotime($date);
... | php | public function setDate($date = null)
{
if ($this->_date === null) {
if ($date === null) {
$date = date('r');
} else if (is_int($date)) {
$date = date('r', $date);
} else if (is_string($date)) {
$date = strtotime($date);
... | [
"public",
"function",
"setDate",
"(",
"$",
"date",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_date",
"===",
"null",
")",
"{",
"if",
"(",
"$",
"date",
"===",
"null",
")",
"{",
"$",
"date",
"=",
"date",
"(",
"'r'",
")",
";",
"}",
"e... | Sets Date-header
@param timestamp|string|Zend_Date $date
@return Zend_Mail Provides fluent interface
@throws Zend_Mail_Exception if called subsequent times or wrong date format. | [
"Sets",
"Date",
"-",
"header"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L968-L1006 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.