Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

File Size: 658 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Functions:: (33 methods):
  setCompatibilityMode()
  getCompatibilityMode()
  setReturnDateType()
  getReturnDateType()
  DUMMY()
  DIV0()
  NA()
  NAN()
  NAME()
  REF()
  null()
  VALUE()
  isMatrixValue()
  isValue()
  isCellValue()
  ifCondition()
  errorType()
  isBlank()
  isErr()
  isError()
  isNa()
  isEven()
  isOdd()
  isNumber()
  isLogical()
  isText()
  isNonText()
  n()
  TYPE()
  flattenArray()
  flattenArrayIndexed()
  flattenSingleValue()
  isFormula()


Class: Functions  - X-Ref

setCompatibilityMode($compatibilityMode)   X-Ref
Set the Compatibility Mode.

param: string $compatibilityMode Compatibility Mode
return: bool (Success or Failure)

getCompatibilityMode()   X-Ref
Return the current Compatibility Mode.

return: string Compatibility Mode

setReturnDateType($returnDateType)   X-Ref
Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).

param: string $returnDateType Return Date Format
return: bool Success or failure

getReturnDateType()   X-Ref
Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object).

return: string Return Date Format

DUMMY()   X-Ref
DUMMY.

return: string #Not Yet Implemented

DIV0()   X-Ref
DIV0.

return: string #Not Yet Implemented

NA()   X-Ref
NA.

Excel Function:
=NA()

Returns the error value #N/A
#N/A is the error value that means "no value is available."

return: string #N/A!

NAN()   X-Ref
NaN.

Returns the error value #NUM!

return: string #NUM!

NAME()   X-Ref
NAME.

Returns the error value #NAME?

return: string #NAME?

REF()   X-Ref
REF.

Returns the error value #REF!

return: string #REF!

null()   X-Ref
NULL.

Returns the error value #NULL!

return: string #NULL!

VALUE()   X-Ref
VALUE.

Returns the error value #VALUE!

return: string #VALUE!

isMatrixValue($idx)   X-Ref
No description

isValue($idx)   X-Ref
No description

isCellValue($idx)   X-Ref
No description

ifCondition($condition)   X-Ref
No description

errorType($value = '')   X-Ref
ERROR_TYPE.

param: mixed $value Value to check
return: bool

isBlank($value = null)   X-Ref
IS_BLANK.

param: mixed $value Value to check
return: bool

isErr($value = '')   X-Ref
IS_ERR.

param: mixed $value Value to check
return: bool

isError($value = '')   X-Ref
IS_ERROR.

param: mixed $value Value to check
return: bool

isNa($value = '')   X-Ref
IS_NA.

param: mixed $value Value to check
return: bool

isEven($value = null)   X-Ref
IS_EVEN.

param: mixed $value Value to check
return: bool|string

isOdd($value = null)   X-Ref
IS_ODD.

param: mixed $value Value to check
return: bool|string

isNumber($value = null)   X-Ref
IS_NUMBER.

param: mixed $value Value to check
return: bool

isLogical($value = null)   X-Ref
IS_LOGICAL.

param: mixed $value Value to check
return: bool

isText($value = null)   X-Ref
IS_TEXT.

param: mixed $value Value to check
return: bool

isNonText($value = null)   X-Ref
IS_NONTEXT.

param: mixed $value Value to check
return: bool

n($value = null)   X-Ref
N.

Returns a value converted to a number

param: null|mixed $value The value you want converted
return: number N converts values listed in the following table

TYPE($value = null)   X-Ref
TYPE.

Returns a number that identifies the type of a value

param: null|mixed $value The value you want tested
return: number N converts values listed in the following table

flattenArray($array)   X-Ref
Convert a multi-dimensional array to a simple 1-dimensional array.

param: array $array Array to be flattened
return: array Flattened array

flattenArrayIndexed($array)   X-Ref
Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing.

param: array $array Array to be flattened
return: array Flattened array

flattenSingleValue($value = '')   X-Ref
Convert an array to a single scalar value by extracting the first element.

param: mixed $value Array or scalar value
return: mixed

isFormula($cellReference = '', ?Cell $pCell = null)   X-Ref
ISFORMULA.

param: mixed $cellReference The cell to check
param: Cell $pCell The current cell (containing this formula)
return: bool|string