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,700
matomo-org/matomo
core/Filesystem.php
Filesystem.checkIfFileSystemIsNFS
public static function checkIfFileSystemIsNFS() { $sessionsPath = Session::getSessionsDirectory(); // this command will display details for the filesystem that holds the $sessionsPath // path, but only if its type is NFS. if not NFS, df will return one or less lines // and the retur...
php
public static function checkIfFileSystemIsNFS() { $sessionsPath = Session::getSessionsDirectory(); // this command will display details for the filesystem that holds the $sessionsPath // path, but only if its type is NFS. if not NFS, df will return one or less lines // and the retur...
[ "public", "static", "function", "checkIfFileSystemIsNFS", "(", ")", "{", "$", "sessionsPath", "=", "Session", "::", "getSessionsDirectory", "(", ")", ";", "// this command will display details for the filesystem that holds the $sessionsPath", "// path, but only if its type is NFS. ...
Checks if the filesystem Piwik stores sessions in is NFS or not. This check is done in order to avoid using file based sessions on NFS system, since on such a filesystem file locking can make file based sessions incredibly slow. Note: In order to figure this out, we try to run the 'df' program. If the 'exec' or 'shell...
[ "Checks", "if", "the", "filesystem", "Piwik", "stores", "sessions", "in", "is", "NFS", "or", "not", ".", "This", "check", "is", "done", "in", "order", "to", "avoid", "using", "file", "based", "sessions", "on", "NFS", "system", "since", "on", "such", "a",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L129-L166
209,701
matomo-org/matomo
core/Filesystem.php
Filesystem.globr
public static function globr($sDir, $sPattern, $nFlags = null) { if (($aFiles = \_glob("$sDir/$sPattern", $nFlags)) == false) { $aFiles = array(); } if (($aDirs = \_glob("$sDir/*", GLOB_ONLYDIR)) != false) { foreach ($aDirs as $sSubDir) { if (is_link($...
php
public static function globr($sDir, $sPattern, $nFlags = null) { if (($aFiles = \_glob("$sDir/$sPattern", $nFlags)) == false) { $aFiles = array(); } if (($aDirs = \_glob("$sDir/*", GLOB_ONLYDIR)) != false) { foreach ($aDirs as $sSubDir) { if (is_link($...
[ "public", "static", "function", "globr", "(", "$", "sDir", ",", "$", "sPattern", ",", "$", "nFlags", "=", "null", ")", "{", "if", "(", "(", "$", "aFiles", "=", "\\", "_glob", "(", "\"$sDir/$sPattern\"", ",", "$", "nFlags", ")", ")", "==", "false", ...
Recursively find pathnames that match a pattern. See {@link http://php.net/manual/en/function.glob.php glob} for more info. @param string $sDir directory The directory to glob in. @param string $sPattern pattern The pattern to match paths against. @param int $nFlags `glob()` . See {@link http://php.net/manual/en/func...
[ "Recursively", "find", "pathnames", "that", "match", "a", "pattern", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L179-L196
209,702
matomo-org/matomo
core/Filesystem.php
Filesystem.unlinkRecursive
public static function unlinkRecursive($dir, $deleteRootToo, \Closure $beforeUnlink = null) { if (!$dh = @opendir($dir)) { return; } while (false !== ($obj = readdir($dh))) { if ($obj == '.' || $obj == '..') { continue; } $path...
php
public static function unlinkRecursive($dir, $deleteRootToo, \Closure $beforeUnlink = null) { if (!$dh = @opendir($dir)) { return; } while (false !== ($obj = readdir($dh))) { if ($obj == '.' || $obj == '..') { continue; } $path...
[ "public", "static", "function", "unlinkRecursive", "(", "$", "dir", ",", "$", "deleteRootToo", ",", "\\", "Closure", "$", "beforeUnlink", "=", "null", ")", "{", "if", "(", "!", "$", "dh", "=", "@", "opendir", "(", "$", "dir", ")", ")", "{", "return",...
Recursively deletes a directory. @param string $dir Path of the directory to delete. @param boolean $deleteRootToo If true, `$dir` is deleted, otherwise just its contents. @param \Closure|false $beforeUnlink An optional closure to execute on a file path before unlinking. @api
[ "Recursively", "deletes", "a", "directory", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L206-L230
209,703
matomo-org/matomo
core/Filesystem.php
Filesystem.unlinkTargetFilesNotPresentInSource
public static function unlinkTargetFilesNotPresentInSource($source, $target) { $diff = self::directoryDiff($source, $target); $diff = self::sortFilesDescByPathLength($diff); foreach ($diff as $file) { $remove = $target . $file; if (is_dir($remove)) { ...
php
public static function unlinkTargetFilesNotPresentInSource($source, $target) { $diff = self::directoryDiff($source, $target); $diff = self::sortFilesDescByPathLength($diff); foreach ($diff as $file) { $remove = $target . $file; if (is_dir($remove)) { ...
[ "public", "static", "function", "unlinkTargetFilesNotPresentInSource", "(", "$", "source", ",", "$", "target", ")", "{", "$", "diff", "=", "self", "::", "directoryDiff", "(", "$", "source", ",", "$", "target", ")", ";", "$", "diff", "=", "self", "::", "s...
Removes all files and directories that are present in the target directory but are not in the source directory. @param string $source Path to the source directory @param string $target Path to the target
[ "Removes", "all", "files", "and", "directories", "that", "are", "present", "in", "the", "target", "directory", "but", "are", "not", "in", "the", "source", "directory", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L238-L252
209,704
matomo-org/matomo
core/Filesystem.php
Filesystem.getFileSize
public static function getFileSize($pathToFile, $unit = 'B') { $unit = strtoupper($unit); $units = array('TB' => pow(1024, 4), 'GB' => pow(1024, 3), 'MB' => pow(1024, 2), 'KB' => 1024, 'B' => 1); if...
php
public static function getFileSize($pathToFile, $unit = 'B') { $unit = strtoupper($unit); $units = array('TB' => pow(1024, 4), 'GB' => pow(1024, 3), 'MB' => pow(1024, 2), 'KB' => 1024, 'B' => 1); if...
[ "public", "static", "function", "getFileSize", "(", "$", "pathToFile", ",", "$", "unit", "=", "'B'", ")", "{", "$", "unit", "=", "strtoupper", "(", "$", "unit", ")", ";", "$", "units", "=", "array", "(", "'TB'", "=>", "pow", "(", "1024", ",", "4", ...
Get the size of a file in the specified unit. @param string $pathToFile @param string $unit eg 'B' for Byte, 'KB', 'MB', 'GB', 'TB'. @return float|null Returns null if file does not exist or the size of the file in the specified unit @throws Exception In case the unit is invalid
[ "Get", "the", "size", "of", "a", "file", "in", "the", "specified", "unit", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L413-L435
209,705
matomo-org/matomo
core/FrontController.php
FrontController.dispatch
public function dispatch($module = null, $action = null, $parameters = null) { if (self::$enableDispatch === false) { return; } $filter = new Router(); $redirection = $filter->filterUrl(Url::getCurrentUrl()); if ($redirection !== null) { Url::redirect...
php
public function dispatch($module = null, $action = null, $parameters = null) { if (self::$enableDispatch === false) { return; } $filter = new Router(); $redirection = $filter->filterUrl(Url::getCurrentUrl()); if ($redirection !== null) { Url::redirect...
[ "public", "function", "dispatch", "(", "$", "module", "=", "null", ",", "$", "action", "=", "null", ",", "$", "parameters", "=", "null", ")", "{", "if", "(", "self", "::", "$", "enableDispatch", "===", "false", ")", "{", "return", ";", "}", "$", "f...
Executes the requested plugin controller method. @throws Exception|\Piwik\Exception\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist, there is not enough permission, etc. @param string $module The name of the plugin whose controller to execute, eg, `'UserCountryMap'`. @param strin...
[ "Executes", "the", "requested", "plugin", "controller", "method", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FrontController.php#L151-L189
209,706
matomo-org/matomo
core/FrontController.php
FrontController.fetchDispatch
public function fetchDispatch($module = null, $actionName = null, $parameters = null) { ob_start(); $output = $this->dispatch($module, $actionName, $parameters); // if nothing returned we try to load something that was printed on the screen if (empty($output)) { $output =...
php
public function fetchDispatch($module = null, $actionName = null, $parameters = null) { ob_start(); $output = $this->dispatch($module, $actionName, $parameters); // if nothing returned we try to load something that was printed on the screen if (empty($output)) { $output =...
[ "public", "function", "fetchDispatch", "(", "$", "module", "=", "null", ",", "$", "actionName", "=", "null", ",", "$", "parameters", "=", "null", ")", "{", "ob_start", "(", ")", ";", "$", "output", "=", "$", "this", "->", "dispatch", "(", "$", "modul...
Executes the requested plugin controller method and returns the data, capturing anything the method `echo`s. _Note: If the plugin controller returns something, the return value is returned instead of whatever is in the output buffer._ @param string $module The name of the plugin whose controller to execute, eg, `'Use...
[ "Executes", "the", "requested", "plugin", "controller", "method", "and", "returns", "the", "data", "capturing", "anything", "the", "method", "echo", "s", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FrontController.php#L204-L217
209,707
matomo-org/matomo
core/FrontController.php
FrontController.throwIfPiwikVersionIsOlderThanDBSchema
private function throwIfPiwikVersionIsOlderThanDBSchema() { // When developing this situation happens often when switching branches if (Development::isEnabled()) { return; } if (!StaticContainer::get('EnableDbVersionCheck')) { return; } $upda...
php
private function throwIfPiwikVersionIsOlderThanDBSchema() { // When developing this situation happens often when switching branches if (Development::isEnabled()) { return; } if (!StaticContainer::get('EnableDbVersionCheck')) { return; } $upda...
[ "private", "function", "throwIfPiwikVersionIsOlderThanDBSchema", "(", ")", "{", "// When developing this situation happens often when switching branches", "if", "(", "Development", "::", "isEnabled", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", "StaticContainer...
This method ensures that Piwik Platform cannot be running when using a NEWER database.
[ "This", "method", "ensures", "that", "Piwik", "Platform", "cannot", "be", "running", "when", "using", "a", "NEWER", "database", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FrontController.php#L622-L646
209,708
matomo-org/matomo
plugins/API/DataTable/MergeDataTables.php
MergeDataTables.mergeDataTables
public function mergeDataTables($table1, $table2) { // handle table arrays if ($table1 instanceof DataTable\Map && $table2 instanceof DataTable\Map) { $subTables2 = $table2->getDataTables(); foreach ($table1->getDataTables() as $index => $subTable1) { if (!arr...
php
public function mergeDataTables($table1, $table2) { // handle table arrays if ($table1 instanceof DataTable\Map && $table2 instanceof DataTable\Map) { $subTables2 = $table2->getDataTables(); foreach ($table1->getDataTables() as $index => $subTable1) { if (!arr...
[ "public", "function", "mergeDataTables", "(", "$", "table1", ",", "$", "table2", ")", "{", "// handle table arrays", "if", "(", "$", "table1", "instanceof", "DataTable", "\\", "Map", "&&", "$", "table2", "instanceof", "DataTable", "\\", "Map", ")", "{", "$",...
Merge the columns of two data tables. Manipulates the first table. @param DataTable|DataTable\Map $table1 The table to eventually filter. @param DataTable|DataTable\Map $table2 Whether to delete rows with no visits or not.
[ "Merge", "the", "columns", "of", "two", "data", "tables", ".", "Manipulates", "the", "first", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/API/DataTable/MergeDataTables.php#L24-L53
209,709
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.initMaildir
public static function initMaildir($dir) { if (file_exists($dir)) { if (!is_dir($dir)) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_Exce...
php
public static function initMaildir($dir) { if (file_exists($dir)) { if (!is_dir($dir)) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_Exce...
[ "public", "static", "function", "initMaildir", "(", "$", "dir", ")", "{", "if", "(", "file_exists", "(", "$", "dir", ")", ")", "{", "if", "(", "!", "is_dir", "(", "$", "dir", ")", ")", "{", "/**\n * @see Zend_Mail_Storage_Exception\n ...
create a new maildir If the given dir is already a valid maildir this will not fail. @param string $dir directory for the new maildir (may already exist) @return null @throws Zend_Mail_Storage_Exception
[ "create", "a", "new", "maildir" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L62-L101
209,710
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir._createUniqueId
protected function _createUniqueId() { $id = ''; $id .= function_exists('microtime') ? microtime(true) : (time() . ' ' . rand(0, 100000)); $id .= '.' . (function_exists('posix_getpid') ? posix_getpid() : rand(50, 65535)); $id .= '.' . php_uname('n'); return $id; }
php
protected function _createUniqueId() { $id = ''; $id .= function_exists('microtime') ? microtime(true) : (time() . ' ' . rand(0, 100000)); $id .= '.' . (function_exists('posix_getpid') ? posix_getpid() : rand(50, 65535)); $id .= '.' . php_uname('n'); return $id; }
[ "protected", "function", "_createUniqueId", "(", ")", "{", "$", "id", "=", "''", ";", "$", "id", ".=", "function_exists", "(", "'microtime'", ")", "?", "microtime", "(", "true", ")", ":", "(", "time", "(", ")", ".", "' '", ".", "rand", "(", "0", ",...
create a uniqueid for maildir filename This is nearly the format defined in the maildir standard. The microtime() call should already create a uniqueid, the pid is for multicore/-cpu machine that manage to call this function at the exact same time, and uname() gives us the hostname for multiple machines accessing the ...
[ "create", "a", "uniqueid", "for", "maildir", "filename" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L412-L420
209,711
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir._createTmpFile
protected function _createTmpFile($folder = 'INBOX') { if ($folder == 'INBOX') { $tmpdir = $this->_rootdir . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; } else { $tmpdir = $this->_rootdir . '.' . $folder . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; } ...
php
protected function _createTmpFile($folder = 'INBOX') { if ($folder == 'INBOX') { $tmpdir = $this->_rootdir . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; } else { $tmpdir = $this->_rootdir . '.' . $folder . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; } ...
[ "protected", "function", "_createTmpFile", "(", "$", "folder", "=", "'INBOX'", ")", "{", "if", "(", "$", "folder", "==", "'INBOX'", ")", "{", "$", "tmpdir", "=", "$", "this", "->", "_rootdir", ".", "DIRECTORY_SEPARATOR", ".", "'tmp'", ".", "DIRECTORY_SEPAR...
open a temporary maildir file makes sure tmp/ exists and create a file with a unique name you should close the returned filehandle! @param string $folder name of current folder without leading . @return array array('dirname' => dir of maildir folder, 'uniq' => unique id, 'filename' => name of create file 'handle' ...
[ "open", "a", "temporary", "maildir", "file" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L433-L486
209,712
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir._getInfoString
protected function _getInfoString(&$flags) { // accessing keys is easier, faster and it removes duplicated flags $wanted_flags = array_flip($flags); if (isset($wanted_flags[Zend_Mail_Storage::FLAG_RECENT])) { /** * @see Zend_Mail_Storage_Exception */ ...
php
protected function _getInfoString(&$flags) { // accessing keys is easier, faster and it removes duplicated flags $wanted_flags = array_flip($flags); if (isset($wanted_flags[Zend_Mail_Storage::FLAG_RECENT])) { /** * @see Zend_Mail_Storage_Exception */ ...
[ "protected", "function", "_getInfoString", "(", "&", "$", "flags", ")", "{", "// accessing keys is easier, faster and it removes duplicated flags", "$", "wanted_flags", "=", "array_flip", "(", "$", "flags", ")", ";", "if", "(", "isset", "(", "$", "wanted_flags", "["...
create an info string for filenames with given flags @param array $flags wanted flags, with the reference you'll get the set flags with correct key (= char for flag) @return string info string for version 2 filenames including the leading colon @throws Zend_Mail_Storage_Exception
[ "create", "an", "info", "string", "for", "filenames", "with", "given", "flags" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L495-L528
209,713
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.copyMessage
public function copyMessage($id, $folder) { if ($this->_quota && $this->checkQuota()) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_Exception('storage is over quota!'); ...
php
public function copyMessage($id, $folder) { if ($this->_quota && $this->checkQuota()) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_Exception('storage is over quota!'); ...
[ "public", "function", "copyMessage", "(", "$", "id", ",", "$", "folder", ")", "{", "if", "(", "$", "this", "->", "_quota", "&&", "$", "this", "->", "checkQuota", "(", ")", ")", "{", "/**\n * @see Zend_Mail_Storage_Exception\n */", "// req...
copy an existing message @param int $id number of message @param string|Zend_Mail_Storage_Folder $folder name or instance of targer folder @return null @throws Zend_Mail_Storage_Exception
[ "copy", "an", "existing", "message" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L615-L684
209,714
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.setFlags
public function setFlags($id, $flags) { $info = $this->_getInfoString($flags); $filedata = $this->_getFileData($id); // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur. $new_filename = dirname(dirname($...
php
public function setFlags($id, $flags) { $info = $this->_getInfoString($flags); $filedata = $this->_getFileData($id); // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur. $new_filename = dirname(dirname($...
[ "public", "function", "setFlags", "(", "$", "id", ",", "$", "flags", ")", "{", "$", "info", "=", "$", "this", "->", "_getInfoString", "(", "$", "flags", ")", ";", "$", "filedata", "=", "$", "this", "->", "_getFileData", "(", "$", "id", ")", ";", ...
set flags for message NOTE: this method can't set the recent flag. @param int $id number of message @param array $flags new flags for message @throws Zend_Mail_Storage_Exception
[ "set", "flags", "for", "message" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L761-L781
209,715
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.removeMessage
public function removeMessage($id) { $filename = $this->_getFileData($id, 'filename'); if ($this->_quota) { $size = filesize($filename); } if (!@unlink($filename)) { /** * @see Zend_Mail_Storage_Exception */ // require_o...
php
public function removeMessage($id) { $filename = $this->_getFileData($id, 'filename'); if ($this->_quota) { $size = filesize($filename); } if (!@unlink($filename)) { /** * @see Zend_Mail_Storage_Exception */ // require_o...
[ "public", "function", "removeMessage", "(", "$", "id", ")", "{", "$", "filename", "=", "$", "this", "->", "_getFileData", "(", "$", "id", ",", "'filename'", ")", ";", "if", "(", "$", "this", "->", "_quota", ")", "{", "$", "size", "=", "filesize", "...
stub for not supported message deletion @return null @throws Zend_Mail_Storage_Exception
[ "stub", "for", "not", "supported", "message", "deletion" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L790-L811
209,716
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.getQuota
public function getQuota($fromStorage = false) { if ($fromStorage) { $fh = @fopen($this->_rootdir . 'maildirsize', 'r'); if (!$fh) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.ph...
php
public function getQuota($fromStorage = false) { if ($fromStorage) { $fh = @fopen($this->_rootdir . 'maildirsize', 'r'); if (!$fh) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.ph...
[ "public", "function", "getQuota", "(", "$", "fromStorage", "=", "false", ")", "{", "if", "(", "$", "fromStorage", ")", "{", "$", "fh", "=", "@", "fopen", "(", "$", "this", "->", "_rootdir", ".", "'maildirsize'", ",", "'r'", ")", ";", "if", "(", "!"...
get currently set quota @see Zend_Mail_Storage_Writable_Maildir::setQuota() @return bool|array
[ "get", "currently", "set", "quota" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L835-L860
209,717
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.checkQuota
public function checkQuota($detailedResponse = false, $forceRecalc = false) { $result = $this->_calculateQuota($forceRecalc); return $detailedResponse ? $result : $result['over_quota']; }
php
public function checkQuota($detailedResponse = false, $forceRecalc = false) { $result = $this->_calculateQuota($forceRecalc); return $detailedResponse ? $result : $result['over_quota']; }
[ "public", "function", "checkQuota", "(", "$", "detailedResponse", "=", "false", ",", "$", "forceRecalc", "=", "false", ")", "{", "$", "result", "=", "$", "this", "->", "_calculateQuota", "(", "$", "forceRecalc", ")", ";", "return", "$", "detailedResponse", ...
check if storage is currently over quota @param bool $detailedResponse return known data of quota and current size and message count @see _calculateQuota() @return bool|array over quota state or detailed response
[ "check", "if", "storage", "is", "currently", "over", "quota" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L1045-L1048
209,718
matomo-org/matomo
plugins/Live/Visualizations/VisitorLog.php
VisitorLog.beforeRender
public function beforeRender() { $this->config->show_as_content_block = false; $this->config->title = Piwik::translate('Live_VisitorLog'); $this->config->disable_row_actions = true; $this->config->datatable_js_type = 'VisitorLog'; $this->config->enable_sort = false; ...
php
public function beforeRender() { $this->config->show_as_content_block = false; $this->config->title = Piwik::translate('Live_VisitorLog'); $this->config->disable_row_actions = true; $this->config->datatable_js_type = 'VisitorLog'; $this->config->enable_sort = false; ...
[ "public", "function", "beforeRender", "(", ")", "{", "$", "this", "->", "config", "->", "show_as_content_block", "=", "false", ";", "$", "this", "->", "config", "->", "title", "=", "Piwik", "::", "translate", "(", "'Live_VisitorLog'", ")", ";", "$", "this"...
Configure visualization.
[ "Configure", "visualization", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Live/Visualizations/VisitorLog.php#L78-L130
209,719
matomo-org/matomo
plugins/LanguagesManager/LanguagesManager.php
LanguagesManager.getLanguagesSelector
public function getLanguagesSelector() { $view = new View("@LanguagesManager/getLanguagesSelector"); $view->languages = API::getInstance()->getAvailableLanguageNames(); $view->currentLanguageCode = self::getLanguageCodeForCurrentUser(); $view->currentLanguageName = self::getLanguageN...
php
public function getLanguagesSelector() { $view = new View("@LanguagesManager/getLanguagesSelector"); $view->languages = API::getInstance()->getAvailableLanguageNames(); $view->currentLanguageCode = self::getLanguageCodeForCurrentUser(); $view->currentLanguageName = self::getLanguageN...
[ "public", "function", "getLanguagesSelector", "(", ")", "{", "$", "view", "=", "new", "View", "(", "\"@LanguagesManager/getLanguagesSelector\"", ")", ";", "$", "view", "->", "languages", "=", "API", "::", "getInstance", "(", ")", "->", "getAvailableLanguageNames",...
Renders and returns the language selector HTML. @return string
[ "Renders", "and", "returns", "the", "language", "selector", "HTML", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/LanguagesManager.php#L85-L92
209,720
matomo-org/matomo
plugins/LanguagesManager/LanguagesManager.php
LanguagesManager.getLanguageForSession
public static function getLanguageForSession() { $cookieName = Config::getInstance()->General['language_cookie_name']; $cookie = new Cookie($cookieName); if ($cookie->isCookieFound()) { return $cookie->get('language'); } return null; }
php
public static function getLanguageForSession() { $cookieName = Config::getInstance()->General['language_cookie_name']; $cookie = new Cookie($cookieName); if ($cookie->isCookieFound()) { return $cookie->get('language'); } return null; }
[ "public", "static", "function", "getLanguageForSession", "(", ")", "{", "$", "cookieName", "=", "Config", "::", "getInstance", "(", ")", "->", "General", "[", "'language_cookie_name'", "]", ";", "$", "cookie", "=", "new", "Cookie", "(", "$", "cookieName", ")...
Returns the language for the session @return string|null
[ "Returns", "the", "language", "for", "the", "session" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/LanguagesManager.php#L201-L209
209,721
matomo-org/matomo
plugins/LanguagesManager/LanguagesManager.php
LanguagesManager.setLanguageForSession
public static function setLanguageForSession($languageCode) { if (!API::getInstance()->isLanguageAvailable($languageCode)) { return false; } $cookieName = Config::getInstance()->General['language_cookie_name']; $cookie = new Cookie($cookieName, 0); $cookie->set('...
php
public static function setLanguageForSession($languageCode) { if (!API::getInstance()->isLanguageAvailable($languageCode)) { return false; } $cookieName = Config::getInstance()->General['language_cookie_name']; $cookie = new Cookie($cookieName, 0); $cookie->set('...
[ "public", "static", "function", "setLanguageForSession", "(", "$", "languageCode", ")", "{", "if", "(", "!", "API", "::", "getInstance", "(", ")", "->", "isLanguageAvailable", "(", "$", "languageCode", ")", ")", "{", "return", "false", ";", "}", "$", "cook...
Set the language for the session @param string $languageCode ISO language code @return bool
[ "Set", "the", "language", "for", "the", "session" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/LanguagesManager.php#L217-L229
209,722
matomo-org/matomo
plugins/PrivacyManager/Tracker/RequestProcessor.php
RequestProcessor.anonymizeUserId
public static function anonymizeUserId($userId) { $trackerCache = Tracker\Cache::getCacheGeneral(); $salt = ''; if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) { $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT]; } if(empty($salt)) { ...
php
public static function anonymizeUserId($userId) { $trackerCache = Tracker\Cache::getCacheGeneral(); $salt = ''; if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) { $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT]; } if(empty($salt)) { ...
[ "public", "static", "function", "anonymizeUserId", "(", "$", "userId", ")", "{", "$", "trackerCache", "=", "Tracker", "\\", "Cache", "::", "getCacheGeneral", "(", ")", ";", "$", "salt", "=", "''", ";", "if", "(", "!", "empty", "(", "$", "trackerCache", ...
pseudo anonymization as we need to make sure to always generate the same UserId for the same original UserID @param $userId @return string
[ "pseudo", "anonymization", "as", "we", "need", "to", "make", "sure", "to", "always", "generate", "the", "same", "UserId", "for", "the", "same", "original", "UserID" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/Tracker/RequestProcessor.php#L47-L58
209,723
matomo-org/matomo
core/Console.php
Console.getAvailableCommands
private function getAvailableCommands() { $commands = $this->getDefaultPiwikCommands(); $detected = PluginManager::getInstance()->findMultipleComponents('Commands', 'Piwik\\Plugin\\ConsoleCommand'); $commands = array_merge($commands, $detected); /** * Triggered to filter /...
php
private function getAvailableCommands() { $commands = $this->getDefaultPiwikCommands(); $detected = PluginManager::getInstance()->findMultipleComponents('Commands', 'Piwik\\Plugin\\ConsoleCommand'); $commands = array_merge($commands, $detected); /** * Triggered to filter /...
[ "private", "function", "getAvailableCommands", "(", ")", "{", "$", "commands", "=", "$", "this", "->", "getDefaultPiwikCommands", "(", ")", ";", "$", "detected", "=", "PluginManager", "::", "getInstance", "(", ")", "->", "findMultipleComponents", "(", "'Commands...
Returns a list of available command classnames. @return string[]
[ "Returns", "a", "list", "of", "available", "command", "classnames", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Console.php#L133-L161
209,724
matomo-org/matomo
plugins/DevicePlugins/DevicePlugins.php
DevicePlugins.getAllPluginColumns
public static function getAllPluginColumns() { $cacheId = CacheId::pluginAware('DevicePluginColumns'); $cache = Cache::getTransientCache(); if (!$cache->contains($cacheId)) { $instances = []; foreach (self::getAllDevicePluginsColumnClasses() as $className) { ...
php
public static function getAllPluginColumns() { $cacheId = CacheId::pluginAware('DevicePluginColumns'); $cache = Cache::getTransientCache(); if (!$cache->contains($cacheId)) { $instances = []; foreach (self::getAllDevicePluginsColumnClasses() as $className) { ...
[ "public", "static", "function", "getAllPluginColumns", "(", ")", "{", "$", "cacheId", "=", "CacheId", "::", "pluginAware", "(", "'DevicePluginColumns'", ")", ";", "$", "cache", "=", "Cache", "::", "getTransientCache", "(", ")", ";", "if", "(", "!", "$", "c...
Returns all available DevicePlugins Columns @return Columns\DevicePluginColumn[] @throws \Exception
[ "Returns", "all", "available", "DevicePlugins", "Columns" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/DevicePlugins/DevicePlugins.php#L47-L63
209,725
matomo-org/matomo
plugins/Referrers/Columns/Base.php
Base.detectReferrerSearchEngine
protected function detectReferrerSearchEngine() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSearchEngine'; $cachedReferrerSearchEngine = []; if ($cache->contains($cacheKey)) { $cachedReferrerSearchEngine = $cache->fetch($cacheKey); ...
php
protected function detectReferrerSearchEngine() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSearchEngine'; $cachedReferrerSearchEngine = []; if ($cache->contains($cacheKey)) { $cachedReferrerSearchEngine = $cache->fetch($cacheKey); ...
[ "protected", "function", "detectReferrerSearchEngine", "(", ")", "{", "$", "cache", "=", "\\", "Piwik", "\\", "Cache", "::", "getTransientCache", "(", ")", ";", "$", "cacheKey", "=", "'cachedReferrerSearchEngine'", ";", "$", "cachedReferrerSearchEngine", "=", "[",...
Search engine detection @return bool
[ "Search", "engine", "detection" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Columns/Base.php#L150-L195
209,726
matomo-org/matomo
plugins/Referrers/Columns/Base.php
Base.detectReferrerSocialNetwork
protected function detectReferrerSocialNetwork() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSocialNetworks'; $cachedReferrerSocialNetworks = []; if ($cache->contains($cacheKey)) { $cachedReferrerSocialNetworks = $cache->fetch($cacheKey); ...
php
protected function detectReferrerSocialNetwork() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSocialNetworks'; $cachedReferrerSocialNetworks = []; if ($cache->contains($cacheKey)) { $cachedReferrerSocialNetworks = $cache->fetch($cacheKey); ...
[ "protected", "function", "detectReferrerSocialNetwork", "(", ")", "{", "$", "cache", "=", "\\", "Piwik", "\\", "Cache", "::", "getTransientCache", "(", ")", ";", "$", "cacheKey", "=", "'cachedReferrerSocialNetworks'", ";", "$", "cachedReferrerSocialNetworks", "=", ...
Social network detection @return bool
[ "Social", "network", "detection" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Columns/Base.php#L201-L246
209,727
matomo-org/matomo
plugins/Referrers/Columns/Base.php
Base.detectReferrerDirectEntry
protected function detectReferrerDirectEntry() { if (empty($this->referrerHost)) { return false; } $urlsByHost = $this->getCachedUrlsByHostAndIdSite(); $directEntry = new SiteUrls(); $matchingSites = $directEntry->getIdSitesMatchingUrl($this->referrerUrlParse,...
php
protected function detectReferrerDirectEntry() { if (empty($this->referrerHost)) { return false; } $urlsByHost = $this->getCachedUrlsByHostAndIdSite(); $directEntry = new SiteUrls(); $matchingSites = $directEntry->getIdSitesMatchingUrl($this->referrerUrlParse,...
[ "protected", "function", "detectReferrerDirectEntry", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "referrerHost", ")", ")", "{", "return", "false", ";", "}", "$", "urlsByHost", "=", "$", "this", "->", "getCachedUrlsByHostAndIdSite", "(", ")", ...
We have previously tried to detect the campaign variables in the URL so at this stage, if the referrer host is the current host, or if the referrer host is any of the registered URL for this website, it is considered a direct entry @return bool
[ "We", "have", "previously", "tried", "to", "detect", "the", "campaign", "variables", "in", "the", "URL", "so", "at", "this", "stage", "if", "the", "referrer", "host", "is", "the", "current", "host", "or", "if", "the", "referrer", "host", "is", "any", "of...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Columns/Base.php#L340-L372
209,728
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.distinct
public function distinct($flag = true) { $this->_parts[self::DISTINCT] = (bool) $flag; return $this; }
php
public function distinct($flag = true) { $this->_parts[self::DISTINCT] = (bool) $flag; return $this; }
[ "public", "function", "distinct", "(", "$", "flag", "=", "true", ")", "{", "$", "this", "->", "_parts", "[", "self", "::", "DISTINCT", "]", "=", "(", "bool", ")", "$", "flag", ";", "return", "$", "this", ";", "}" ]
Makes the query SELECT DISTINCT. @param bool $flag Whether or not the SELECT is DISTINCT (default true). @return Zend_Db_Select This Zend_Db_Select object.
[ "Makes", "the", "query", "SELECT", "DISTINCT", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L198-L202
209,729
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.columns
public function columns($cols = '*', $correlationName = null) { if ($correlationName === null && count($this->_parts[self::FROM])) { $correlationNameKeys = array_keys($this->_parts[self::FROM]); $correlationName = current($correlationNameKeys); } if (!array_key_exist...
php
public function columns($cols = '*', $correlationName = null) { if ($correlationName === null && count($this->_parts[self::FROM])) { $correlationNameKeys = array_keys($this->_parts[self::FROM]); $correlationName = current($correlationNameKeys); } if (!array_key_exist...
[ "public", "function", "columns", "(", "$", "cols", "=", "'*'", ",", "$", "correlationName", "=", "null", ")", "{", "if", "(", "$", "correlationName", "===", "null", "&&", "count", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", "]", ")",...
Specifies the columns used in the FROM clause. The parameter can be a single string or Zend_Db_Expr object, or else an array of strings or Zend_Db_Expr objects. @param array|string|Zend_Db_Expr $cols The columns to select from this table. @param string $correlationName Correlation name of target table. OPTIONAL @re...
[ "Specifies", "the", "columns", "used", "in", "the", "FROM", "clause", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L243-L261
209,730
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.union
public function union($select = array(), $type = self::SQL_UNION) { if (!is_array($select)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception( "union() only accepts an array of Zend_Db_Select instances of sql query strings." ...
php
public function union($select = array(), $type = self::SQL_UNION) { if (!is_array($select)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception( "union() only accepts an array of Zend_Db_Select instances of sql query strings." ...
[ "public", "function", "union", "(", "$", "select", "=", "array", "(", ")", ",", "$", "type", "=", "self", "::", "SQL_UNION", ")", "{", "if", "(", "!", "is_array", "(", "$", "select", ")", ")", "{", "// require_once 'Zend/Db/Select/Exception.php';", "throw"...
Adds a UNION clause to the query. The first parameter has to be an array of Zend_Db_Select or sql query strings. <code> $sql1 = $db->select(); $sql2 = "SELECT ..."; $select = $db->select() ->union(array($sql1, $sql2)) ->order("id"); </code> @param array $select Array of select clauses for the union. @return Zend_Db...
[ "Adds", "a", "UNION", "clause", "to", "the", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L280-L299
209,731
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.join
public function join($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->joinInner($name, $cond, $cols, $schema); }
php
public function join($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->joinInner($name, $cond, $cols, $schema); }
[ "public", "function", "join", "(", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "joinInner", "(", "$", "name", ",", "$", "cond", ",", "...
Adds a JOIN table and columns to the query. The $name and $cols parameters follow the same logic as described in the from() method. @param array|string|Zend_Db_Expr $name The table name. @param string $cond Join on this condition. @param array|string $cols The columns to select from the joined table. @param strin...
[ "Adds", "a", "JOIN", "table", "and", "columns", "to", "the", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L313-L316
209,732
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.joinLeft
public function joinLeft($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::LEFT_JOIN, $name, $cond, $cols, $schema); }
php
public function joinLeft($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::LEFT_JOIN, $name, $cond, $cols, $schema); }
[ "public", "function", "joinLeft", "(", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "_join", "(", "self", "::", "LEFT_JOIN", ",", "$", "n...
Add a LEFT OUTER JOIN table and colums to the query All rows from the left operand table are included, matching rows from the right operand table included, and the columns from the right operand table are filled with NULLs if no row exists matching the left table. The $name and $cols parameters follow the same logic a...
[ "Add", "a", "LEFT", "OUTER", "JOIN", "table", "and", "colums", "to", "the", "query", "All", "rows", "from", "the", "left", "operand", "table", "are", "included", "matching", "rows", "from", "the", "right", "operand", "table", "included", "and", "the", "col...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L355-L358
209,733
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.joinRight
public function joinRight($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::RIGHT_JOIN, $name, $cond, $cols, $schema); }
php
public function joinRight($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::RIGHT_JOIN, $name, $cond, $cols, $schema); }
[ "public", "function", "joinRight", "(", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "_join", "(", "self", "::", "RIGHT_JOIN", ",", "$", ...
Add a RIGHT OUTER JOIN table and colums to the query. Right outer join is the complement of left outer join. All rows from the right operand table are included, matching rows from the left operand table included, and the columns from the left operand table are filled with NULLs if no row exists matching the right table...
[ "Add", "a", "RIGHT", "OUTER", "JOIN", "table", "and", "colums", "to", "the", "query", ".", "Right", "outer", "join", "is", "the", "complement", "of", "left", "outer", "join", ".", "All", "rows", "from", "the", "right", "operand", "table", "are", "include...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L377-L380
209,734
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.joinFull
public function joinFull($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::FULL_JOIN, $name, $cond, $cols, $schema); }
php
public function joinFull($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::FULL_JOIN, $name, $cond, $cols, $schema); }
[ "public", "function", "joinFull", "(", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "_join", "(", "self", "::", "FULL_JOIN", ",", "$", "n...
Add a FULL OUTER JOIN table and colums to the query. A full outer join is like combining a left outer join and a right outer join. All rows from both tables are included, paired with each other on the same row of the result set if they satisfy the join condition, and otherwise paired with NULLs in place of columns fro...
[ "Add", "a", "FULL", "OUTER", "JOIN", "table", "and", "colums", "to", "the", "query", ".", "A", "full", "outer", "join", "is", "like", "combining", "a", "left", "outer", "join", "and", "a", "right", "outer", "join", ".", "All", "rows", "from", "both", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L399-L402
209,735
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.joinCross
public function joinCross($name, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::CROSS_JOIN, $name, null, $cols, $schema); }
php
public function joinCross($name, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::CROSS_JOIN, $name, null, $cols, $schema); }
[ "public", "function", "joinCross", "(", "$", "name", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "_join", "(", "self", "::", "CROSS_JOIN", ",", "$", "name", ",", "null",...
Add a CROSS JOIN table and colums to the query. A cross join is a cartesian product; there is no join condition. The $name and $cols parameters follow the same logic as described in the from() method. @param array|string|Zend_Db_Expr $name The table name. @param array|string $cols The columns to select from the joi...
[ "Add", "a", "CROSS", "JOIN", "table", "and", "colums", "to", "the", "query", ".", "A", "cross", "join", "is", "a", "cartesian", "product", ";", "there", "is", "no", "join", "condition", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L416-L419
209,736
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.where
public function where($cond, $value = null, $type = null) { $this->_parts[self::WHERE][] = $this->_where($cond, $value, $type, true); return $this; }
php
public function where($cond, $value = null, $type = null) { $this->_parts[self::WHERE][] = $this->_where($cond, $value, $type, true); return $this; }
[ "public", "function", "where", "(", "$", "cond", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "$", "this", "->", "_parts", "[", "self", "::", "WHERE", "]", "[", "]", "=", "$", "this", "->", "_where", "(", "$", "cond"...
Adds a WHERE condition to the query by AND. If a value is passed as the second param, it will be quoted and replaced into the condition wherever a question-mark appears. Array values are quoted and comma-separated. <code> // simplest but non-secure $select->where("id = $id"); // secure (ID is quoted but matched anyw...
[ "Adds", "a", "WHERE", "condition", "to", "the", "query", "by", "AND", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L473-L478
209,737
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.orWhere
public function orWhere($cond, $value = null, $type = null) { $this->_parts[self::WHERE][] = $this->_where($cond, $value, $type, false); return $this; }
php
public function orWhere($cond, $value = null, $type = null) { $this->_parts[self::WHERE][] = $this->_where($cond, $value, $type, false); return $this; }
[ "public", "function", "orWhere", "(", "$", "cond", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "$", "this", "->", "_parts", "[", "self", "::", "WHERE", "]", "[", "]", "=", "$", "this", "->", "_where", "(", "$", "con...
Adds a WHERE condition to the query by OR. Otherwise identical to where(). @param string $cond The WHERE condition. @param mixed $value OPTIONAL The value to quote into the condition. @param int $type OPTIONAL The type of the given value @return Zend_Db_Select This Zend_Db_Select object. @see where()
[ "Adds", "a", "WHERE", "condition", "to", "the", "query", "by", "OR", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L492-L497
209,738
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.group
public function group($spec) { if (!is_array($spec)) { $spec = array($spec); } foreach ($spec as $val) { if (preg_match('/\(.*\)/', (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::GROUP][] = $val; ...
php
public function group($spec) { if (!is_array($spec)) { $spec = array($spec); } foreach ($spec as $val) { if (preg_match('/\(.*\)/', (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::GROUP][] = $val; ...
[ "public", "function", "group", "(", "$", "spec", ")", "{", "if", "(", "!", "is_array", "(", "$", "spec", ")", ")", "{", "$", "spec", "=", "array", "(", "$", "spec", ")", ";", "}", "foreach", "(", "$", "spec", "as", "$", "val", ")", "{", "if",...
Adds grouping to the query. @param array|string $spec The column(s) to group by. @return Zend_Db_Select This Zend_Db_Select object.
[ "Adds", "grouping", "to", "the", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L505-L519
209,739
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.having
public function having($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_AND . " ($cond)"; } else { ...
php
public function having($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_AND . " ($cond)"; } else { ...
[ "public", "function", "having", "(", "$", "cond", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "if", "(", "$", "value", "!==", "null", ")", "{", "$", "cond", "=", "$", "this", "->", "_adapter", "->", "quoteInto", "(", ...
Adds a HAVING condition to the query by AND. If a value is passed as the second param, it will be quoted and replaced into the condition wherever a question-mark appears. See {@link where()} for an example @param string $cond The HAVING condition. @param mixed $value OPTIONAL The value to quote into the condition....
[ "Adds", "a", "HAVING", "condition", "to", "the", "query", "by", "AND", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L533-L546
209,740
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.orHaving
public function orHaving($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_OR . " ($cond)"; } else { ...
php
public function orHaving($cond, $value = null, $type = null) { if ($value !== null) { $cond = $this->_adapter->quoteInto($cond, $value, $type); } if ($this->_parts[self::HAVING]) { $this->_parts[self::HAVING][] = self::SQL_OR . " ($cond)"; } else { ...
[ "public", "function", "orHaving", "(", "$", "cond", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ")", "{", "if", "(", "$", "value", "!==", "null", ")", "{", "$", "cond", "=", "$", "this", "->", "_adapter", "->", "quoteInto", "("...
Adds a HAVING condition to the query by OR. Otherwise identical to orHaving(). @param string $cond The HAVING condition. @param mixed $value OPTIONAL The value to quote into the condition. @param int $type OPTIONAL The type of the given value @return Zend_Db_Select This Zend_Db_Select object. @see having()
[ "Adds", "a", "HAVING", "condition", "to", "the", "query", "by", "OR", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L560-L573
209,741
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.order
public function order($spec) { if (!is_array($spec)) { $spec = array($spec); } // force 'ASC' or 'DESC' on each order spec, default is ASC. foreach ($spec as $val) { if ($val instanceof Zend_Db_Expr) { $expr = $val->__toString(); ...
php
public function order($spec) { if (!is_array($spec)) { $spec = array($spec); } // force 'ASC' or 'DESC' on each order spec, default is ASC. foreach ($spec as $val) { if ($val instanceof Zend_Db_Expr) { $expr = $val->__toString(); ...
[ "public", "function", "order", "(", "$", "spec", ")", "{", "if", "(", "!", "is_array", "(", "$", "spec", ")", ")", "{", "$", "spec", "=", "array", "(", "$", "spec", ")", ";", "}", "// force 'ASC' or 'DESC' on each order spec, default is ASC.", "foreach", "...
Adds a row order to the query. @param mixed $spec The column(s) and direction to order by. @return Zend_Db_Select This Zend_Db_Select object.
[ "Adds", "a", "row", "order", "to", "the", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L581-L612
209,742
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.limit
public function limit($count = null, $offset = null) { $this->_parts[self::LIMIT_COUNT] = (int) $count; $this->_parts[self::LIMIT_OFFSET] = (int) $offset; return $this; }
php
public function limit($count = null, $offset = null) { $this->_parts[self::LIMIT_COUNT] = (int) $count; $this->_parts[self::LIMIT_OFFSET] = (int) $offset; return $this; }
[ "public", "function", "limit", "(", "$", "count", "=", "null", ",", "$", "offset", "=", "null", ")", "{", "$", "this", "->", "_parts", "[", "self", "::", "LIMIT_COUNT", "]", "=", "(", "int", ")", "$", "count", ";", "$", "this", "->", "_parts", "[...
Sets a limit count and offset to the query. @param int $count OPTIONAL The number of rows to return. @param int $offset OPTIONAL Start returning after this many rows. @return Zend_Db_Select This Zend_Db_Select object.
[ "Sets", "a", "limit", "count", "and", "offset", "to", "the", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L621-L626
209,743
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.limitPage
public function limitPage($page, $rowCount) { $page = ($page > 0) ? $page : 1; $rowCount = ($rowCount > 0) ? $rowCount : 1; $this->_parts[self::LIMIT_COUNT] = (int) $rowCount; $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1); return $this; }
php
public function limitPage($page, $rowCount) { $page = ($page > 0) ? $page : 1; $rowCount = ($rowCount > 0) ? $rowCount : 1; $this->_parts[self::LIMIT_COUNT] = (int) $rowCount; $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1); return $this; }
[ "public", "function", "limitPage", "(", "$", "page", ",", "$", "rowCount", ")", "{", "$", "page", "=", "(", "$", "page", ">", "0", ")", "?", "$", "page", ":", "1", ";", "$", "rowCount", "=", "(", "$", "rowCount", ">", "0", ")", "?", "$", "row...
Sets the limit and count by page number. @param int $page Limit results to this page number. @param int $rowCount Use this many rows per page. @return Zend_Db_Select This Zend_Db_Select object.
[ "Sets", "the", "limit", "and", "count", "by", "page", "number", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L635-L642
209,744
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.forUpdate
public function forUpdate($flag = true) { $this->_parts[self::FOR_UPDATE] = (bool) $flag; return $this; }
php
public function forUpdate($flag = true) { $this->_parts[self::FOR_UPDATE] = (bool) $flag; return $this; }
[ "public", "function", "forUpdate", "(", "$", "flag", "=", "true", ")", "{", "$", "this", "->", "_parts", "[", "self", "::", "FOR_UPDATE", "]", "=", "(", "bool", ")", "$", "flag", ";", "return", "$", "this", ";", "}" ]
Makes the query SELECT FOR UPDATE. @param bool $flag Whether or not the SELECT is FOR UPDATE (default true). @return Zend_Db_Select This Zend_Db_Select object.
[ "Makes", "the", "query", "SELECT", "FOR", "UPDATE", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L650-L654
209,745
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.getPart
public function getPart($part) { $part = strtolower($part); if (!array_key_exists($part, $this->_parts)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid Select part '$part'"); } return $this->_parts[$part]; }
php
public function getPart($part) { $part = strtolower($part); if (!array_key_exists($part, $this->_parts)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid Select part '$part'"); } return $this->_parts[$part]; }
[ "public", "function", "getPart", "(", "$", "part", ")", "{", "$", "part", "=", "strtolower", "(", "$", "part", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "part", ",", "$", "this", "->", "_parts", ")", ")", "{", "// require_once 'Zend/Db/Se...
Get part of the structured information for the currect query. @param string $part @return mixed @throws Zend_Db_Select_Exception
[ "Get", "part", "of", "the", "structured", "information", "for", "the", "currect", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L663-L671
209,746
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.query
public function query($fetchMode = null, $bind = array()) { if (!empty($bind)) { $this->bind($bind); } $stmt = $this->_adapter->query($this); if ($fetchMode == null) { $fetchMode = $this->_adapter->getFetchMode(); } $stmt->setFetchMode($fetchM...
php
public function query($fetchMode = null, $bind = array()) { if (!empty($bind)) { $this->bind($bind); } $stmt = $this->_adapter->query($this); if ($fetchMode == null) { $fetchMode = $this->_adapter->getFetchMode(); } $stmt->setFetchMode($fetchM...
[ "public", "function", "query", "(", "$", "fetchMode", "=", "null", ",", "$", "bind", "=", "array", "(", ")", ")", "{", "if", "(", "!", "empty", "(", "$", "bind", ")", ")", "{", "$", "this", "->", "bind", "(", "$", "bind", ")", ";", "}", "$", ...
Executes the current select object and returns the result @param integer $fetchMode OPTIONAL @param mixed $bind An array of data to bind to the placeholders. @return PDO_Statement|Zend_Db_Statement
[ "Executes", "the", "current", "select", "object", "and", "returns", "the", "result" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L680-L692
209,747
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.assemble
public function assemble() { $sql = self::SQL_SELECT; foreach (array_keys(self::$_partsInit) as $part) { $method = '_render' . ucfirst($part); if (method_exists($this, $method)) { $sql = $this->$method($sql); } } return $sql; }
php
public function assemble() { $sql = self::SQL_SELECT; foreach (array_keys(self::$_partsInit) as $part) { $method = '_render' . ucfirst($part); if (method_exists($this, $method)) { $sql = $this->$method($sql); } } return $sql; }
[ "public", "function", "assemble", "(", ")", "{", "$", "sql", "=", "self", "::", "SQL_SELECT", ";", "foreach", "(", "array_keys", "(", "self", "::", "$", "_partsInit", ")", "as", "$", "part", ")", "{", "$", "method", "=", "'_render'", ".", "ucfirst", ...
Converts this object to an SQL SELECT string. @return string|null This object as a SELECT string. (or null if a string cannot be produced.)
[ "Converts", "this", "object", "to", "an", "SQL", "SELECT", "string", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L699-L709
209,748
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.reset
public function reset($part = null) { if ($part == null) { $this->_parts = self::$_partsInit; } else if (array_key_exists($part, self::$_partsInit)) { $this->_parts[$part] = self::$_partsInit[$part]; } return $this; }
php
public function reset($part = null) { if ($part == null) { $this->_parts = self::$_partsInit; } else if (array_key_exists($part, self::$_partsInit)) { $this->_parts[$part] = self::$_partsInit[$part]; } return $this; }
[ "public", "function", "reset", "(", "$", "part", "=", "null", ")", "{", "if", "(", "$", "part", "==", "null", ")", "{", "$", "this", "->", "_parts", "=", "self", "::", "$", "_partsInit", ";", "}", "else", "if", "(", "array_key_exists", "(", "$", ...
Clear parts of the Select object, or an individual part. @param string $part OPTIONAL @return Zend_Db_Select
[ "Clear", "parts", "of", "the", "Select", "object", "or", "an", "individual", "part", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L717-L725
209,749
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._joinUsing
public function _joinUsing($type, $name, $cond, $cols = '*', $schema = null) { if (empty($this->_parts[self::FROM])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("You can only perform a joinUsing after specifying a FROM table"); } ...
php
public function _joinUsing($type, $name, $cond, $cols = '*', $schema = null) { if (empty($this->_parts[self::FROM])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("You can only perform a joinUsing after specifying a FROM table"); } ...
[ "public", "function", "_joinUsing", "(", "$", "type", ",", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "'*'", ",", "$", "schema", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", ...
Handle JOIN... USING... syntax This is functionality identical to the existing JOIN methods, however the join condition can be passed as a single column name. This method then completes the ON condition by using the same field for the FROM table and the JOIN table. <code> $select = $db->select()->from('table1') ->joi...
[ "Handle", "JOIN", "...", "USING", "...", "syntax" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L873-L888
209,750
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._uniqueCorrelation
private function _uniqueCorrelation($name) { if (is_array($name)) { $c = end($name); } else { // Extract just the last name of a qualified table name $dot = strrpos($name,'.'); $c = ($dot === false) ? $name : substr($name, $dot+1); } fo...
php
private function _uniqueCorrelation($name) { if (is_array($name)) { $c = end($name); } else { // Extract just the last name of a qualified table name $dot = strrpos($name,'.'); $c = ($dot === false) ? $name : substr($name, $dot+1); } fo...
[ "private", "function", "_uniqueCorrelation", "(", "$", "name", ")", "{", "if", "(", "is_array", "(", "$", "name", ")", ")", "{", "$", "c", "=", "end", "(", "$", "name", ")", ";", "}", "else", "{", "// Extract just the last name of a qualified table name", ...
Generate a unique correlation name @param string|array $name A qualified identifier. @return string A unique correlation name.
[ "Generate", "a", "unique", "correlation", "name" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L896-L909
209,751
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._tableCols
protected function _tableCols($correlationName, $cols, $afterCorrelationName = null) { if (!is_array($cols)) { $cols = array($cols); } if ($correlationName == null) { $correlationName = ''; } $columnValues = array(); foreach (array_filter($c...
php
protected function _tableCols($correlationName, $cols, $afterCorrelationName = null) { if (!is_array($cols)) { $cols = array($cols); } if ($correlationName == null) { $correlationName = ''; } $columnValues = array(); foreach (array_filter($c...
[ "protected", "function", "_tableCols", "(", "$", "correlationName", ",", "$", "cols", ",", "$", "afterCorrelationName", "=", "null", ")", "{", "if", "(", "!", "is_array", "(", "$", "cols", ")", ")", "{", "$", "cols", "=", "array", "(", "$", "cols", "...
Adds to the internal table-to-column mapping array. @param string $tbl The table/join the columns come from. @param array|string $cols The list of columns; preferably as an array, but possibly as a string containing one column. @param bool|string True if it should be prepended, a correlation name if it should be in...
[ "Adds", "to", "the", "internal", "table", "-", "to", "-", "column", "mapping", "array", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L920-L981
209,752
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._where
protected function _where($condition, $value = null, $type = null, $bool = true) { if (count($this->_parts[self::UNION])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION); } if...
php
protected function _where($condition, $value = null, $type = null, $bool = true) { if (count($this->_parts[self::UNION])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION); } if...
[ "protected", "function", "_where", "(", "$", "condition", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ",", "$", "bool", "=", "true", ")", "{", "if", "(", "count", "(", "$", "this", "->", "_parts", "[", "self", "::", "UNION", "]...
Internal function for creating the where clause @param string $condition @param mixed $value optional @param string $type optional @param boolean $bool true = AND, false = OR @return string clause
[ "Internal", "function", "for", "creating", "the", "where", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L992-L1013
209,753
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._getQuotedSchema
protected function _getQuotedSchema($schema = null) { if ($schema === null) { return null; } return $this->_adapter->quoteIdentifier($schema, true) . '.'; }
php
protected function _getQuotedSchema($schema = null) { if ($schema === null) { return null; } return $this->_adapter->quoteIdentifier($schema, true) . '.'; }
[ "protected", "function", "_getQuotedSchema", "(", "$", "schema", "=", "null", ")", "{", "if", "(", "$", "schema", "===", "null", ")", "{", "return", "null", ";", "}", "return", "$", "this", "->", "_adapter", "->", "quoteIdentifier", "(", "$", "schema", ...
Return a quoted schema name @param string $schema The schema name OPTIONAL @return string|null
[ "Return", "a", "quoted", "schema", "name" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1029-L1035
209,754
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._getQuotedTable
protected function _getQuotedTable($tableName, $correlationName = null) { return $this->_adapter->quoteTableAs($tableName, $correlationName, true); }
php
protected function _getQuotedTable($tableName, $correlationName = null) { return $this->_adapter->quoteTableAs($tableName, $correlationName, true); }
[ "protected", "function", "_getQuotedTable", "(", "$", "tableName", ",", "$", "correlationName", "=", "null", ")", "{", "return", "$", "this", "->", "_adapter", "->", "quoteTableAs", "(", "$", "tableName", ",", "$", "correlationName", ",", "true", ")", ";", ...
Return a quoted table name @param string $tableName The table name @param string $correlationName The correlation name OPTIONAL @return string
[ "Return", "a", "quoted", "table", "name" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1044-L1047
209,755
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderFrom
protected function _renderFrom($sql) { /* * If no table specified, use RDBMS-dependent solution * for table-less query. e.g. DUAL in Oracle. */ if (empty($this->_parts[self::FROM])) { $this->_parts[self::FROM] = $this->_getDummyTable(); } $fro...
php
protected function _renderFrom($sql) { /* * If no table specified, use RDBMS-dependent solution * for table-less query. e.g. DUAL in Oracle. */ if (empty($this->_parts[self::FROM])) { $this->_parts[self::FROM] = $this->_getDummyTable(); } $fro...
[ "protected", "function", "_renderFrom", "(", "$", "sql", ")", "{", "/*\n * If no table specified, use RDBMS-dependent solution\n * for table-less query. e.g. DUAL in Oracle.\n */", "if", "(", "empty", "(", "$", "this", "->", "_parts", "[", "self", "::",...
Render FROM clause @param string $sql SQL query @return string
[ "Render", "FROM", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1103-L1143
209,756
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderUnion
protected function _renderUnion($sql) { if ($this->_parts[self::UNION]) { $parts = count($this->_parts[self::UNION]); foreach ($this->_parts[self::UNION] as $cnt => $union) { list($target, $type) = $union; if ($target instanceof Zend_Db_Select) { ...
php
protected function _renderUnion($sql) { if ($this->_parts[self::UNION]) { $parts = count($this->_parts[self::UNION]); foreach ($this->_parts[self::UNION] as $cnt => $union) { list($target, $type) = $union; if ($target instanceof Zend_Db_Select) { ...
[ "protected", "function", "_renderUnion", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "UNION", "]", ")", "{", "$", "parts", "=", "count", "(", "$", "this", "->", "_parts", "[", "self", "::", "UNION", "]", ...
Render UNION query @param string $sql SQL query @return string
[ "Render", "UNION", "query" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1151-L1168
209,757
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderWhere
protected function _renderWhere($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::WHERE]) { $sql .= ' ' . self::SQL_WHERE . ' ' . implode(' ', $this->_parts[self::WHERE]); } return $sql; }
php
protected function _renderWhere($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::WHERE]) { $sql .= ' ' . self::SQL_WHERE . ' ' . implode(' ', $this->_parts[self::WHERE]); } return $sql; }
[ "protected", "function", "_renderWhere", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", "]", "&&", "$", "this", "->", "_parts", "[", "self", "::", "WHERE", "]", ")", "{", "$", "sql", ".=", "' '", "."...
Render WHERE clause @param string $sql SQL query @return string
[ "Render", "WHERE", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1176-L1183
209,758
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderGroup
protected function _renderGroup($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::GROUP]) { $group = array(); foreach ($this->_parts[self::GROUP] as $term) { $group[] = $this->_adapter->quoteIdentifier($term, true); } $sql .= ' ' . s...
php
protected function _renderGroup($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::GROUP]) { $group = array(); foreach ($this->_parts[self::GROUP] as $term) { $group[] = $this->_adapter->quoteIdentifier($term, true); } $sql .= ' ' . s...
[ "protected", "function", "_renderGroup", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", "]", "&&", "$", "this", "->", "_parts", "[", "self", "::", "GROUP", "]", ")", "{", "$", "group", "=", "array", ...
Render GROUP clause @param string $sql SQL query @return string
[ "Render", "GROUP", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1191-L1202
209,759
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderHaving
protected function _renderHaving($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::HAVING]) { $sql .= ' ' . self::SQL_HAVING . ' ' . implode(' ', $this->_parts[self::HAVING]); } return $sql; }
php
protected function _renderHaving($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::HAVING]) { $sql .= ' ' . self::SQL_HAVING . ' ' . implode(' ', $this->_parts[self::HAVING]); } return $sql; }
[ "protected", "function", "_renderHaving", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", "]", "&&", "$", "this", "->", "_parts", "[", "self", "::", "HAVING", "]", ")", "{", "$", "sql", ".=", "' '", "...
Render HAVING clause @param string $sql SQL query @return string
[ "Render", "HAVING", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1210-L1217
209,760
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderOrder
protected function _renderOrder($sql) { if ($this->_parts[self::ORDER]) { $order = array(); foreach ($this->_parts[self::ORDER] as $term) { if (is_array($term)) { if(is_numeric($term[0]) && strval(intval($term[0])) == $term[0]) { ...
php
protected function _renderOrder($sql) { if ($this->_parts[self::ORDER]) { $order = array(); foreach ($this->_parts[self::ORDER] as $term) { if (is_array($term)) { if(is_numeric($term[0]) && strval(intval($term[0])) == $term[0]) { ...
[ "protected", "function", "_renderOrder", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "ORDER", "]", ")", "{", "$", "order", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "_parts", "[", "s...
Render ORDER clause @param string $sql SQL query @return string
[ "Render", "ORDER", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1225-L1246
209,761
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderLimitoffset
protected function _renderLimitoffset($sql) { $count = 0; $offset = 0; if (!empty($this->_parts[self::LIMIT_OFFSET])) { $offset = (int) $this->_parts[self::LIMIT_OFFSET]; $count = PHP_INT_MAX; } if (!empty($this->_parts[self::LIMIT_COUNT])) { ...
php
protected function _renderLimitoffset($sql) { $count = 0; $offset = 0; if (!empty($this->_parts[self::LIMIT_OFFSET])) { $offset = (int) $this->_parts[self::LIMIT_OFFSET]; $count = PHP_INT_MAX; } if (!empty($this->_parts[self::LIMIT_COUNT])) { ...
[ "protected", "function", "_renderLimitoffset", "(", "$", "sql", ")", "{", "$", "count", "=", "0", ";", "$", "offset", "=", "0", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "_parts", "[", "self", "::", "LIMIT_OFFSET", "]", ")", ")", "{", ...
Render LIMIT OFFSET clause @param string $sql SQL query @return string
[ "Render", "LIMIT", "OFFSET", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1254-L1276
209,762
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderForupdate
protected function _renderForupdate($sql) { if ($this->_parts[self::FOR_UPDATE]) { $sql .= ' ' . self::SQL_FOR_UPDATE; } return $sql; }
php
protected function _renderForupdate($sql) { if ($this->_parts[self::FOR_UPDATE]) { $sql .= ' ' . self::SQL_FOR_UPDATE; } return $sql; }
[ "protected", "function", "_renderForupdate", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "FOR_UPDATE", "]", ")", "{", "$", "sql", ".=", "' '", ".", "self", "::", "SQL_FOR_UPDATE", ";", "}", "return", "$", "sq...
Render FOR UPDATE clause @param string $sql SQL query @return string
[ "Render", "FOR", "UPDATE", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1284-L1291
209,763
matomo-org/matomo
core/FileIntegrity.php
FileIntegrity.getFileIntegrityInformation
public static function getFileIntegrityInformation() { $messages = array(); $manifest = PIWIK_INCLUDE_PATH . '/config/manifest.inc.php'; if (file_exists($manifest)) { require_once $manifest; } if (!class_exists('Piwik\\Manifest')) { $messages[] = Pi...
php
public static function getFileIntegrityInformation() { $messages = array(); $manifest = PIWIK_INCLUDE_PATH . '/config/manifest.inc.php'; if (file_exists($manifest)) { require_once $manifest; } if (!class_exists('Piwik\\Manifest')) { $messages[] = Pi...
[ "public", "static", "function", "getFileIntegrityInformation", "(", ")", "{", "$", "messages", "=", "array", "(", ")", ";", "$", "manifest", "=", "PIWIK_INCLUDE_PATH", ".", "'/config/manifest.inc.php'", ";", "if", "(", "file_exists", "(", "$", "manifest", ")", ...
Get file integrity information @return array(bool $success, array $messages)
[ "Get", "file", "integrity", "information" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FileIntegrity.php#L24-L56
209,764
matomo-org/matomo
core/FileIntegrity.php
FileIntegrity.getDirectoriesFoundButNotExpected
protected static function getDirectoriesFoundButNotExpected() { static $cache = null; if(!is_null($cache)) { return $cache; } $pluginsInManifest = self::getPluginsFoundInManifest(); $directoriesInManifest = self::getDirectoriesFoundInManifest(); $director...
php
protected static function getDirectoriesFoundButNotExpected() { static $cache = null; if(!is_null($cache)) { return $cache; } $pluginsInManifest = self::getPluginsFoundInManifest(); $directoriesInManifest = self::getDirectoriesFoundInManifest(); $director...
[ "protected", "static", "function", "getDirectoriesFoundButNotExpected", "(", ")", "{", "static", "$", "cache", "=", "null", ";", "if", "(", "!", "is_null", "(", "$", "cache", ")", ")", "{", "return", "$", "cache", ";", "}", "$", "pluginsInManifest", "=", ...
Look for whole directories which are in the filesystem, but should not be @return array
[ "Look", "for", "whole", "directories", "which", "are", "in", "the", "filesystem", "but", "should", "not", "be" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FileIntegrity.php#L161-L195
209,765
matomo-org/matomo
core/FileIntegrity.php
FileIntegrity.getFilesFoundButNotExpected
protected static function getFilesFoundButNotExpected() { $files = \Piwik\Manifest::$files; $pluginsInManifest = self::getPluginsFoundInManifest(); $filesFoundButNotExpected = array(); foreach (self::getPathsToInvestigate() as $file) { if (is_dir($file)) { ...
php
protected static function getFilesFoundButNotExpected() { $files = \Piwik\Manifest::$files; $pluginsInManifest = self::getPluginsFoundInManifest(); $filesFoundButNotExpected = array(); foreach (self::getPathsToInvestigate() as $file) { if (is_dir($file)) { ...
[ "protected", "static", "function", "getFilesFoundButNotExpected", "(", ")", "{", "$", "files", "=", "\\", "Piwik", "\\", "Manifest", "::", "$", "files", ";", "$", "pluginsInManifest", "=", "self", "::", "getPluginsFoundInManifest", "(", ")", ";", "$", "filesFo...
Look for files which are in the filesystem, but should not be @return array
[ "Look", "for", "files", "which", "are", "in", "the", "filesystem", "but", "should", "not", "be" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FileIntegrity.php#L201-L232
209,766
matomo-org/matomo
core/FileIntegrity.php
FileIntegrity.isFileFromPluginNotInManifest
protected static function isFileFromPluginNotInManifest($file, $pluginsInManifest) { if (strpos($file, 'plugins/') !== 0) { return false; } if (substr_count($file, '/') < 2) { // must be a file plugins/abc.xyz and not a plugin directory return false; ...
php
protected static function isFileFromPluginNotInManifest($file, $pluginsInManifest) { if (strpos($file, 'plugins/') !== 0) { return false; } if (substr_count($file, '/') < 2) { // must be a file plugins/abc.xyz and not a plugin directory return false; ...
[ "protected", "static", "function", "isFileFromPluginNotInManifest", "(", "$", "file", ",", "$", "pluginsInManifest", ")", "{", "if", "(", "strpos", "(", "$", "file", ",", "'plugins/'", ")", "!==", "0", ")", "{", "return", "false", ";", "}", "if", "(", "s...
If a plugin folder is not tracked in the manifest then we don't try to report any files in this folder Could be a third party plugin or any plugin from the Marketplace @param $file @param $pluginsInManifest @return bool
[ "If", "a", "plugin", "folder", "is", "not", "tracked", "in", "the", "manifest", "then", "we", "don", "t", "try", "to", "report", "any", "files", "in", "this", "folder", "Could", "be", "a", "third", "party", "plugin", "or", "any", "plugin", "from", "the...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/FileIntegrity.php#L285-L302
209,767
matomo-org/matomo
plugins/ExampleTracker/Columns/ExampleActionDimension.php
ExampleActionDimension.onNewAction
public function onNewAction(Request $request, Visitor $visitor, Action $action) { if (!($action instanceof ActionPageview)) { // save value only in case it is a page view. return false; } $value = Common::getRequestVar('my_page_keywords', false, 'string', $request->g...
php
public function onNewAction(Request $request, Visitor $visitor, Action $action) { if (!($action instanceof ActionPageview)) { // save value only in case it is a page view. return false; } $value = Common::getRequestVar('my_page_keywords', false, 'string', $request->g...
[ "public", "function", "onNewAction", "(", "Request", "$", "request", ",", "Visitor", "$", "visitor", ",", "Action", "$", "action", ")", "{", "if", "(", "!", "(", "$", "action", "instanceof", "ActionPageview", ")", ")", "{", "// save value only in case it is a ...
This event is triggered before a new action is logged to the log_link_visit_action table. It overwrites any looked up action so it makes usually no sense to implement both methods but it sometimes does. You can assign any value to the column or return boolan false in case you do not want to save any value. @param Requ...
[ "This", "event", "is", "triggered", "before", "a", "new", "action", "is", "logged", "to", "the", "log_link_visit_action", "table", ".", "It", "overwrites", "any", "looked", "up", "action", "so", "it", "makes", "usually", "no", "sense", "to", "implement", "bo...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/ExampleTracker/Columns/ExampleActionDimension.php#L77-L93
209,768
matomo-org/matomo
libs/Zend/Db/Adapter/Pdo/Ibm.php
Zend_Db_Adapter_Pdo_Ibm._checkRequiredOptions
protected function _checkRequiredOptions(array $config) { parent::_checkRequiredOptions($config); if (array_key_exists('host', $this->_config) && !array_key_exists('port', $config)) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.ph...
php
protected function _checkRequiredOptions(array $config) { parent::_checkRequiredOptions($config); if (array_key_exists('host', $this->_config) && !array_key_exists('port', $config)) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.ph...
[ "protected", "function", "_checkRequiredOptions", "(", "array", "$", "config", ")", "{", "parent", "::", "_checkRequiredOptions", "(", "$", "config", ")", ";", "if", "(", "array_key_exists", "(", "'host'", ",", "$", "this", "->", "_config", ")", "&&", "!", ...
Checks required options @param array $config @throws Zend_Db_Adapter_Exception @return void
[ "Checks", "required", "options" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Ibm.php#L174-L184
209,769
matomo-org/matomo
libs/Zend/Db/Adapter/Pdo/Ibm.php
Zend_Db_Adapter_Pdo_Ibm.insert
public function insert($table, array $bind) { $this->_connect(); $newbind = array(); if (is_array($bind)) { foreach ($bind as $name => $value) { if($value !== null) { $newbind[$name] = $value; } } } ...
php
public function insert($table, array $bind) { $this->_connect(); $newbind = array(); if (is_array($bind)) { foreach ($bind as $name => $value) { if($value !== null) { $newbind[$name] = $value; } } } ...
[ "public", "function", "insert", "(", "$", "table", ",", "array", "$", "bind", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "newbind", "=", "array", "(", ")", ";", "if", "(", "is_array", "(", "$", "bind", ")", ")", "{", "foreach", ...
Inserts a table row with specified data. Special handling for PDO_IBM remove empty slots @param mixed $table The table to insert data into. @param array $bind Column-value pairs. @return int The number of affected rows.
[ "Inserts", "a", "table", "row", "with", "specified", "data", ".", "Special", "handling", "for", "PDO_IBM", "remove", "empty", "slots" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Ibm.php#L257-L270
209,770
matomo-org/matomo
plugins/UsersManager/Model.php
Model.getUsersHavingSuperUserAccess
public function getUsersHavingSuperUserAccess() { $db = $this->getDb(); $users = $db->fetchAll("SELECT login, email, token_auth, superuser_access FROM " . Common::prefixTable("user") . " WHERE superuser_access = 1 ...
php
public function getUsersHavingSuperUserAccess() { $db = $this->getDb(); $users = $db->fetchAll("SELECT login, email, token_auth, superuser_access FROM " . Common::prefixTable("user") . " WHERE superuser_access = 1 ...
[ "public", "function", "getUsersHavingSuperUserAccess", "(", ")", "{", "$", "db", "=", "$", "this", "->", "getDb", "(", ")", ";", "$", "users", "=", "$", "db", "->", "fetchAll", "(", "\"SELECT login, email, token_auth, superuser_access\n ...
Note that this returns the token_auth which is as private as the password! @return array[] containing login, email and token_auth
[ "Note", "that", "this", "returns", "the", "token_auth", "which", "is", "as", "private", "as", "the", "password!" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/Model.php#L307-L316
209,771
matomo-org/matomo
core/Concurrency/DistributedList.php
DistributedList.getAll
public function getAll() { $result = $this->getListOptionValue(); foreach ($result as $key => $item) { // remove non-array items (unexpected state, though can happen when upgrading from an old Piwik) if (is_array($item)) { $this->logger->info("Found array ite...
php
public function getAll() { $result = $this->getListOptionValue(); foreach ($result as $key => $item) { // remove non-array items (unexpected state, though can happen when upgrading from an old Piwik) if (is_array($item)) { $this->logger->info("Found array ite...
[ "public", "function", "getAll", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListOptionValue", "(", ")", ";", "foreach", "(", "$", "result", "as", "$", "key", "=>", "$", "item", ")", "{", "// remove non-array items (unexpected state, though can ha...
Queries the option table and returns all items in this list. @return array
[ "Queries", "the", "option", "table", "and", "returns", "all", "items", "in", "this", "list", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Concurrency/DistributedList.php#L53-L70
209,772
matomo-org/matomo
core/Concurrency/DistributedList.php
DistributedList.setAll
public function setAll($items) { foreach ($items as $key => &$item) { if (is_array($item)) { throw new \InvalidArgumentException("Array item encountered in DistributedList::setAll() [ key = $key ]."); } else { $item = (string)$item; } ...
php
public function setAll($items) { foreach ($items as $key => &$item) { if (is_array($item)) { throw new \InvalidArgumentException("Array item encountered in DistributedList::setAll() [ key = $key ]."); } else { $item = (string)$item; } ...
[ "public", "function", "setAll", "(", "$", "items", ")", "{", "foreach", "(", "$", "items", "as", "$", "key", "=>", "&", "$", "item", ")", "{", "if", "(", "is_array", "(", "$", "item", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", ...
Sets the contents of the list in the option table. @param string[] $items
[ "Sets", "the", "contents", "of", "the", "list", "in", "the", "option", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Concurrency/DistributedList.php#L77-L88
209,773
matomo-org/matomo
core/Concurrency/DistributedList.php
DistributedList.add
public function add($item) { $allItems = $this->getAll(); if (is_array($item)) { $allItems = array_merge($allItems, $item); } else { $allItems[] = $item; } $this->setAll($allItems); }
php
public function add($item) { $allItems = $this->getAll(); if (is_array($item)) { $allItems = array_merge($allItems, $item); } else { $allItems[] = $item; } $this->setAll($allItems); }
[ "public", "function", "add", "(", "$", "item", ")", "{", "$", "allItems", "=", "$", "this", "->", "getAll", "(", ")", ";", "if", "(", "is_array", "(", "$", "item", ")", ")", "{", "$", "allItems", "=", "array_merge", "(", "$", "allItems", ",", "$"...
Adds one or more items to the list in the option table. @param string|array $item
[ "Adds", "one", "or", "more", "items", "to", "the", "list", "in", "the", "option", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Concurrency/DistributedList.php#L95-L105
209,774
matomo-org/matomo
core/Concurrency/DistributedList.php
DistributedList.remove
public function remove($items) { if (!is_array($items)) { $items = array($items); } $allItems = $this->getAll(); foreach ($items as $item) { $existingIndex = array_search($item, $allItems); if ($existingIndex === false) { return; ...
php
public function remove($items) { if (!is_array($items)) { $items = array($items); } $allItems = $this->getAll(); foreach ($items as $item) { $existingIndex = array_search($item, $allItems); if ($existingIndex === false) { return; ...
[ "public", "function", "remove", "(", "$", "items", ")", "{", "if", "(", "!", "is_array", "(", "$", "items", ")", ")", "{", "$", "items", "=", "array", "(", "$", "items", ")", ";", "}", "$", "allItems", "=", "$", "this", "->", "getAll", "(", ")"...
Removes one or more items by value from the list in the option table. Does not preserve array keys. @param string|array $items
[ "Removes", "one", "or", "more", "items", "by", "value", "from", "the", "list", "in", "the", "option", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Concurrency/DistributedList.php#L114-L132
209,775
matomo-org/matomo
core/Concurrency/DistributedList.php
DistributedList.removeByIndex
public function removeByIndex($indices) { if (!is_array($indices)) { $indices = array($indices); } $indices = array_unique($indices); $allItems = $this->getAll(); foreach ($indices as $index) { unset($allItems[$index]); } $this->setA...
php
public function removeByIndex($indices) { if (!is_array($indices)) { $indices = array($indices); } $indices = array_unique($indices); $allItems = $this->getAll(); foreach ($indices as $index) { unset($allItems[$index]); } $this->setA...
[ "public", "function", "removeByIndex", "(", "$", "indices", ")", "{", "if", "(", "!", "is_array", "(", "$", "indices", ")", ")", "{", "$", "indices", "=", "array", "(", "$", "indices", ")", ";", "}", "$", "indices", "=", "array_unique", "(", "$", "...
Removes one or more items by index from the list in the option table. Does not preserve array keys. @param int[]|int $indices
[ "Removes", "one", "or", "more", "items", "by", "index", "from", "the", "list", "in", "the", "option", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Concurrency/DistributedList.php#L141-L155
209,776
matomo-org/matomo
core/CronArchive/FixedSiteIds.php
FixedSiteIds.getNumProcessedWebsites
public function getNumProcessedWebsites() { $numProcessed = $this->index + 1; if ($numProcessed > $this->getNumSites()) { return $this->getNumSites(); } return $numProcessed; }
php
public function getNumProcessedWebsites() { $numProcessed = $this->index + 1; if ($numProcessed > $this->getNumSites()) { return $this->getNumSites(); } return $numProcessed; }
[ "public", "function", "getNumProcessedWebsites", "(", ")", "{", "$", "numProcessed", "=", "$", "this", "->", "index", "+", "1", ";", "if", "(", "$", "numProcessed", ">", "$", "this", "->", "getNumSites", "(", ")", ")", "{", "return", "$", "this", "->",...
Get the number of already processed websites. All websites were processed by the current archiver. @return int
[ "Get", "the", "number", "of", "already", "processed", "websites", ".", "All", "websites", "were", "processed", "by", "the", "current", "archiver", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/CronArchive/FixedSiteIds.php#L44-L53
209,777
matomo-org/matomo
libs/Zend/Config/Writer/Yaml.php
Zend_Config_Writer_Yaml.render
public function render() { $data = $this->_config->toArray(); $sectionName = $this->_config->getSectionName(); $extends = $this->_config->getExtends(); if (is_string($sectionName)) { $data = array($sectionName => $data); } foreach ($extends as...
php
public function render() { $data = $this->_config->toArray(); $sectionName = $this->_config->getSectionName(); $extends = $this->_config->getExtends(); if (is_string($sectionName)) { $data = array($sectionName => $data); } foreach ($extends as...
[ "public", "function", "render", "(", ")", "{", "$", "data", "=", "$", "this", "->", "_config", "->", "toArray", "(", ")", ";", "$", "sectionName", "=", "$", "this", "->", "_config", "->", "getSectionName", "(", ")", ";", "$", "extends", "=", "$", "...
Render a Zend_Config into a YAML config string. @since 1.10 @return string
[ "Render", "a", "Zend_Config", "into", "a", "YAML", "config", "string", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config/Writer/Yaml.php#L80-L106
209,778
matomo-org/matomo
libs/Zend/Config/Writer/Yaml.php
Zend_Config_Writer_Yaml._encodeYaml
protected static function _encodeYaml($indent, $data) { reset($data); $result = ""; $numeric = is_numeric(key($data)); foreach($data as $key => $value) { if(is_array($value)) { $encoded = "\n".self::_encodeYaml($indent+1, $value); } else { ...
php
protected static function _encodeYaml($indent, $data) { reset($data); $result = ""; $numeric = is_numeric(key($data)); foreach($data as $key => $value) { if(is_array($value)) { $encoded = "\n".self::_encodeYaml($indent+1, $value); } else { ...
[ "protected", "static", "function", "_encodeYaml", "(", "$", "indent", ",", "$", "data", ")", "{", "reset", "(", "$", "data", ")", ";", "$", "result", "=", "\"\"", ";", "$", "numeric", "=", "is_numeric", "(", "key", "(", "$", "data", ")", ")", ";", ...
Service function for encoding YAML @param int $indent Current indent level @param array $data Data to encode @return string
[ "Service", "function", "for", "encoding", "YAML" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config/Writer/Yaml.php#L128-L143
209,779
matomo-org/matomo
libs/HTML/QuickForm2/Renderer/Array.php
HTML_QuickForm2_Renderer_Array.setStyleForId
public function setStyleForId($idOrStyles, $style = null) { if (is_array($idOrStyles)) { $this->styles = array_merge($this->styles, $idOrStyles); } else { $this->styles[$idOrStyles] = $style; } return $this; }
php
public function setStyleForId($idOrStyles, $style = null) { if (is_array($idOrStyles)) { $this->styles = array_merge($this->styles, $idOrStyles); } else { $this->styles[$idOrStyles] = $style; } return $this; }
[ "public", "function", "setStyleForId", "(", "$", "idOrStyles", ",", "$", "style", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "idOrStyles", ")", ")", "{", "$", "this", "->", "styles", "=", "array_merge", "(", "$", "this", "->", "styles", ...
Sets a style for element rendering "Style" is some information that is opaque to Array Renderer but may be of use to e.g. template engine that receives the resultant array. @param string|array Element id or array ('element id' => 'style') @param sting Element style if $idOrStyles is not an array @r...
[ "Sets", "a", "style", "for", "element", "rendering" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Array.php#L290-L298
209,780
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.addWidgetConfig
public function addWidgetConfig(WidgetConfig $widget) { if ($widget instanceof WidgetContainerConfig) { $this->addContainer($widget); } elseif (Development::isEnabled()) { $this->checkIsValidWidget($widget); } $this->widgets[] = $widget; }
php
public function addWidgetConfig(WidgetConfig $widget) { if ($widget instanceof WidgetContainerConfig) { $this->addContainer($widget); } elseif (Development::isEnabled()) { $this->checkIsValidWidget($widget); } $this->widgets[] = $widget; }
[ "public", "function", "addWidgetConfig", "(", "WidgetConfig", "$", "widget", ")", "{", "if", "(", "$", "widget", "instanceof", "WidgetContainerConfig", ")", "{", "$", "this", "->", "addContainer", "(", "$", "widget", ")", ";", "}", "elseif", "(", "Developmen...
Adds a new widget to the widget config. Please make sure the widget is enabled before adding a widget as no such checks will be performed. @param WidgetConfig $widget
[ "Adds", "a", "new", "widget", "to", "the", "widget", "config", ".", "Please", "make", "sure", "the", "widget", "is", "enabled", "before", "adding", "a", "widget", "as", "no", "such", "checks", "will", "be", "performed", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L51-L60
209,781
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.addToContainerWidget
public function addToContainerWidget($containerId, WidgetConfig $widget) { if (isset($this->container[$containerId])) { $this->container[$containerId]->addWidgetConfig($widget); } else { if (!isset($this->containerWidgets[$containerId])) { $this->containerWidg...
php
public function addToContainerWidget($containerId, WidgetConfig $widget) { if (isset($this->container[$containerId])) { $this->container[$containerId]->addWidgetConfig($widget); } else { if (!isset($this->containerWidgets[$containerId])) { $this->containerWidg...
[ "public", "function", "addToContainerWidget", "(", "$", "containerId", ",", "WidgetConfig", "$", "widget", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "container", "[", "$", "containerId", "]", ")", ")", "{", "$", "this", "->", "container", "["...
Add a widget to a widget container. It doesn't matter whether the container was added to this list already or whether the container is added later. As long as a container having the same containerId is added at some point the widget will be added to that container. If no container having this id is added the widget wil...
[ "Add", "a", "widget", "to", "a", "widget", "container", ".", "It", "doesn", "t", "matter", "whether", "the", "container", "was", "added", "to", "this", "list", "already", "or", "whether", "the", "container", "is", "added", "later", ".", "As", "long", "as...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L119-L130
209,782
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.remove
public function remove($widgetCategoryId, $widgetName = false) { foreach ($this->widgets as $index => $widget) { if ($widget->getCategoryId() === $widgetCategoryId) { if (!$widgetName || $widget->getName() === $widgetName) { unset($this->widgets[$index]); ...
php
public function remove($widgetCategoryId, $widgetName = false) { foreach ($this->widgets as $index => $widget) { if ($widget->getCategoryId() === $widgetCategoryId) { if (!$widgetName || $widget->getName() === $widgetName) { unset($this->widgets[$index]); ...
[ "public", "function", "remove", "(", "$", "widgetCategoryId", ",", "$", "widgetName", "=", "false", ")", "{", "foreach", "(", "$", "this", "->", "widgets", "as", "$", "index", "=>", "$", "widget", ")", "{", "if", "(", "$", "widget", "->", "getCategoryI...
Removes one or more widgets from the widget list. @param string $widgetCategoryId The widget category id. Can be a translation token eg 'General_Visits' see {@link WidgetConfig::setCategoryId()}. @param string|false $widgetName The name of the widget to remove eg 'VisitTime_ByServerTimeWidgetName'. If not supplied, al...
[ "Removes", "one", "or", "more", "widgets", "from", "the", "widget", "list", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L140-L149
209,783
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.isDefined
public function isDefined($module, $action) { foreach ($this->widgets as $widget) { if ($widget->getModule() === $module && $widget->getAction() === $action) { return true; } } return false; }
php
public function isDefined($module, $action) { foreach ($this->widgets as $widget) { if ($widget->getModule() === $module && $widget->getAction() === $action) { return true; } } return false; }
[ "public", "function", "isDefined", "(", "$", "module", ",", "$", "action", ")", "{", "foreach", "(", "$", "this", "->", "widgets", "as", "$", "widget", ")", "{", "if", "(", "$", "widget", "->", "getModule", "(", ")", "===", "$", "module", "&&", "$"...
Returns `true` if a widget exists in the widget list, `false` if otherwise. @param string $module The controller name of the widget. @param string $action The controller action of the widget. @return bool
[ "Returns", "true", "if", "a", "widget", "exists", "in", "the", "widget", "list", "false", "if", "otherwise", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L158-L167
209,784
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.get
public static function get() { $list = new static; $widgets = StaticContainer::get('Piwik\Plugin\WidgetsProvider'); $widgetContainerConfigs = $widgets->getWidgetContainerConfigs(); foreach ($widgetContainerConfigs as $config) { if ($config->isEnabled()) { ...
php
public static function get() { $list = new static; $widgets = StaticContainer::get('Piwik\Plugin\WidgetsProvider'); $widgetContainerConfigs = $widgets->getWidgetContainerConfigs(); foreach ($widgetContainerConfigs as $config) { if ($config->isEnabled()) { ...
[ "public", "static", "function", "get", "(", ")", "{", "$", "list", "=", "new", "static", ";", "$", "widgets", "=", "StaticContainer", "::", "get", "(", "'Piwik\\Plugin\\WidgetsProvider'", ")", ";", "$", "widgetContainerConfigs", "=", "$", "widgets", "->", "g...
Get all widgets defined in the Piwik platform. @ignore @return static
[ "Get", "all", "widgets", "defined", "in", "the", "Piwik", "platform", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L174-L218
209,785
matomo-org/matomo
core/Widget/WidgetsList.php
WidgetsList.getWidgetUniqueId
public static function getWidgetUniqueId($controllerName, $controllerAction, $customParameters = array()) { $widgetUniqueId = 'widget' . $controllerName . $controllerAction; foreach ($customParameters as $name => $value) { if (is_array($value)) { // use 'Array' for backw...
php
public static function getWidgetUniqueId($controllerName, $controllerAction, $customParameters = array()) { $widgetUniqueId = 'widget' . $controllerName . $controllerAction; foreach ($customParameters as $name => $value) { if (is_array($value)) { // use 'Array' for backw...
[ "public", "static", "function", "getWidgetUniqueId", "(", "$", "controllerName", ",", "$", "controllerAction", ",", "$", "customParameters", "=", "array", "(", ")", ")", "{", "$", "widgetUniqueId", "=", "'widget'", ".", "$", "controllerName", ".", "$", "contro...
CAUTION! If you ever change this method, existing updates will fail as they currently use that method! If you change the output the uniqueId for existing widgets would not be found anymore Returns the unique id of an widget with the given parameters @param $controllerName @param $controllerAction @param array $custom...
[ "CAUTION!", "If", "you", "ever", "change", "this", "method", "existing", "updates", "will", "fail", "as", "they", "currently", "use", "that", "method!", "If", "you", "change", "the", "output", "the", "uniqueId", "for", "existing", "widgets", "would", "not", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Widget/WidgetsList.php#L231-L247
209,786
matomo-org/matomo
plugins/DBStats/Controller.php
Controller.index
public function index() { Piwik::checkUserHasSuperUserAccess(); $view = new View('@DBStats/index'); $this->setBasicVariablesView($view); $_GET['showtitle'] = '1'; $view->databaseUsageSummary = $this->renderReport('getDatabaseUsageSummary'); $view->trackerDataSummary...
php
public function index() { Piwik::checkUserHasSuperUserAccess(); $view = new View('@DBStats/index'); $this->setBasicVariablesView($view); $_GET['showtitle'] = '1'; $view->databaseUsageSummary = $this->renderReport('getDatabaseUsageSummary'); $view->trackerDataSummary...
[ "public", "function", "index", "(", ")", "{", "Piwik", "::", "checkUserHasSuperUserAccess", "(", ")", ";", "$", "view", "=", "new", "View", "(", "'@DBStats/index'", ")", ";", "$", "this", "->", "setBasicVariablesView", "(", "$", "view", ")", ";", "$", "_...
Returns the index for this plugin. Shows every other report defined by this plugin, except the '...ByYear' reports. These can be loaded as related reports. Also, the 'getIndividual...Summary' reports are loaded by AJAX, as they can take a significant amount of time to load on setups w/ lots of websites.
[ "Returns", "the", "index", "for", "this", "plugin", ".", "Shows", "every", "other", "report", "defined", "by", "this", "plugin", "except", "the", "...", "ByYear", "reports", ".", "These", "can", "be", "loaded", "as", "related", "reports", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/DBStats/Controller.php#L26-L48
209,787
matomo-org/matomo
libs/HTML/QuickForm2/Rule/Nonempty.php
HTML_QuickForm2_Rule_Nonempty.setConfig
public function setConfig($config) { if (is_null($config)) { $config = 1; } elseif (1 > intval($config)) { throw new HTML_QuickForm2_InvalidArgumentException( 'Nonempty Rule accepts a positive count of nonempty values, ' . preg_replace('/\s+/',...
php
public function setConfig($config) { if (is_null($config)) { $config = 1; } elseif (1 > intval($config)) { throw new HTML_QuickForm2_InvalidArgumentException( 'Nonempty Rule accepts a positive count of nonempty values, ' . preg_replace('/\s+/',...
[ "public", "function", "setConfig", "(", "$", "config", ")", "{", "if", "(", "is_null", "(", "$", "config", ")", ")", "{", "$", "config", "=", "1", ";", "}", "elseif", "(", "1", ">", "intval", "(", "$", "config", ")", ")", "{", "throw", "new", "...
Sets minimum number of nonempty values This is useful for multiple selects and Containers, will be ignored for all other elements. Defaults to 1, thus multiple select will be considered not empty if at least one option is selected, Container will be considered not empty if at least one contained element is not empty. ...
[ "Sets", "minimum", "number", "of", "nonempty", "values" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Nonempty.php#L112-L123
209,788
matomo-org/matomo
core/DataTable/Filter/BeautifyTimeRangeLabels.php
BeautifyTimeRangeLabels.getRangeLabel
public function getRangeLabel($oldLabel, $lowerBound, $upperBound) { if ($lowerBound < 60) { return sprintf($this->labelSecondsPlural, $lowerBound, $upperBound); } else { return sprintf($this->labelPlural, ceil($lowerBound / 60) . "-" . ceil($upperBound / 60)); } ...
php
public function getRangeLabel($oldLabel, $lowerBound, $upperBound) { if ($lowerBound < 60) { return sprintf($this->labelSecondsPlural, $lowerBound, $upperBound); } else { return sprintf($this->labelPlural, ceil($lowerBound / 60) . "-" . ceil($upperBound / 60)); } ...
[ "public", "function", "getRangeLabel", "(", "$", "oldLabel", ",", "$", "lowerBound", ",", "$", "upperBound", ")", "{", "if", "(", "$", "lowerBound", "<", "60", ")", "{", "return", "sprintf", "(", "$", "this", "->", "labelSecondsPlural", ",", "$", "lowerB...
Beautifies and returns a range label whose range is bounded and spans over more than one unit, ie 1-5, 5-10 but NOT 11+. If the lower bound of the range is less than 60 the pretty range label will be in seconds. Otherwise, it will be in minutes. @param string $oldLabel The original label value. @param int $lowerBound...
[ "Beautifies", "and", "returns", "a", "range", "label", "whose", "range", "is", "bounded", "and", "spans", "over", "more", "than", "one", "unit", "ie", "1", "-", "5", "5", "-", "10", "but", "NOT", "11", "+", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/BeautifyTimeRangeLabels.php#L92-L99
209,789
matomo-org/matomo
core/DataTable/Filter/BeautifyTimeRangeLabels.php
BeautifyTimeRangeLabels.getUnboundedLabel
public function getUnboundedLabel($oldLabel, $lowerBound) { if ($lowerBound < 60) { return sprintf($this->labelSecondsPlural, $lowerBound); } else { // since we're using minutes, we use floor so 1801s+ will be 30m+ and not 31m+ return sprintf($this->labelPlural, "...
php
public function getUnboundedLabel($oldLabel, $lowerBound) { if ($lowerBound < 60) { return sprintf($this->labelSecondsPlural, $lowerBound); } else { // since we're using minutes, we use floor so 1801s+ will be 30m+ and not 31m+ return sprintf($this->labelPlural, "...
[ "public", "function", "getUnboundedLabel", "(", "$", "oldLabel", ",", "$", "lowerBound", ")", "{", "if", "(", "$", "lowerBound", "<", "60", ")", "{", "return", "sprintf", "(", "$", "this", "->", "labelSecondsPlural", ",", "$", "lowerBound", ")", ";", "}"...
Beautifies and returns a range label whose range is unbounded, ie 5+, 10+, etc. If the lower bound of the range is less than 60 the pretty range label will be in seconds. Otherwise, it will be in minutes. @param string $oldLabel The original label value. @param int $lowerBound The lower bound of the range. @return st...
[ "Beautifies", "and", "returns", "a", "range", "label", "whose", "range", "is", "unbounded", "ie", "5", "+", "10", "+", "etc", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/BeautifyTimeRangeLabels.php#L112-L120
209,790
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.sql
public function sql($sql, $errorCodesToIgnore = array()) { if ($errorCodesToIgnore === false) { $errorCodesToIgnore = array(); } return $this->container->make('Piwik\Updater\Migration\Db\Sql', array( 'sql' => $sql, 'errorCodesToIgnore' => $errorCodesToIgnore ...
php
public function sql($sql, $errorCodesToIgnore = array()) { if ($errorCodesToIgnore === false) { $errorCodesToIgnore = array(); } return $this->container->make('Piwik\Updater\Migration\Db\Sql', array( 'sql' => $sql, 'errorCodesToIgnore' => $errorCodesToIgnore ...
[ "public", "function", "sql", "(", "$", "sql", ",", "$", "errorCodesToIgnore", "=", "array", "(", ")", ")", "{", "if", "(", "$", "errorCodesToIgnore", "===", "false", ")", "{", "$", "errorCodesToIgnore", "=", "array", "(", ")", ";", "}", "return", "$", ...
Performs a custom SQL query during the update. Example: $factory->sql("DELETE * FROM table_name WHERE plugin_name = 'MyPluginName'"); @param string $sql The SQL query that should be executed. Make sure to prefix a table name via {@link Piwik\Commin::prefixTable()}. @param int|int[] $errorCodesToIgnore Any given M...
[ "Performs", "a", "custom", "SQL", "query", "during", "the", "update", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L46-L55
209,791
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.boundSql
public function boundSql($sql, $bind, $errorCodesToIgnore = array()) { if ($errorCodesToIgnore === false) { $errorCodesToIgnore = array(); } return $this->container->make('Piwik\Updater\Migration\Db\BoundSql', array( 'sql' => $sql, 'errorCodesToIgnore' => $errorCodes...
php
public function boundSql($sql, $bind, $errorCodesToIgnore = array()) { if ($errorCodesToIgnore === false) { $errorCodesToIgnore = array(); } return $this->container->make('Piwik\Updater\Migration\Db\BoundSql', array( 'sql' => $sql, 'errorCodesToIgnore' => $errorCodes...
[ "public", "function", "boundSql", "(", "$", "sql", ",", "$", "bind", ",", "$", "errorCodesToIgnore", "=", "array", "(", ")", ")", "{", "if", "(", "$", "errorCodesToIgnore", "===", "false", ")", "{", "$", "errorCodesToIgnore", "=", "array", "(", ")", ";...
Performs a custom SQL query that uses bound parameters during the update. You can replace values with a question mark and then pass the actual value via `$bind` for better security. Example: $factory->boundSql('DELETE * FROM table_name WHERE idsite = ?, array($idSite = 1)); @param string $sql The SQL query that sho...
[ "Performs", "a", "custom", "SQL", "query", "that", "uses", "bound", "parameters", "during", "the", "update", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L73-L82
209,792
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.createTable
public function createTable($table, $columnNames, $primaryKey = array()) { $table = $this->prefixTable($table); if (!empty($primaryKey) && !is_array($primaryKey)) { $primaryKey = array($primaryKey); } return $this->container->make('Piwik\Updater\Migration\Db\CreateTable...
php
public function createTable($table, $columnNames, $primaryKey = array()) { $table = $this->prefixTable($table); if (!empty($primaryKey) && !is_array($primaryKey)) { $primaryKey = array($primaryKey); } return $this->container->make('Piwik\Updater\Migration\Db\CreateTable...
[ "public", "function", "createTable", "(", "$", "table", ",", "$", "columnNames", ",", "$", "primaryKey", "=", "array", "(", ")", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "if", "(", "!", "empty", "(...
Creates a new database table. @param string $table Unprefixed database table name, eg 'log_visit'. @param array $columnNames An array of column names and their type they should use. For example: array('column_name_1' => 'VARCHAR(200) NOT NULL', 'column_name_2' => 'INT(10) DEFAULT 0') @param string|string[] $primaryKe...
[ "Creates", "a", "new", "database", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L92-L103
209,793
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.dropTable
public function dropTable($table) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropTable', array( 'table' => $table )); }
php
public function dropTable($table) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropTable', array( 'table' => $table )); }
[ "public", "function", "dropTable", "(", "$", "table", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "make", "(", "'Piwik\\Updater\\Migration\\Db\\DropTable'", ",", ...
Drops an existing database table. @param string $table Unprefixed database table name, eg 'log_visit'. @return DropTable
[ "Drops", "an", "existing", "database", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L110-L117
209,794
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.addColumn
public function addColumn($table, $columnName, $columnType, $placeColumnAfter = null) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\AddColumn', array( 'table' => $table, 'columnName' => $columnName, 'columnType' => $columnType, 'placeCo...
php
public function addColumn($table, $columnName, $columnType, $placeColumnAfter = null) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\AddColumn', array( 'table' => $table, 'columnName' => $columnName, 'columnType' => $columnType, 'placeCo...
[ "public", "function", "addColumn", "(", "$", "table", ",", "$", "columnName", ",", "$", "columnType", ",", "$", "placeColumnAfter", "=", "null", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", ...
Adds a new database table column to an existing table. @param string $table Unprefixed database table name, eg 'log_visit'. @param string $columnName The name of the column that shall be added, eg 'my_column_name'. @param string $columnType The column type it should have, eg 'VARCHAR(200) NOT NULL'. @param string|n...
[ "Adds", "a", "new", "database", "table", "column", "to", "an", "existing", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L130-L137
209,795
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.addColumns
public function addColumns($table, $columns, $placeColumnAfter = null) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\AddColumns', array( 'table' => $table, 'columns' => $columns, 'placeColumnAfter' => $placeColumnAfter )); }
php
public function addColumns($table, $columns, $placeColumnAfter = null) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\AddColumns', array( 'table' => $table, 'columns' => $columns, 'placeColumnAfter' => $placeColumnAfter )); }
[ "public", "function", "addColumns", "(", "$", "table", ",", "$", "columns", ",", "$", "placeColumnAfter", "=", "null", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container",...
Adds multiple new database table columns to an existing table at once. Adding multiple columns at the same time can lead to performance improvements compared to adding each new column separately. @param string $table Unprefixed database table name, eg 'log_visit'. @param array $columns An array of column name to col...
[ "Adds", "multiple", "new", "database", "table", "columns", "to", "an", "existing", "table", "at", "once", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L154-L161
209,796
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.dropColumn
public function dropColumn($table, $columnName) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropColumn', array( 'table' => $table, 'columnName' => $columnName )); }
php
public function dropColumn($table, $columnName) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropColumn', array( 'table' => $table, 'columnName' => $columnName )); }
[ "public", "function", "dropColumn", "(", "$", "table", ",", "$", "columnName", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "make", "(", "'Piwik\\Updater\\Migr...
Drops an existing database table column. @param string $table Unprefixed database table name, eg 'log_visit'. @param string $columnName The name of the column that shall be dropped, eg 'my_column_name'. @return DropColumn
[ "Drops", "an", "existing", "database", "table", "column", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L170-L177
209,797
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.changeColumn
public function changeColumn($table, $oldColumnName, $newColumnName, $columnType) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumn', array( 'table' => $table, 'oldColumnName' => $oldColumnName, 'newColumnName' => $...
php
public function changeColumn($table, $oldColumnName, $newColumnName, $columnType) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumn', array( 'table' => $table, 'oldColumnName' => $oldColumnName, 'newColumnName' => $...
[ "public", "function", "changeColumn", "(", "$", "table", ",", "$", "oldColumnName", ",", "$", "newColumnName", ",", "$", "columnType", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "-...
Changes the column name and column type of an existing database table column. @param string $table Unprefixed database table name, eg 'log_visit'. @param string $oldColumnName The current name of the column that shall be renamed/changed, eg 'column_name'. @param string $newColumnName The new name of the column, eg ...
[ "Changes", "the", "column", "name", "and", "column", "type", "of", "an", "existing", "database", "table", "column", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L189-L197
209,798
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.changeColumnType
public function changeColumnType($table, $columnName, $columnType) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumnType', array( 'table' => $table, 'columnName' => $columnName, 'columnType' => $columnType )); }
php
public function changeColumnType($table, $columnName, $columnType) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumnType', array( 'table' => $table, 'columnName' => $columnName, 'columnType' => $columnType )); }
[ "public", "function", "changeColumnType", "(", "$", "table", ",", "$", "columnName", ",", "$", "columnType", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "ma...
Changes the type of an existing database table column. @param string $table Unprefixed database table name, eg 'log_visit'. @param string $columnName The name of the column that shall be changed, eg 'my_column_name'. @param string $columnType The updated type the column should have, eg 'VARCHAR(200) NOT NULL'. @re...
[ "Changes", "the", "type", "of", "an", "existing", "database", "table", "column", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L208-L215
209,799
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.changeColumnTypes
public function changeColumnTypes($table, $columns) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumnTypes', array( 'table' => $table, 'columns' => $columns )); }
php
public function changeColumnTypes($table, $columns) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\ChangeColumnTypes', array( 'table' => $table, 'columns' => $columns )); }
[ "public", "function", "changeColumnTypes", "(", "$", "table", ",", "$", "columns", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "make", "(", "'Piwik\\Updater\\...
Changes the type of multiple existing database table columns at the same time. Changing multiple columns at the same time can lead to performance improvements compared to changing the type of each column separately. @param string $table Unprefixed database table name, eg 'log_visit'. @param array $columns An array o...
[ "Changes", "the", "type", "of", "multiple", "existing", "database", "table", "columns", "at", "the", "same", "time", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L229-L236