Functions

__content

package

Default

Arguments

$data

« More »

__content

package

Default

Arguments

$data

« More »

__header

package

Default

Arguments

$str

$char

« More »

__header

package

Default

Arguments

$str

$char

« More »

__title

package

Default

Arguments

$title

$char

« More »

__title

package

Default

Arguments

$title

$char

« More »

_countNumberOfEntries

package

Default

Arguments

$sTableName

« More »

_getDbName

Get the database name

package

Default

« More »

_getMaxNbRecords

package

Default

« More »

_outputDBData

package

Default

Arguments

$bAllowExportAllDb

$bEchoOutput

$sFileName

$oFile

« More »

_outputDBDescription

package

Default

Arguments

$sDbName

$bAllowExportAllDb

« More »

_outputRecords

package

Default

Arguments

$sTableName

$aFieldNames

$aRecords

« More »

_outputTableData

Outputs the table data in sql format

package

Default

Arguments

$sTableName

$oTableData

$bEchoOutput

$sFileName

$oFile

« More »

_outputTableDescription

Outputs the table structure in sql format

package

Default

Arguments

$sTableName

« More »

_twig_escape_css_callback

package

Default

Arguments

$matches

« More »

_twig_escape_html_attr_callback

This function is adapted from code coming from Zend Framework.

package

Default

copyright

Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)

license

https://framework.zend.com/license/new-bsd New BSD License

Arguments

$matches

« More »

_twig_escape_js_callback

package

Default

Arguments

$matches

« More »

_twig_markup2string

package

Default

Arguments

$value

« More »

addColumn

package

Default

Arguments

$sTableName

$sColumn

$sType

string

« More »

addPrimaryKey

package

Default

Arguments

$sTablename

string

$aColumns

« More »

aEncodingsArray

Return accepted codingsArray for importing files

Used in vvimport TODO : use in token and

package

Default

Response

array

« More »

alterColumn

package

Default

Arguments

$sTable

$sColumn

string

$sFieldType

string

$bAllowNull

$sDefault

« More »

alterLanguageCode

Renames a language code in the whole LimeSurvey database

package

Default

Arguments

$sOldLanguageCode

string

$sNewLanguageCode

string

« More »

alternation

package

Default

Arguments

$alternate

$type

« More »

App

Helper function to replace calls to Yii::app() and enable correct code completion.

package

Default

Response

\LSYii_Application

« More »

array_diff_assoc_recursive

package

Default

Arguments

$array1

$array2

« More »

arraySearchByKey

package

Default

Arguments

$needle

mixed

$haystack

mixed

$keyname

string

$maxanswers

integer

Response

array

« More »

bcadd

Add two arbitrary precision numbers

package

Default

var

optional

Arguments

$left_operand

$right_operand

$scale

« More »

bccomp

Compare two arbitrary precision numbers

package

Default

var

optional

Arguments

$left_operand

$right_operand

$scale

« More »

bcdiv

Divide two arbitrary precision numbers

package

Default

var

optional

Arguments

$dividend

$divisor

$scale

« More »

bcmod

Get modulus of an arbitrary precision number

package

Default

var

optional

Arguments

$dividend

$divisor

$scale

« More »

bcmul

Multiply two arbitrary precision numbers

package

Default

var

optional

Arguments

$dividend

$divisor

$scale

« More »

bcpow

Raise an arbitrary precision number to another

package

Default

var

optional

Arguments

$base

$exponent

$scale

« More »

bcpowmod

Raise an arbitrary precision number to another, reduced by a specified modulus

package

Default

var

optional

Arguments

$base

$exponent

$modulus

$scale

« More »

bcscale

Set or get default scale parameter for all bc math functions

package

Default

var

Arguments

$scale

« More »

bcsqrt

Get the square root of an arbitrary precision number

package

Default

var

optional

Arguments

$operand

$scale

« More »

bcsub

Subtract one arbitrary precision number from another

package

Default

var

optional

Arguments

$left_operand

$right_operand

$scale

« More »

beautify_filename

package

Default

Arguments

$filename

string

« More »

breakToNewline

package

Default

Arguments

$data

« More »

buildLabelSetCheckSumArray

package

Default

« More »

buildSelects

Builds the list of addon SQL select statements that builds the query result set

@param array $allfields An array containing the names of the fields/answers we want to display in the statistics summary

package

Default

Arguments

$allfields

$surveyid

integer

@param string $language The language to use

@return array $selects array of individual select statements that can be added/appended to the 'where' portion of a SQL statement to restrict the result set ie: array("FIELDNAME='Y'", "FIELDNAME2='Hello'");

$language

« More »

buildXMLFromQuery

buildXMLFromQuery() creates a datadump of a table in XML using XMLWriter

package

Default

Arguments

$xmlwriter

mixed

The existing XMLWriter object

$Query

mixed

The table query to build from

$tagname

string

If the XML tag of the resulting question should be named differently than the table name set it here

$excludes

array<mixed,string>

array of columnames not to include in export

$iSurveyID

« More »

calculateTotalFileUploadUsage

This function calculates how much space is actually used by all files uploaded using the File Upload question type

package

Default

returns

integer Actual space used in MB

« More »

canShowDatePicker

Check whether we can show the JS date picker with the current format

package

Default

returns

integer

Arguments

$dateformatdetails

array Date format details for the question

$dateformats

array Available date formats

« More »

check

package

Default

deprecated 2018-01-29

has undefined function my_utf8_decode inside !!

Arguments

$input

$flags

$min

string

$max

string

Response

boolean

« More »

check_float

package

Default

Arguments

$input

$min

$max

« More »

check_html_string

package

Default

Arguments

$input

$min

$max

« More »

check_int

package

Default

Arguments

$input

$min

$max

« More »

check_ip_address

Checks the validity of IP address $ip

package

Default

Arguments

$ip

string

to check

Response

boolean

true if the $ip is a valid IP address

« More »

check_ldap_string

package

Default

Arguments

$input

$min

$max

« More »

check_paranoid_string

package

Default

Arguments

$input

$min

$max

« More »

check_system_string

package

Default

Arguments

$input

$min

$max

« More »

CheckAuthentication

package

KCFinder @version 3.12 @author Dany Alejandro Cabrera otello2040@gmail.com

Arguments

$drupal_path

« More »

checkCaptchaSupport

package

system

« More »

CheckForDBUpgrades

This functions checks if the databaseversion in the settings table is the same one as required If not then the necessary upgrade procedures are run

package

Default

Arguments

$subaction

« More »

checkGroup

checks consistency of groups

package

Default

Arguments

$postsid

integer

Response

\

« More »

checkHasGroup

checks if any group exists

package

Default

Arguments

$postsid

integer

Response

\

« More »

checkLSSession

package

KCFinder @version 3.12 @author Pavel Tzonkov sunhater@sunhater.com

« More »

checkMoveQuestionConstraintsForConditions

checkMoveQuestionConstraintsForConditions()

package

Default

Arguments

$sid

string

  • the currently selected survey

$qid

string

  • qid of the question you want to check possible moves

$newgid

string

  • (optional) get only constraints when trying to move to this particular GroupId otherwise, get all moves constraints for this question

Response

array

  • returns an array describing the conditions Array ( ['notAbove'] = null | Array ( Array ( gid1, group_order1, qid1, cid1 ) ) ['notBelow'] = null | Array ( Array ( gid2, group_order2, qid2, cid2 ) ) )

This should be read as:

  • this question can't be move above group gid1 in position group_order1 because of the condition cid1 on question qid1
  • this question can't be move below group gid2 in position group_order2 because of the condition cid2 on question qid2

« More »

checkQuestions

checks questions in a survey for consistency

package

Default

Arguments

$postsid

integer

$iSurveyID

integer

Response

array|boolean

$faildcheck

« More »

checkServerVar

package

system

« More »

checkWrongQuestionAttributes

This function checks if there are set wrong values ('Y' or 'N') into table question_attributes. These are set to 1 and 0 if needed.

package

Default

Arguments

$questionId

« More »

clean

package

Default

Arguments

$item

« More »

clean

package

Default

Arguments

$item

« More »

cleanLanguagesFromSurvey

cleanLanguagesFromSurvey() removes any languages from survey tables that are not in the passed list

package

Default

Arguments

$iSurveyID

$availlangs

string

  • space separated list of additional languages in survey

« More »

cleanTempDirectory

This function cleans files from the temporary directory being older than 1 day

package

Default

todo

Make the days configurable

« More »

cmpErrorTokens

Used by usort() to order Error tokens by their position within the string This must be outside of the class in order to work in PHP 5.2

package

Default

Arguments

$a

array

$b

array

Response

integer

« More »

cmpQuestionSeq

Used by usort() to order $this->questionSeq2relevance in proper order

package

Default

Arguments

$a

array

$b

array

Response

integer

« More »

cmpWarningTokens

package

Default

todo

Unify errors and warnings with a EMErrorComparableInterface

Arguments

Response

integer

« More »

composerRequireddb1a145e450f862353420acc5153e40

package

Default

Arguments

$fileIdentifier

$file

« More »

conditionalNewlineToBreak

used to translate simple text to html (replacing \n with <br />

package

Default

Arguments

$mytext

mixed

$ishtml

mixed

$encoded

Response

mixed

« More »

convertDateTimeFormat

This is a convenience function for the coversion of datetime values

package

Default

Arguments

$value

mixed

$fromdateformat

string

$todateformat

mixed

Response

string

« More »

convertGETtoPOST

convertGETtoPOST a function to create a post Request from get parameters !!! This functions result has to be wrappen in singlequotes!

package

Default

Arguments

$url

String

| The complete url with all parameters

Response

String

| The onclick action for the element

« More »

convertLStoDateTimePickerLocale

This functions translates LimeSurvey specific locale code to a matching datetimepicker locale

package

Default

Arguments

$sLocale

string

LimeSurvey locale code

« More »

convertPHPSizeToBytes

This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case)

package

Default

Arguments

$sSize

string

Response

integer

The value in bytes

« More »

convertToGlobalSettingFormat

This is a convenience function to convert any date, in any date format, to the global setting date format Check if the time shoul be rendered also

package

Default

Arguments

$sDate

string

$withTime

boolean

Response

string

« More »

CPDBExport

package

Default

Arguments

$data

$filename

string

« More »

createBoxes250

Create boxes table

package

Default

« More »

createChart

Generate a chart for a question

@param int $iQuestionID ID of the question

package

Default

Arguments

$iQuestionID

$iSurveyID

integer

ID of the survey @param mixed $type Type of the chart to be created - null produces bar chart, any other value produces pie chart @param array $lbl An array containing the labels for the chart items @param mixed $gdata An array containing the percentages for the chart items @param mixed $grawdata An array containing the raw count for the chart items @param pCache $cache An object containing [Hashkey] and [CacheFolder] @param mixed $sLanguageCode Language Code @param string $sQuestionType The question type @return false|string

$type

$lbl

$gdata

$grawdata

$cache

$sLanguageCode

$sQuestionType

« More »

createCompleteSGQA

This functions generates a a summary containing the SGQA for questions of a survey, enriched with options per question It can be used for the generation of statistics. Derived from StatisticsUserController

package

Default

Arguments

$iSurveyID

integer

Id of the Survey in question

$aFilters

array

an array which is the result of a query in Questions model

$sLanguage

string

Response

array

The summary

« More »

createFieldMap

This function generates an array containing the fieldcode, and matching data in the same order as the activate script

package

Default

Arguments

$survey

\Survey

Survey ActiveRecord model

$style

string

'short' (default) or 'full' - full creates extra information like default values

$force_refresh

\?boolean

  • Forces to really refresh the array, not just take the session copy

$questionid

boolean|integer

Limit to a certain qid only (for question preview) - default is false

$sLanguage

string

The language to use

$aDuplicateQIDs

array

Response

array

« More »

createFieldMap450

Returns the fieldmap for responses

package

Default

Throws
\CException

Arguments

$survey

Response

array

« More »

createPassword

package

Default

Arguments

$iPasswordLength

« More »

createRandomTempDir

Create a directory in tmp dir using a random string

package

Default

Arguments

$dir

string

the temp directory (if empty will use the one from configuration)

$prefix

string

wanted prefix for the directory

$mode

integer

wanted file mode for this directory

Response

string

the path of the created directory

« More »

createSurveyGroupTables306

package

Default

Arguments

$oDB

\CDbConnection

« More »

createSurveyMenuTable

package

Default

Arguments

$oDB

\CDbConnection

« More »

createSurveysGroupSettingsTable

package

Default

Arguments

$oDB

\CDbConnection

« More »

createTimingsFieldMap

This function generates an array containing the fieldcode, and matching data in the same order as the activate script

package

Default

Arguments

$surveyid

string

The Survey ID

$style

string

'short' (default) or 'full' - full creates extra information like default values

$force_refresh

boolean

  • Forces to really refresh the array, not just take the session copy

$questionid

integer

Limit to a certain qid only (for question preview) - default is false

$sQuestionLanguage

string

The language to use

Response

array

« More »

createXMLfromData

package

Default

Arguments

$aData

« More »

crypto_rand_secure

Get a random number between two values using openssl_random_pseudo_bytes

package

Default

Arguments

$min

integer

$max

integer

Response

string

« More »

CSVImportResponses

This function imports a CSV file into the response table CSV file is deleted during process

package

Default

Arguments

$sFullFilePath

string

$iSurveyId

integer

$aOptions

array

Return array $result ("errors","warnings","success")

« More »

CSVUnquote

This function removes surrounding and masking quotes from the CSV field

package

Default

Arguments

$field

mixed

Response

mixed

« More »

ctype_alnum

package

Default

Arguments

$text

\mixed

« More »

ctype_alnum

package

Default

Arguments

$text

« More »

ctype_alpha

package

Default

Arguments

$text

« More »

ctype_alpha

package

Default

Arguments

$text

\mixed

« More »

ctype_cntrl

package

Default

Arguments

$text

\mixed

« More »

ctype_cntrl

package

Default

Arguments

$text

« More »

ctype_digit

package

Default

Arguments

$text

\mixed

« More »

ctype_digit

package

Default

Arguments

$text

« More »

ctype_graph

package

Default

Arguments

$text

\mixed

« More »

ctype_graph

package

Default

Arguments

$text

« More »

ctype_lower

package

Default

Arguments

$text

\mixed

« More »

ctype_lower

package

Default

Arguments

$text

« More »

ctype_print

package

Default

Arguments

$text

« More »

ctype_print

package

Default

Arguments

$text

\mixed

« More »

ctype_punct

package

Default

Arguments

$text

« More »

ctype_punct

package

Default

Arguments

$text

\mixed

« More »

ctype_space

package

Default

Arguments

$text

\mixed

« More »

ctype_space

package

Default

Arguments

$text

« More »

ctype_upper

package

Default

Arguments

$text

\mixed

« More »

ctype_upper

package

Default

Arguments

$text

« More »

ctype_xdigit

package

Default

Arguments

$text

\mixed

« More »

ctype_xdigit

package

Default

Arguments

$text

« More »

currentRelevecanceClass

Return class of a specific row (hidden by relevance)

package

Default

Arguments

$surveyId

integer

actual survey id

$baseName

string

the base name of the question

$name

string

The name of the question/row to test

$aQuestionAttributes

array

the question attributes

Response

string

« More »

dateShift

example usage $date = "2006-12-31 21:00"; $shift "+6 hours"; // could be days, weeks.

.. see function strtotime() for usage

echo sql_date_shift($date, "Y-m-d H:i:s", $shift);

will output: 2007-01-01 03:00:00

package

Default

Arguments

$date

string

$dformat

string

$shift

mixed

Response

string

« More »

db_upgrade_all

package

Default

Arguments

$iOldDBVersion

integer

The previous database version

$bSilent

boolean

Run update silently with no output - this checks if the update can be run silently at all. If not it will not run any updates at all.

« More »

dbExecuteAssoc

package

Default

deprecated

Do not use anymore. If you see this replace it with a proper ActiveRecord Model query

Throws
\Exception

Arguments

$sql

string

$inputarr

array|boolean

$silent

boolean

Response

boolean|\CDbDataReader

« More »

dbGetTablesLike

Gets the table names. Do not prefix.

package

Default

uses

To get the tables like sql query

Arguments

$table

string

String to match

Response

array

Array of matched table names

« More »

dbQuoteAll

Escapes a text value for db

package

Default

Arguments

$value

string

Response

string

« More »

dbRandom

Return the database-specific random function to use in ORDER BY sql statements

package

Default

Response

string

« More »

dbSelectTablesLike

Return a sql statement for finding LIKE named tables Be aware that you have to escape underscore chars by using a backslash otherwise you might get table names returned you don't want

package

Default

Arguments

$table

mixed

Response

string

« More »

decodeTokenAttributes

Decodes token attribute data because due to bugs in the past it can be written in JSON or be serialized - future format should be JSON as serialized data can be exploited

package

Default

Arguments

$oTokenAttributeData

string

The original token attributes as stored in the database

Response

array|mixed

« More »

decryptArchivedTables450

Update Encryption for archived tables

package

Default

Throws
\CDbException
\CException

Arguments

$oDB

\CDbConnection

« More »

decryptCPDBTable450

Update encryption for CPDB participants

package

Default

Throws
\CException

Arguments

$oDB

\CDbConnection

« More »

decryptParticipantTables450

Update encryption for survey participants

package

Default

Arguments

$oDB

\CDbConnection

« More »

decryptResponseTables450

Update encryption for survey responses

package

Default

Throws
\CException

Arguments

$oDB

\CDbConnection

« More »

do_array

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\RenderArrayFlexibleRow

Arguments

$ia

« More »

do_array_10point

package

Default

Arguments

$ia

« More »

do_array_5point

Construct answer part array_5point

package

Default

Arguments

$ia

array

Response

array

« More »

do_array_dual

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\ArrayMultiscale

Arguments

$ia

« More »

do_array_increasesamedecrease

package

Default

Arguments

$ia

« More »

do_array_multiflexi

package

Default

Arguments

$ia

« More »

do_array_texts

package

Default

Arguments

$ia

« More »

do_array_yesnouncertain

package

Default

Arguments

$ia

« More »

do_arraycolumns

Renders array by column question type.

package

Default

Throws
\CException

Arguments

$ia

array

Response

array

« More »

do_file_upload

package

Default

Arguments

$ia

« More »

do_gender

Renders Gender Question Types.

package

Default

Arguments

$ia

array

Response

array

« More »

do_hugefreetext

package

Default

Arguments

$ia

« More »

do_language

package

Default

Arguments

$ia

« More »

do_list_dropdown

package

Default

Arguments

$ia

« More »

do_list_radio

package

Default

Arguments

$ia

« More »

do_listwithcomment

package

Default

Arguments

$ia

« More »

do_longfreetext

package

Default

Arguments

$ia

« More »

do_multiplechoice

package

Default

Arguments

$ia

« More »

do_multiplechoice_withcomments

package

Default

Arguments

$ia

« More »

do_multiplenumeric

package

Default

deprecated 4.?.?
see \RenderMultipleNumerical\DataSetMultipleNumerical

Arguments

$ia

« More »

do_multipleshorttext

package

Default

Arguments

$ia

« More »

do_numerical

package

Default

Arguments

$ia

« More »

do_ranking

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\RankingStyle

Arguments

$ia

« More »

do_shortfreetext

package

Default

Arguments

$ia

« More »

do_yesno

Renders Yes/No Question Type.

package

Default

Arguments

$ia

array

Response

array

« More »

doFooter

package

Default

« More »

doHeader

package

Default

« More »

doRender

Render the question view.

By default, it just renders the required core view from application/views/survey/... If user added a question template in the upload dirctory, add applied it to the question in its display settings, then the function will check if the required view exist in this directory and then will use this one to render the question.

Rem: all the logic has been moved to LSETwigViewRenderer::renderQuestion() We keep the function doRender here for convenience (it will probably be removed in further cycles of dev). *

package

Default

Arguments

$sView

string

name of the view to be rendered.

$aData

array

data to be extracted into PHP variables and made available to the view script

$bReturn

boolean

whether the rendering result should be returned instead of being displayed to end users (should be always true)

« More »

doreplacement

package

Default

Arguments

$file

string

$data

$oTemplate

« More »

dropColumn

Drops a column, automatically removes blocking default value on MSSQL

package

Default

Arguments

$sTableName

string

$sColumnName

string

« More »

dropDefaultValueMSSQL

Drop a default value in MSSQL

package

Default

Arguments

$fieldname

string

$tablename

mixed

« More »

dropPrimaryKey

Drops the primary key of a table

package

Default

Arguments

$sTablename

string

$oldPrimaryKeyColumn

string

« More »

dropSecondaryKeyMSSQL

This function drops a secondary key of an MSSQL database field by using the field name and the table name

package

Default

Arguments

$sFieldName

string

$sTableName

mixed

« More »

dropUniqueKeyMSSQL

This function drops a unique Key of an MSSQL database field by using the field name and the table name

package

Default

Arguments

$sFieldName

string

$sTableName

string

« More »

dummy_twig_translation_helper

Dummy helper intended to facilitate "twig only" strings to be picked by Translations Bot.

Since twig files are not scanned by the bot, translatable strings that only appear in twig files can be placed here in order to be scanned.

package

Default

« More »

ellipsize

Ellipsize String

This public static function will strip tags from a string, split it at its max_length and ellipsize

package

Default

Arguments

$sString

string

string to ellipsize

$iMaxLength

integer

max length of string

$fPosition

integer

int (1|0) or float, .5, .2, etc for position to split

$sEllipsis

string

ellipsis ; Default '...'

Response

string

ellipsized string

« More »

emailTokens

Sends email to tokens - invitations, reminders, registers, and confirmations Seems used only in remote_control : maybe move it to ?

package

Default

Arguments

$iSurveyID

integer

$aResultTokens

array<mixed,\CActiveRecord>

$sType

string

type of notification invite|register|remind|confirm

Response

array

of results

« More »

enforceSSLMode

enforceSSLMode() $force_ssl is on or off, it checks if the current request is to HTTPS (or not). If $force_ssl is on, and the request is not to HTTPS, it redirects the request to the HTTPS version of the URL, if the request is to HTTPS, it rewrites all the URL variables so they also point to HTTPS.

package

Default

« More »

eT

As gT(), but echoes directly

package

Default

Arguments

$sToTranslate

string

$sEscapeMode

string

« More »

ETwigViewRendererVoidFunction

Function for adding global 'void' function in Twig Needed to make possible to call functions and methods which return non-string result (object, resources and etc.) For example: {{ void(App.clientScript.registerScriptFile(.

..)) }}

package

Default

Arguments

$argument

mixed

Response

string

« More »

expr_mgr_htmlspecialchars

Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES

package

Default

Arguments

$string

string

Response

string

« More »

expr_mgr_htmlspecialchars_decode

Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_convert_value

Find the closest matching Numerical input values in a list an replace it by the corresponding value within another list

package

Default

author

Johannes Weberhofer, 2013

Arguments

$fValueToReplace

double

$iStrict

integer

  • 1 for exact matches only otherwise interpolation the closest value should be returned

$sTranslateFromList

string

  • comma seperated list of numeric values to translate from

$sTranslateToList

string

  • comma seperated list of numeric values to translate to

Response

integer|null

« More »

exprmgr_count

Count the number of answered questions (non-empty)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_countif

Count the number of answered questions (non-empty) which match the first argument

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_countifop

Count the number of answered questions (non-empty) which meet the criteria (arg op value)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_date

Return format a local time/date Need to test if timestamp is numeric (else E_WARNING with debug>0)

package

Default

link

http://php.net/function.date.php

Arguments

$format

string

$timestamp

integer

Response

string|false

« More »

exprmgr_empty

Return true if the variable is NULL or blank.

package

Default

Arguments

$arg

null|string|boolean

Response

boolean

« More »

exprmgr_fixnum

Display number with comma as radix separator, if needed

package

Default

Arguments

$value

string

Response

string

« More »

exprmgr_if

If $test is true, return $iftrue, else return $iffalse

package

Default

Arguments

$testDone

mixed

$iftrue

mixed

$iffalse

mixed

Response

mixed

« More »

exprmgr_implode

Join together $args[1-N] with $arg[0]

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_int

Return true if the variable is an integer for LimeSurvey Allow usage of numeric answercode as int Can not use is_int due to SQL DECIMAL system.

package

Default

link

http://php.net/is_int#82857

Arguments

$arg

string

Response

integer

« More »

exprmgr_join

Join together $args[N]

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_list

Join together $args[0-N] with ', '

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_listifop

Implementation of listifop( $cmpAttr, $op, $value, $retAttr, $glue, $sgqa1, .

.., sgqaN ) Return a list of retAttr from sgqa1...sgqaN which pass the critiera (cmpAttr op value)

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_log

return log($arg[0],$arg[1]=e)

package

Default

Arguments

$args

array

Response

float

« More »

exprmgr_mktime

Get Unix timestamp for a date : false if parameters is invalid.

Get default value for unset (or null) value E_NOTICE if arguments are not numeric (debug>0), then test it before

package

Default

Arguments

$hour

integer

$minute

integer

$second

integer

$month

integer

$day

integer

$year

integer

Response

integer|boolean

« More »

exprmgr_regexMatch

Return true if $input matches the regular expression $pattern

package

Default

Arguments

$pattern

string

$input

string

Response

boolean

« More »

exprmgr_stddev

Compute the Sample Standard Deviation of a set of numbers ($args[0-N])

package

Default

Arguments

$args

array

Response

float

« More »

exprmgr_stripos

Find position of first occurrence of unicode string in a unicode string, case insensitive

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$offset

: offset

Response

integer|false

: position or false if not found

« More »

exprmgr_stristr

Finds first occurrence of a unicode string within another, case-insensitive

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$before_needle

boolean

: portion to return

Response

string|false

« More »

exprmgr_strlen

Get unicode string length

package

Default

Arguments

$string

string

Response

integer

« More »

exprmgr_strpos

Find position of first occurrence of unicode string in a unicode string

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$offset

integer

: offset

Response

integer|false

: position or false if not found

« More »

exprmgr_strstr

Finds first occurrence of a unicode string within another

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$before_needle

boolean

: portion to return

Response

string|false

« More »

exprmgr_strtolower

Make an unicode string lowercase

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_strtoupper

Make an unicode string uppercase

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_substr

Get part of unicode string

package

Default

Arguments

$string

string

$start

integer

$end

integer

Response

string

« More »

exprmgr_sumifop

Sum of values of answered questions which meet the criteria (arg op value)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_unique

Returns true if all non-empty values are unique

package

Default

Arguments

$args

array

Response

boolean

« More »

extendDatafields364

package

Default

Arguments

$oDB

« More »

extendDatafields429

package

Default

Arguments

$oDB

« More »

file_validation_message

package

Default

Arguments

$ia

« More »

file_validation_popup

package

Default

Arguments

$ia

$filenotvalidated

boolean

« More »

fileCsvToUtf8

Read a csv file and return a tmp resources to same file in utf8 CSV file is deleted during process

package

Default

Arguments

$fullfilepath

string

$encoding

string

from

Response

resource

« More »

fillDate

Take a date string and fill out missing parts, like day, hour, minutes (not seconds).

If string is NOT in standard date format (Y-m-d H:i), this methods makes no sense. Used when fetching answer for do_date, where answer can come from a default answer expression like date('Y'). Will also truncate date('c') to format Y-m-d H:i.

package

Default

Arguments

$dateString

string

Response

string

« More »

filterForAttributes

This is a helper function for getAttributeFieldNames

package

Default

Arguments

$fieldname

mixed

Response

boolean

« More »

fixCKeditorText

package

Default

Arguments

$str

string

« More »

fixKCFinder184

package

Default

« More »

fixLanguageConsistency

fixLanguageConsistency() fixes missing groups, questions, answers, quotas & assessments for languages on a survey

package

Default

Arguments

$sid

string

  • the currently selected survey

$availlangs

string

  • space separated list of additional languages in survey - if empty all additional languages of a survey are checked against the base language

$baselang

string

  • language to use as base (useful when changing the base language) - if empty, it will be picked from the survey

Response

boolean

  • always returns true

« More »

fixLanguageConsistencyAllSurveys

package

Default

« More »

fixMovedQuestionConditions

package

Default

Arguments

$qid

integer

$oldgid

$newgid

integer

$iSurveyID

integer

« More »

fixMySQLCollations

package

Default

Arguments

$sEncoding

string

$sCollation

string

« More »

fixNumbering

fixes the numbering of questions This can happen if question 1 have subquestion code 1 and have question 11 in same survey and group (then same SGQA)

package

Default

todo

can call this function (no $_GET, but getParam) AND do it with Yii

Arguments

$iQuestionID

$iSurveyID

integer

« More »

fixorder

Function rewrites the sortorder for a label set

package

Default

Arguments

$lid

mixed

Label set ID

« More »

fixPostgresSequence

This function fixes Postgres sequences for one/all tables in a database This is necessary if a table is renamed. If tablename is given then only that table is fixed

package

Default

Arguments

$tableName

string

Table name without prefix

« More »

fixSubquestions

This function fixes the group ID and type on all subquestions, or removes the subquestions if the parent question's type doesn't allow them.

Optimized for minimum memory usage even on huge databases

package

Default

« More »

flattenText

This functions removes all HTML tags, Javascript, CRs, linefeeds and other strange chars from a given text

package

Default

Arguments

$sTextToFlatten

string

Text you want to clean

$bKeepSpan

boolean

set to true for keep span, used for expression manager. Default: false

$bDecodeHTMLEntities

boolean

If set to true then all HTML entities will be decoded to the specified charset. Default: false

$sCharset

string

Charset to decode to if $decodeHTMLEntities is set to true. Default: UTF-8

$bStripNewLines

string

strip new lines if true, if false replace all new line by \r\n. Default: true

Response

string

Cleaned text

« More »

folderSize

Calculate folder size NB: If this function is changed, please notify LimeSurvey GmbH.

An exact copy of this function is used to calculate storage limit on LimeSurvey Pro hosting.

package

Default

Arguments

$dir

string

Folder

Response

integer

Size in bytes.

« More »

get_absolute_path

A function to remove .

./ or ./ from paths to prevent directory traversal

package

Default

Arguments

$path

string

Response

string

« More »

get_drupal_path

package

KCFinder @version 3.12 @author Dany Alejandro Cabrera otello2040@gmail.com

« More »

get_zip_originalsize

Get the original size of a zip archive to prevent Zip Bombing see comment here : http://php.net/manual/en/function.zip-entry-filesize.php

package

Default

Arguments

$filename

string

Response

integer

« More »

getArrayFilterExcludesCascadesForGroup

getArrayFilterExcludesCascadesForGroup() queries the database and produces a list of array_filter_exclude questions and targets with in the same group

package

Default

Arguments

$surveyid

$gid

$output

Response

array

a keyed nested array, keyed by the qid of the question, containing cascade information

« More »

getAttributeFieldNames

Retrieves the attribute field names from the related survey participants table

package

Default

Arguments

$iSurveyID

mixed

The survey ID

Response

array

The fieldnames

« More »

getBounceEmail

package

Default

Arguments

$surveyid

« More »

getBrowserLanguage

This function tries to find out a valid language code for the language of the browser used If it cannot find it it will return the default language from global settings

package

Default

« More »

getDateFormatData

Returns all available dateformats in a structured aray If $iDateFormat is given only the particual dateformat will be returned

package

Default

returns

array

Arguments

$iDateFormat

integer

$sLanguageCode

string

« More »

getDateFormatDataForQID

Get the date format details for a specific question.

package

Default

returns

array

Arguments

$aQidAttributes

array Question attributes

$mThisSurvey

mixed Array of Survey attributes or surveyid

$language

« More »

getDateFormatForSID

Get the date format for a specified survey

package

Default

returns

integer

Arguments

$surveyid

integer Survey id

$languagecode

string Survey language code (optional)

« More »

getDBConnectionStringProperty

package

Default

Arguments

$sProperty

string

« More »

getDirectorySize

package

Default

Arguments

$directory

string

Response

integer

« More »

getEditor

Returns Editor.

package

Default

Arguments

$fieldtype

string

Field Type

$fieldname

string

Field Name

$fieldtext

$surveyID

integer|null

Survey ID

$gID

integer|null

Group ID

$qID

integer|null

Question ID

$action

string

Action

Response

string

« More »

getEmailFormat

package

Default

Arguments

$surveyid

« More »

geterrors_exprmgr_regexMatch

Return error information from pattern of regular expression $pattern

package

Default

Arguments

$pattern

string

$input

string

Response

string|null

« More »

getExtendedAnswer

package

Default

Arguments

$iSurveyID

integer

The Survey ID

$sFieldCode

string

Field code of the particular field

$sValue

string

The stored response value

$sLanguage

string

Initialized limesurvey_lang object for the resulting response data

Response

string

« More »

getFooter

This function returns the Footer as result string If you want to echo the Footer use doFooter()!

package

Default

Response

string

« More »

getFullResponseTable

Creates an array with details on a particular response for display purposes Used in Print answers, Detailed response view and Detailed admin notification email

package

Default

Arguments

$iSurveyID

mixed

$iResponseID

mixed

$sLanguageCode

mixed

$bHonorConditions

boolean

Apply conditions

Response

array

« More »

getGidNext

getGidNext() returns the Gid of the group next to the current active group

package

Default

Arguments

$surveyid

integer

$gid

integer

Response

integer|string

The Gid of the next group or blank string if no group

« More »

getGidPrevious

getGidPrevious() returns the Gid of the group prior to the current active group

package

Default

Arguments

$surveyid

integer

$gid

integer

Response

integer|string

The GID of the previous group or blank string if no group

« More »

getGlobalSetting

Returns a global setting

package

Default

deprecated

: use App()->getConfig($settingname) since all config are set at start of App : no need to read and test again

Arguments

$settingname

string

Response

string

« More »

getGroupDepsForConditions

getGroupDepsForConditions() get Dependencies between groups caused by conditions

package

Default

Arguments

$sid

string

  • the currently selected survey

$depgid

string

  • (optional) get only the dependencies applying to the group with gid depgid

$targgid

string

  • (optional) get only the dependencies for groups dependents on group targgid

$indexby

string

  • (optional) "by-depgid" for result indexed with $res[$depgid][$targgid] "by-targgid" for result indexed with $res[$targgid][$depgid]

Response

array

  • returns an array describing the conditions or NULL if no dependecy is found

Example outupt assumin $index-by="by-depgid": Array ( [125] => Array // Group Id 125 is dependent on ( [123] => Array // Group Id 123 ( [depgpname] => G3 // GID-125 has name G3 [targetgpname] => G1 // GID-123 has name G1 [conditions] => Array ( [189] => Array // Because Question Id 189 ( [0] => 9 // Have condition 9 set [1] => 10 // and condition 10 set [2] => 14 // and condition 14 set )

                   )

           )

       [124] => Array         // GID 125 is also dependent on GID 124
           (
               [depgpname] => G3
               [targetgpname] => G2
               [conditions] => Array
                   (
                       [189] => Array // Because Question Id 189 have conditions set
                           (
                               [0] => 11
                           )

                       [215] => Array // And because Question Id 215 have conditions set
                           (
                               [0] => 12
                           )

                   )

           )

   )

)

Usage example:

  • Get all group dependencies for SID $sid indexed by depgid: $result=getGroupDepsForConditions($sid);
  • Get all group dependencies for GID $gid in survey $sid indexed by depgid: $result=getGroupDepsForConditions($sid,$gid);
  • Get all group dependents on group $gid in survey $sid indexed by targgid: $result=getGroupDepsForConditions($sid,"all",$gid,"by-targgid");

« More »

getGroupList3

package

Default

Arguments

$gid

$surveyid

« More »

getGroupListLang

put your comment there.

..

package

Default

Arguments

$gid

mixed

$language

mixed

$surveyid

Response

string

« More »

getGroupOrder

Queries the database for the sortorder of a group.

package

Default

Arguments

$gid

mixed

The groups ID

Response

integer

The sortorder digit

« More »

getHeader

get the header

package

Default

Arguments

$meta

boolean

: not used in any call (2016-10-18)

Response

string

« More »

getInlineEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

« More »

getIPAddress

This function tries to returns the 'real' IP address under all configurations Do not rely security-wise on the detected IP address as except for REMOTE_ADDR all fields could be manipulated by the web client

package

Default

Response

string

Client's IP Address

« More »

getJSDateFromDateFormat

Convert a 'dateformat' format string to a 'jsdate' format.

For Bootstrap, that means using capital letters, e.g. MM/DD/YYYY instead of mm/dd/yyyy and mm instead of MM for minutes.

package

Default

returns

string

Arguments

$sDateformat

string

« More »

getLabelInputWidth

Find the label / input width

package

Default

Arguments

$labelAttributeWidth

string|integer

label width from attribute

$inputAttributeWidth

string|integer

input width from attribute

Response

array

labelWidth as integer,inputWidth as integer,defaultWidth as boolean

« More »

getLabelSets

Returns labelsets for given language(s), or for all if null

package

Default

Arguments

$languages

string

Response

array

« More »

getLanguageCodefromLanguage

Returns a language code from the name

package

Default

Arguments

$languagetosearch

string

this is the name of the language (e.g. 'English' see array in getLanguageData())

Response

integer|string

« More »

getLanguageData

package

Default

Arguments

$bOrderByNative

boolean

$sLanguageCode

string

Response

mixed

« More »

getLanguageDataRestricted

package

Default

Arguments

$bOrderByNative

$sDetail

« More »

getLanguageDetails

Returns the locale settings for a certain language code

package

Default

Arguments

$codetosearch

string

Response

array

Array with locale details

« More »

getLanguageNameFromCode

Returns a language name from the code

package

Default

todo

Should not give back different data types

Arguments

$codetosearch

string

$withnative

boolean

$sTranslationLanguage

string

Response

string|array

« More »

getLanguageRTL

package

Default

Arguments

$sLanguageCode

« More »

getLastInsertID

Retrieves the last Insert ID realiable for cross-DB applications

package

Default

Arguments

$sTableName

string

Needed for Postgres and MSSQL

Response

string

« More »

getLatLongFromIp

package

Default

Arguments

$sIPAddress

« More »

getListOfFiles

package

Default

Arguments

$wh

« More »

getLoaderHTML

package

Default

Arguments

$fieldname

« More »

getMaxGroupOrder

Queries the database for the maximum sortorder of a group and returns the next higher one.

package

Default

Arguments

$surveyid

integer

The survey ID

Response

integer

Next free sortorder digit

« More »

getMaximumFileUploadSize

package

Default

« More »

getMaxQuestionOrder

Queries the database for the maximum sort order of questions inside question group.

package

Default

Arguments

$gid

integer

Response

integer

« More »

getModalEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

Response

string

« More »

getParticipantAttributes

Returns the full list of attribute token fields including the properties for each field Use this instead of plain Survey::model()->findByPk($iSurveyID)->tokenAttributes calls because Survey::model()->findByPk($iSurveyID)->tokenAttributes may contain old descriptions where the fields does not physically exist

package

Default

Arguments

$iSurveyID

integer

The Survey ID

Response

array

« More »

getPHPDateFromDateFormat

Convert a 'dateformat' format string to a 'phpdate' format.

package

Default

returns

string

Arguments

$sDateformat

string

string

« More »

getPopupEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

Response

string

« More »

getPreferredLanguage

package

system

« More »

getPrintableHeader

This function returns the header for the printable survey

package

Default

Response

String

« More »

getQuestDepsForConditions

getQuestDepsForConditions() get Dependencies between groups caused by conditions

package

Default

Arguments

$sid

string

  • the currently selected survey

$gid

string

  • (optional) only search dependecies inside the Group Id $gid

$depqid

string

  • (optional) get only the dependencies applying to the question with qid depqid

$targqid

string

  • (optional) get only the dependencies for questions dependents on question Id targqid

$indexby

string

  • (optional) "by-depqid" for result indexed with $res[$depqid][$targqid] "by-targqid" for result indexed with $res[$targqid][$depqid]

$searchscope

Response

array

  • returns an array describing the conditions or NULL if no dependecy is found

Example outupt assumin $index-by="by-depqid": Array ( [184] => Array // Question Id 184 ( [183] => Array // Depends on Question Id 183 ( [0] => 5 // Because of condition Id 5 )

   )

)

Usage example:

  • Get all questions dependencies for Survey $sid and group $gid indexed by depqid: $result=getQuestDepsForConditions($sid,$gid);
  • Get all questions dependencies for question $qid in survey/group $sid/$gid indexed by depqid: $result=getGroupDepsForConditions($sid,$gid,$qid);
  • Get all questions dependents on question $qid in survey/group $sid/$gid indexed by targqid: $result=getGroupDepsForConditions($sid,$gid,"all",$qid,"by-targgid");

« More »

getQuestionAttributeValue

Returns the questionAttribtue value set or '' if not set

package

Default

author

: lemeur

Arguments

$questionAttributeArray

$attributeName

string

$language

string Optional: The language if the particualr attributes is localizable

Response

string

« More »

getQuestionMapData

Return data to populate a Google Map

package

Default

Arguments

$sField

string

$qsid

Survey id

Response

array

« More »

getRadixPointData

Returns avaliable formats for Radix Points (Decimal Separators) or returns radix point info about a specific format.

@param int $format Format ID/Number [optional]

package

Default

Arguments

$format

Response

integer|array

« More »

getRandomString

Generate a random string, using openssl if available, else using md5

package

Default

Arguments

$length

integer

wanted lenght of the random string (only for openssl mode)

Response

string

« More »

getRelevantUpdates

Returns a sorted array of update objects with version higher than $iOldDBVersion

package

Default

todo

Move to class?

Arguments

$iOldDBVersion

integer

$db

\CDbConnection

$options

string

Response

array<mixed,\LimeSurvey\Helpers\Update\DatabaseUpdateBase>

« More »

getSerialClass

package

Default

Arguments

$sSerial

string

Response

string|null

« More »

getServerInfo

package

system

« More »

getStandardsReplacementFields

package

Default

Arguments

$thissurvey

« More »

getSubQuestions

Return an array of subquestions for a given sid/qid

package

Default

Arguments

$sid

integer

$qid

integer

$sLanguage

string

Language of the subquestion text

Response

array

« More »

getSurveyDefaultSettings

package

Default

« More »

getSurveyInfo

Gets all survey infos in one big array including the language specific settings

package

Default

Arguments

$surveyid

integer

The survey ID

$languagecode

string

The language code - if not given the base language of the particular survey is used

$force

boolean

If true, don't use memoization

Response

array|boolean

Returns array with survey info or false, if survey does not exist

« More »

getSurveyList

getSurveyList() Queries the database (survey table) for a list of existing surveys

package

Default

Arguments

$bReturnArray

boolean

If set to true an array instead of an HTML option list is given back

Response

string|array

This string is returned containing formatted list of existing surveys

« More »

getTemplatePath

This function returns the complete directory path to a given template name

package

Default

Arguments

$sTemplateName

mixed

Response

string

« More »

getTemplateURL

This function returns the complete URL path to a given template name

package

Default

Arguments

$sTemplateName

mixed

Response

string

« More »

getTokenFieldsAndNames

Retrieves the attribute names from the related survey participants table

package

Default

Arguments

$surveyid

mixed

The survey ID

$bOnlyAttributes

boolean

Set this to true if you only want the fieldnames of the additional attribue fields - defaults to false

Response

array

The fieldnames as key and names as value in an Array

« More »

getUserGroupList

Get a list of all user groups All user group or filtered according to usercontrolSameGroupPolicy

package

Default

returns

array

« More »

getUserList

Returns a user list. If 'usercontrolSameGroupPolicy' is set and set to true, only users which are in the same group as me (--> logged in user) will be returned. Superadmin always gets the full list of users.

package

Default

Arguments

$outputformat

string could be 'onlyuidarray' which only returns array with userids, default is 'fullinfoarray'

Response

array

returns a list of user ids (param='onlyuidarray') or a list with full user details (e.g. uid, name, full_name etc.)

« More »

getXMLDataSingleTable

Exports a single table to XML

package

Default

Arguments

$iSurveyID

integer

The survey ID

$sTableName

string

The database table name of the table to be export

$sDocType

string

What doctype should be written

$sXMLTableTagName

string

Name of the tag table name in the XML file

$sFileName

$bSetIndent

Response

string|boolean

XMLWriter object

« More »

getXMLWriter

Wrapper function to retrieve an xmlwriter object and do error handling if it is not compiled into PHP

package

Default

« More »

getYiiVersion

package

system

« More »

group_export

package

Default

Arguments

$action

string

$iSurveyID

$gid

« More »

groupGetXMLStructure

package

Default

Arguments

$xml

\XMLWriter

$gid

« More »

groupOrderThenQuestionOrder

Compares two elements from an array (passed by the usort function) and returns -1, 0 or 1 depending on the result of the comparison of the sort order of the group_order and question_order field Used by : - remotecontrol_handle->export_statistics with merging group and question attributes (all in same array) - checkQuestions() in activate_helper function with ?

package

Default

Arguments

$a

mixed

$b

mixed

Response

integer

« More »

gT

Returns $sToTranslate translated to $sLanguage (defaults to lang set in session) escaped with $sEscapeMode

package

Default

Arguments

$sToTranslate

string

$sEscapeMode

string

Valid values are html (this is the default, js and unescaped)

$sLanguage

string

Response

string

« More »

hasFileUploadQuestion

Returns true if the given survey has a File Upload Question Type

package

Default

Arguments

$iSurveyID

integer

Response

boolean

« More »

hasResources

put your comment there.

..

package

Default

Arguments

$id

integer

$type

string

Response

boolean

« More »

hasTemplateManageRights

package

Default

Arguments

$userid

$sThemeFolder

« More »

HTMLEscape

make a string safe to include in an HTML 'value' attribute.

package

Default

deprecated

If you need this you are doing something wrong. Use CHTML functions instead.

Arguments

$str

« More »

humanFilesize

Format size in human readable format.

package

Default

Arguments

$bytes

integer

$decimals

integer

Response

string

« More »

importDefaultValues

Import default values inside $xml, record process in $results Also imports defaultvalue_l10ns.

package

Default

Arguments

$xml

\SimpleXMLElement

$aLanguagesSupported

array

$aQIDReplacements

$results

array

« More »

importSurveyFile

package

Default

Arguments

$sFullFilePath

string

$bTranslateLinksFields

boolean

$sNewSurveyName

string

$DestSurveyID

integer

« More »

includeKeypad

Include Keypad headers

package

Default

« More »

incompleteAnsFilterState

This function return actual completion state

package

Default

Response

string|boolean

(complete|incomplete|all) or false

« More »

initKcfinder

package

Default

« More »

insertlabelset

package

Default

Response

\LabelSet

« More »

is_template_editable

This function checks if a certain template may be by modified, copied, deleted according to the settings in config.php

package

Default

Arguments

$templatename

mixed

« More »

isAssociativeArray

Check if array is associative

package

Default

Arguments

$array

array

Response

boolean

« More »

isCaptchaEnabled

isCaptchaEnabled($screen, $usecaptchamode)

package

Default

Arguments

$screen

string

  • the screen name for which to test captcha activation

$captchamode

Response

boolean|null

  • returns true if captcha must be enabled

« More »

isJson

Check if string is JSON array

package

Default

Arguments

$str

string

Response

boolean

« More »

isNumericExtended

Returns true if passed $value is numeric

package

Default

Arguments

$value

Response

boolean

« More »

isNumericInt

Check if $str is an integer, or string representation of an integer

package

Default

Arguments

$mStr

string

Response

boolean|integer

« More »

isTokenCompletedDatestamped

package

Default

Arguments

$thesurvey

« More »

isZipBomb

Test if a given zip file is Zip Bomb see comment here : http://php.net/manual/en/function.zip-entry-filesize.php

package

Default

Arguments

$zip_filename

string

Response

integer

« More »

javascriptEscape

package

Default

Arguments

$str

$strip_tags

$htmldecode

« More »

json_decode_ls

Decode a json string, sometimes needs stripslashes

package

Default

Arguments

$jsonString

string

Response

mixed

« More »

json_encode

package

KCFinder @version 3.12 @author Pavel Tzonkov sunhater@sunhater.com

Arguments

$data

« More »

jsonEscape

package

Default

Arguments

$str

$strip_tags

$htmldecode

« More »

languageDropdown

package

Default

Arguments

$surveyid

$selected

« More »

languageDropdownClean

Creates a <select> HTML element for language selection for this survey

package

Default

Arguments

$surveyid

integer

$selected

string

The selected language

Response

string

« More »

ldap_bindCnx

package

Default

Arguments

$ds

$server_id

« More »

ldap_doTokenSearch

package

Default

Arguments

$ds

$ldapq

$ResArray

$surveyid

integer

« More »

ldap_getCnx

package

Default

Arguments

$server_id

« More »

ldap_readattr

package

Default

Arguments

$attr

« More »

ldap_search_withScope

package

Default

Arguments

$ds

mixed

$basedn

mixed

$filter

mixed

$attrlist

mixed

$scope

mixed

« More »

longestString

longestString() returns the length of the longest string past to it.

package

Default

peram

string $new_string

integer $longest_length length of the (previously) longest string passed to it.

Arguments

$new_string

$longest_length

integer

Response

integer

representing the length of the longest string passed (updated if $new_string was longer than $longest_length)

usage should look like this: $longest_length = longestString( $new_string , $longest_length );

« More »

ls_json_encode

Must use ls_json_encode to json_encode content, otherwise LimeExpressionManager will think that the associative arrays are expressions and try to parse them.

package

Default

Arguments

$content

« More »

mandatory_message

package

Default

Arguments

$ia

« More »

mandatory_popup

package

Default

Arguments

$ia

$notanswered

« More »

MaskFormula

package

Default

Arguments

$sValue

« More »

mb_check_encoding

package

Default

Arguments

$value

$encoding

« More »

mb_chr

package

Default

Arguments

$codepoint

$encoding

« More »

mb_convert_case

package

Default

Arguments

$string

$mode

$encoding

« More »

mb_convert_encoding

package

Default

Arguments

$string

$to_encoding

$from_encoding

« More »

mb_convert_variables

package

Default

Arguments

$to_encoding

$from_encoding

$vars

« More »

mb_decode_mimeheader

package

Default

Arguments

$string

« More »

mb_decode_numericentity

package

Default

Arguments

$string

$map

$encoding

« More »

mb_detect_encoding

package

Default

Arguments

$string

$encodings

$strict

« More »

mb_detect_order

package

Default

Arguments

$encoding

« More »

mb_encode_mimeheader

package

Default

Arguments

$string

$charset

$transfer_encoding

$newline

$indent

« More »

mb_encode_numericentity

package

Default

Arguments

$string

$map

$encoding

$hex

« More »

mb_encoding_aliases

package

Default

Arguments

$encoding

« More »

mb_get_info

package

Default

Arguments

$type

« More »

mb_http_input

package

Default

Arguments

$type

« More »

mb_http_output

package

Default

Arguments

$encoding

« More »

mb_internal_encoding

package

Default

Arguments

$encoding

« More »

mb_language

package

Default

Arguments

$language

« More »

mb_list_encodings

package

Default

« More »

mb_ord

package

Default

Arguments

$string

$encoding

« More »

mb_output_handler

package

Default

Arguments

$string

$status

« More »

mb_parse_str

package

Default

Arguments

$string

$result

« More »

mb_scrub

package

Default

Arguments

$string

$encoding

« More »

mb_str_split

package

Default

Arguments

$string

$length

$encoding

« More »

mb_stripos

package

Default

Arguments

$haystack

$needle

$offset

$encoding

« More »

mb_stristr

package

Default

Arguments

$haystack

$needle

$before_needle

$encoding

« More »

mb_strlen

package

Default

Arguments

$string

$encoding

« More »

mb_strpos

package

Default

Arguments

$haystack

$needle

$offset

$encoding

« More »

mb_strrchr

package

Default

Arguments

$haystack

$needle

$before_needle

$encoding

« More »

mb_strrichr

package

Default

Arguments

$haystack

$needle

$before_needle

$encoding

« More »

mb_strripos

package

Default

Arguments

$haystack

$needle

$offset

$encoding

« More »

mb_strrpos

package

Default

Arguments

$haystack

$needle

$offset

$encoding

« More »

mb_strstr

package

Default

Arguments

$haystack

$needle

$before_needle

$encoding

« More »

mb_strtolower

package

Default

Arguments

$string

$encoding

« More »

mb_strtoupper

package

Default

Arguments

$string

$encoding

« More »

mb_strwidth

package

Default

Arguments

$string

$encoding

« More »

mb_substitute_character

package

Default

Arguments

$substitute_character

« More »

mb_substr

package

Default

Arguments

$string

$start

$length

$encoding

« More »

mb_substr_count

package

Default

Arguments

$haystack

$needle

$encoding

« More »

mkdir_p

package

Default

Arguments

$target

string

« More »

modifyDatabase

Run an arbitrary sequence of semicolon-delimited SQL commands

Assumes that the input text (file or string) consists of a number of SQL statements ENDING WITH SEMICOLONS. The semicolons MUST be the last character in a line. Lines that are blank or that start with "#" or "--" (postgres) are ignored. Only tested with mysql dump files (mysqldump -p -d limesurvey) Function kindly borrowed by Moodle

package

Default

Arguments

$sqlfile

string

The path where a file with sql commands can be found on the server.

$sqlstring

string

If no path is supplied then a string with semicolon delimited sql commands can be supplied in this argument.

Response

boolean

Returns true if database was modified successfully.

« More »

modifyPrimaryKey

Modifies a primary key in one command - this is only tested on MySQL

package

Default

Arguments

$sTablename

string

The table name

$aColumns

array<mixed,string>

Column names to be in the new key

« More »

modlabelsetanswers

package

Default

Arguments

$lid

null|integer

« More »

mssql_drop_constraint

package

Default

Arguments

$fieldname

string

$tablename

string

« More »

mssql_drop_coulmn_with_constraints

Deletes a column and removes all constraints from it

package

Default

Arguments

$tablename

string

The table the column should be deleted

$columnname

string

The column that should be deleted

« More »

mssql_drop_primary_index

package

Default

Arguments

$tablename

string

« More »

neT

Translation helper function for plural forms which outputs right away

package

Default

Arguments

$sToTranslate

string

$iCount

integer

$sEscapeMode

string

« More »

ngT

Translation helper function for plural forms

package

Default

Arguments

$sTextToTranslate

string

$iCount

integer

$sEscapeMode

string

Response

string

« More »

nice_addslashes

package

Default

Arguments

$string

« More »

numericSize

Find the numeric size according DB size for existing question for SPSS export Column name must be SGQA currently

package

Default

Arguments

$sColumn

$decimal

boolean

db type as decimal(30,10)

Response

string

integersize.decimalsize

« More »

outputDatabase

Outputs a full dump of the current LimeSurvey database

package

Default

Arguments

$sDbName

string

Database Name

$bEchoOutput

$sFileName

« More »

PassthruReplace

passthruReplace() takes a string and looks for {PASSTHRU:myarg} variables which it then substitutes for parameter data sent in the initial URL and stored in the session array containing responses

package

Default

Arguments

$line

mixed

string - the string to iterate, and then return

$thissurvey

mixed

string - the string containing the surveyinformation

Response

string

This string is returned containing the substituted responses

« More »

permissionsAsArray

Checks Permission for the current user and returns an array with Permissions

package

Default

Arguments

$globalPermissions

array

$customPermissions

array

Response

array

« More »

pluginExtractFilter

PCLZip callback for plugin ZIP install.

package

Default

Arguments

$p_event

mixed

$p_header

mixed

Response

integer

Return 1 for yes (file can be extracted), 0 for no

« More »

populateDatabase

package

Default

Throws
\CHttpException
\CException

Arguments

$oDB

DbConnection

« More »

PrepareEditorScript

package

Default

Arguments

$load

$controller

\CController

« More »

prepareLDAPQuery

package

Default

Arguments

$queryId

« More »

questionExport

package

Default

Arguments

$action

string

$iSurveyID

$gid

$qid

« More »

questionGetXMLStructure

package

Default

Arguments

$xml

\XMLWriter

$gid

$qid

« More »

questionTitleSort

package

Default

Arguments

$a

$b

« More »

quexml_create_multi

from export_structure_quexml.php

package

Default

Arguments

$question

$qid

$varname

$iResponseID

$fieldmap

$scale_id

$free

$other

$yesvalue

$comment

« More »

quexml_create_question

Create a queXML question element

package

Default

Arguments

$RowQ

\CActiveRecord

Question details in array

$additional

boolean|string

Any additional question text to append

« More »

quexml_create_subQuestions

from export_structure_quexml.php

package

Default

Arguments

$question

$qid

$varname

$iResponseID

$fieldmap

$use_answers

$aid

$scale

« More »

quexml_export

Export quexml survey.

package

Default

Arguments

$surveyi

$quexmllan

$iResponseID

« More »

quexml_get_lengthth

from export_structure_quexml.php

package

Default

Arguments

$qid

$attribute

$default

$quexmllang

« More »

quexml_reformat_date

Format defaultValue of Date/Time questions according to question date format

package

Default

Arguments

$element

mixed

DOM element with the date to change

$qid

integer

The qid of the question

$iSurveyID

integer

The survey id

« More »

quexml_set_default_value

Set defaultValue attribute of provided element from response table

package

Default

Arguments

$element

mixed

DOM element to add attribute to

$iResponseID

integer

The response id

$qid

integer

The qid of the question

$iSurveyID

integer

The survey id

$fieldmap

array

A mapping of fields to qid

$fieldadd

boolean|string

Anything additional to search for in the field name

$usesqid

boolean|string

Search using sqid instead of qid

$usesaid

boolean|string

Search using aid

$usesscale

« More »

quexml_set_default_value_rank

Set defaultValue attribute of provided element from response table

package

Default

Arguments

$element

mixed

DOM element to add attribute to

$iResponseID

integer

The response id

$qid

integer

The qid of the question

$iSurveyID

integer

The survey id

$fieldmap

array

A mapping of fields to qid

$acode

string

The answer code to search for

« More »

QueXMLCleanup

from export_structure_quexml.php

package

Default

Arguments

$string

$allow

« More »

QueXMLCreateFixed

from export_structure_quexml.php

package

Default

Arguments

$qid

$iResponseID

$fieldmap

$rotate

$labels

$scale

$other

$varname

« More »

QueXMLCreateFree

from export_structure_quexml.php

package

Default

Arguments

$f

$len

$lab

« More »

QueXMLFixedArray

from export_structure_quexml.php

package

Default

Arguments

$array

« More »

QueXMLSkipTo

Calculate if this item should have a QueXMLSkipTo element attached to it

from export_structure_quexml.php

package

Default

author

Adam Zammit adam.zammit@acspri.org.au

since 2010-10-28
TODO

Correctly handle conditions in a database agnostic way

Arguments

$qid

mixed

$value

mixed

$cfieldname

Response

boolean|string

Text of item to skip to otherwise false if nothing to skip to

« More »

quoteSPSS

Quotes a string with surrounding quotes and masking inside quotes by doubling them

package

Default

Arguments

$sText

string

Text to quote

$sQuoteChar

string

The quote character (Use ' for SPSS and " for R)

$aField

string

General field information from SPSSFieldmap

« More »

quoteText

Quotes a translation according to purpose if sEscapeMode is null, we use HTML method because probably we had to specify null as sEscapeMode upstream

package

Default

Arguments

$sText

mixed

Text to quote

$sEscapeMode

string

Optional - One of the values 'html','js' or 'unescaped' - defaults to 'html'

Response

mixed|string

« More »

RaiseFatal

package

Default

Arguments

$Message

« More »

randomChars

Creates a random sequence of characters

package

Default

Arguments

$length

integer

Length of resulting string

$pattern

string

To define which characters should be in the resulting string

Response

string

« More »

recursive_in_array

package

Default

Arguments

$needle

$haystack

« More »

recursive_preg_replace

Applies preg_replace recursively until $recursion_limit is exceeded or no more replacements are done.

package

Default

Arguments

$pattern

array|string

$replacement

array|string

$subject

array|string

$limit

integer

$count

integer

If specified, this variable will be filled with the total number of replacements done (including all iterations)

$recursion_limit

integer

Max number of iterations allowed

Response

string|array

« More »

regenerateCSRFToken

Force Yii to create a new CSRF token by removing the old one

package

Default

« More »

regenerateLabelCodes400

Regenerate codes for problematic label sets Helper function (TODO: Put in separate class) Fails silently

package

Default

Arguments

$lid

integer

Label set id

$hasLanguageColumn

boolean

Should be true before dbversion 400 is finished, false after

« More »

removeBOM

This function removes the UTF-8 Byte Order Mark from a string

package

Default

Arguments

$str

string

Response

string

« More »

removeMysqlZeroDate

Remove all zero-dates in $tableName by checking datetime columns from $tableSchema Zero-dates are replaced with null where possible; otherwise 1970-01-01

package

Default

Arguments

$tableName

string

$tableSchema

\CDbTableSchema

$oDB

\CDbConnection

« More »

renderFile

package

system

Arguments

$_file_

$_params_

« More »

replaceExpressionCodes

Replaces EM variable codes in a current survey with a new one

package

Default

Arguments

$iSurveyID

integer

The survey ID

$aCodeMap

mixed

The codemap array (old_code=>new_code)

« More »

ReplaceFields

package

Default

Arguments

$text

$fieldsarray

$bReplaceInsertans

$staticReplace

« More »

resetTutorials337

package

Default

Arguments

$oDB

\CDbConnection

« More »

resourceExtractFilter

Helper to filter the contents of a .zip file uploaded into the file manager

package

Default

Arguments

$p_event

$p_header

« More »

retrieveAnswers

This function returns an array containing the "question/answer" html display and a list of the question/answer fieldnames associated. It is called from question.php, group.php, survey.php or preview.php

package

Default

Arguments

$ia

array

Details of $ia can be found at top of this file

Response

array

Array like [array $qanda, array $inputnames] where $qanda has elements [ $qtitle (question_text) : array [ all : string; complete HTML?; all has been added for backwards compatibility with templates that use question_start.pstpl (now redundant) 'text' => $qtitle, question?? $ia[3]? 'code' => $ia[2] or title?? 'number' => $number 'help' => '' 'mandatory' => '' man_message : string; message when mandatory is not answered 'valid_message' => '' file_valid_message : string; only relevant for file upload 'class' => '' 'man_class' => '' 'input_error_class' => '' // provides a class. 'essentials' => '' ] $answer ? 'help' : string $display : ? $qid : integer $ia[2] = title; $ia[5] = group id : int $ia[1] = fieldname : string ] and $inputnames is ? used for hiddenfieldnames and upload file?

« More »

return_array_filter_strings

package

Default

Arguments

$ia

$aQuestionAttributes

$thissurvey

$ansrow

$rowname

string

$trbc

$valuename

string

$method

$class

« More »

return_display_style

package

Default

Arguments

$ia

$aQuestionAttributes

$thissurvey

$rowname

string

« More »

return_timer_script

package

Default

Arguments

$aQuestionAttributes

$ia

$disable

string

Response

string

« More »

returnGlobal

This function returns POST/REQUEST vars, for some vars like SID and others they are also sanitized TODO: extends Yii:getParam

package

Default

Arguments

$stringname

string

$bRestrictToString

boolean

Response

array|boolean|mixed|integer|null

« More »

reverseTranslateFieldNames

This function creates the old fieldnames for survey import

package

Default

Arguments

$iOldSID

mixed

The old survey id

$iNewSID

integer

The new survey id

$aGIDReplacements

array

An array with group ids (oldgid=>newgid)

$aQIDReplacements

array

An array with question ids (oldqid=>newqid)

Response

array|boolean

« More »

rmdirr

This function removes a directory recursively

package

Default

Arguments

$dirname

string

Response

boolean

« More »

rollBackToTransactionBookmark

Roll back to a transaction bookmark

package

Default

Arguments

$sBookmark

mixed

Name of the bookmark

« More »

runAddPrimaryKeyonAnswersTable400

package

Default

Arguments

$oDB

« More »

safecount

PHP7 has created a little nasty bomb with count throwing erroros on uncountables This is to "fix" this problem

package

Default

author

Arguments

$element

mixed

Response

integer

counted element

« More »

safeDie

Provides a safe way to end the application

package

Default

todo

This should probably never be used, since it returns 0 from CLI and makes PHPUnit think all is fine :(

Arguments

$sText

mixed

« More »

sanitize

package

Default

Arguments

$input

$flags

$min

$max

« More »

sanitize_alphanumeric

Remove all chars from $value that are not alphanumeric or dash or underscore

package

Default

Arguments

$value

string

Response

string

« More »

sanitize_cquestions

package

Default

Arguments

$string

$min

$max

« More »

sanitize_dirname

Function: sanitize_dirname sanitizes a string that will be used as a directory name

Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.

package

Default

Arguments

$string

$force_lowercase

$alphanumeric

« More »

sanitize_filename

Function: sanitize_filename Returns a sanitized string, typically for URLs.

Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.

package

Default

Arguments

$filename

$force_lowercase

$alphanumeric

$beautify

« More »

sanitize_float

package

Default

Arguments

$float

$min

$max

« More »

sanitize_html_string

package

Default

Arguments

$string

« More »

sanitize_int

package

Default

Arguments

$integer

$min

$max

« More »

sanitize_labelname

package

Default

Arguments

$string

« More »

sanitize_languagecode

package

Default

Arguments

$codetosanitize

« More »

sanitize_languagecodeS

package

Default

Arguments

$codestringtosanitize

string

« More »

sanitize_ldap_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_paranoid_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_signedint

package

Default

Arguments

$integer

$min

$max

« More »

sanitize_sql_db_tablename

package

Default

Arguments

$string

« More »

sanitize_system_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_user

package

Default

Arguments

$string

string

« More »

sanitize_userfullname

package

Default

Arguments

$string

« More »

sanitize_xss_string

package

Default

Arguments

$string

« More »

scanFile

package

Default

Arguments

$fileName

« More »

sendCacheHeaders

package

Default

« More »

SendEmailMessage

This function mails a text $body to the recipient $to.

You can use more than one recipient when using a semicolon separated string with recipients.

package

Default

deprecated

: leave it in 4.0 for plugins ? Must remove in 5.0 at minima.

Arguments

$body

string

Body text of the email in plain text or HTML

$subject

mixed

Email subject

$to

mixed

Array with several email addresses or single string with one email address

$from

mixed

$sitename

mixed

$ishtml

boolean

$bouncemail

mixed

$attachments

mixed

$customheaders

Response

boolean

If successful returns true

« More »

setNoAnswerMode

setNoAnswerMode

package

Default

Arguments

$thissurvey

« More »

setTransactionBookmark

Set a transaction bookmark - this is critical for Postgres because a transaction in Postgres cannot be continued unless you roll back to the transaction bookmark first

package

Default

Arguments

$sBookmark

mixed

Name of the bookmark

« More »

setupColumns

setupColumns() defines all the html tags to be wrapped around various list type answers.

package

Default

deprecated

Don't use anymore. Only usage left in printabel survey where it needs to be replaced

It returns an array with the following items: $wrapper['whole-start'] = Opening wrapper for the whole list $wrapper['whole-end'] = closing wrapper for the whole list $wrapper['col-devide'] = normal column devider $wrapper['col-devide-last'] = the last column devider (to allow for different styling of the last column $wrapper['item-start'] = opening wrapper tag for individual option $wrapper['item-start-other'] = opening wrapper tag for other option $wrapper['item-start-noanswer'] = opening wrapper tag for no answer option $wrapper['item-end'] = closing wrapper tag for individual option $wrapper['maxrows'] = maximum number of rows in each column $wrapper['cols'] = Number of columns to be inserted (and checked against)


Columns are a problem. Really there is no perfect solution to columns at the moment.

  • Using Tables is problematic semanticly.
  • Using inline or float to create columns, causes the answers flows horizontally, not vertically which is not ideal visually.
  • Using CSS3 columns is also a problem because of browser support and also because if you have answeres split across two or more lines, and those answeres happen to fall at the bottom of a column, the answer might be split across columns as well as lines.
  • Using nested unordered list with the first level of
  • s floated is the same as using tables and so is bad semantically for the same reason tables are bad.
  • Breaking the unordered lists into consecutive floated unordered lists is not great semantically but probably not as bad as using tables.

Because I haven't been able to decide which option is the least bad, I have handed over that responsibility to the admin who sets LimeSurvey up on their server.

There are four options: 'css' using one of the various CSS only methods for rendering columns. (Check the CSS file for your chosen template to see how columns are defined.) 'ul' using multiple floated unordered lists. (DEFAULT) 'table' using conventional tables based layout. NULL blocks the use of columns

'ul' is the default because it's the best possible compromise between semantic markup and visual layout.

Arguments

$columns

integer

  • the number of columns, usually supplied by $dcols

$answer_count

integer

  • the number of answers to a question, usually supplied by $anscount

$wrapperclass

string

  • a global class for the wrapper

$itemclass

string

  • a class for the item

Response

array

with all the various opening and closing tags to generate a set of columns.

« More »

short_implode

Implode and sort content array for very long arrays

package

Default

Arguments

$sDelimeter

string

$sHyphen

$aArray

array

Response

string

String showing array content

« More »

shouldFilterUserGroupList

Determines whether the list of user groups will need filtering before viewing.

package

Default

returns

bool

« More »

ShowDBUpgradeNotice

package

Default

Response

string

html

« More »

showHelp

Display help guide for this command.

package

com.tecnick.tcpdf

« More »

showJavaScript

This function converts emebedded Javascript to Text

package

Default

Arguments

$sContent

string

String to clean

Response

string

Cleaned string

« More »

sodium_add

package

Default

see \ParagonIE_Sodium_Compat::add()
Throws
\SodiumException

Arguments

$string1

string

$string2

string

« More »

sodium_base642bin

package

Default

see \ParagonIE_Sodium_Compat::bin2base64()
Throws
\SodiumException
\TypeError

Arguments

$string

string

$variant

integer

$ignore

string

Response

string

« More »

sodium_bin2base64

package

Default

see \ParagonIE_Sodium_Compat::bin2base64()
Throws
\SodiumException
\TypeError

Arguments

$string

string

$variant

integer

Response

string

« More »

sodium_bin2hex

package

Default

see \ParagonIE_Sodium_Compat::hex2bin()
Throws
\SodiumException
\TypeError

Arguments

$string

string

Response

string

« More »

sodium_compare

package

Default

see \ParagonIE_Sodium_Compat::compare()
Throws
\SodiumException
\TypeError

Arguments

$string1

string

$string2

string

Response

integer

« More »

sodium_crypto_aead_aes256gcm_decrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt()

Arguments

$ciphertext

string

$additional_data

string

$nonce

string

$key

string

Response

string|boolean

« More »

sodium_crypto_aead_aes256gcm_encrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$additional_data

string

$nonce

string

$key

string

Response

string

« More »

sodium_crypto_aead_aes256gcm_is_available

« More »

sodium_crypto_aead_chacha20poly1305_decrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt()

Arguments

$ciphertext

string

$additional_data

string

$nonce

string

$key

string

Response

string|boolean

« More »

sodium_crypto_aead_chacha20poly1305_encrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$additional_data

string

$nonce

string

$key

string

Response

string

« More »

sodium_crypto_aead_chacha20poly1305_ietf_decrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt()

Arguments

$message

string

$additional_data

string

$nonce

string

$key

string

Response

string|boolean

« More »

sodium_crypto_aead_chacha20poly1305_ietf_encrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$additional_data

string

$nonce

string

$key

string

Response

string

« More »

sodium_crypto_aead_chacha20poly1305_ietf_keygen

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen()
Throws
\Exception

Response

string

« More »

sodium_crypto_aead_chacha20poly1305_keygen

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen()
Throws
\Exception

Response

string

« More »

sodium_crypto_aead_xchacha20poly1305_ietf_decrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt()

Arguments

$ciphertext

string

$additional_data

string

$nonce

string

$key

string

Response

string|boolean

« More »

sodium_crypto_aead_xchacha20poly1305_ietf_encrypt

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$additional_data

string

$nonce

string

$key

string

Response

string

« More »

sodium_crypto_aead_xchacha20poly1305_ietf_keygen

package

Default

see \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen()
Throws
\Exception

Response

string

« More »

sodium_crypto_auth

package

Default

see \ParagonIE_Sodium_Compat::crypto_auth()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$key

string

Response

string

« More »

sodium_crypto_auth_keygen

package

Default

see \ParagonIE_Sodium_Compat::crypto_auth_keygen()
Throws
\Exception

Response

string

« More »

sodium_crypto_auth_verify

package

Default

see \ParagonIE_Sodium_Compat::crypto_auth_verify()
Throws
\SodiumException
\TypeError

Arguments

$mac

string

$message

string

$key

string

Response

boolean

« More »

sodium_crypto_box

package

Default

see \ParagonIE_Sodium_Compat::crypto_box()
Throws
\SodiumException
\TypeError

Arguments

$message

string

$nonce

string

$key_pair

string

Response

string

« More »

sodium_crypto_box_keypair

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_keypair()
Throws
\SodiumException
\TypeError

Response

string

« More »

sodium_crypto_box_keypair_from_secretkey_and_publickey

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey()
Throws
\SodiumException
\TypeError

Arguments

$secret_key

string

$public_key

string

Response

string

« More »

sodium_crypto_box_open

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_open()

Arguments

$ciphertext

string

$nonce

string

$key_pair

string

Response

string|boolean

« More »

sodium_crypto_box_publickey

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_publickey()
Throws
\SodiumException
\TypeError

Arguments

$key_pair

string

Response

string

« More »

sodium_crypto_box_publickey_from_secretkey

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey()
Throws
\SodiumException
\TypeError

Arguments

$secret_key

string

Response

string

« More »

sodium_crypto_box_seal

package

Default

see \ParagonIE_Sodium_Compat::crypto_box_seal()
Throws
\SodiumException
\TypeError

Arguments