SofaDoc

SofaDoc Map Usage

inc/expressionfunction.php

Contains the swExpressionFunction class to define functions and all its subclasses
File also popluates the global $swExpressionFunctions array (only once for performance)

Classes

swExpressionFunction

Provides a class to delegate and execute function.
$label function label as used in RPN (starting with :)
$arity number of arguments (must be present, because in RPN it is not present any more)

Methods

run0($args)
run($args)

Properties

$label
$arity
$isOperator

swExpressionCompiledFunction extends swExpressionFunction

Provides a class to compile functions defined in Relation.
$lines() source text
$compiledlines() rpn representation
$xp internal expression engine
$args() runtime arguments
$offset runtime offset state

Methods

__construct($lb,$source,$off)
compile()
run($args)

Properties

$lines
$compiledlines
$xp
$args
$offset

xpAbs extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpAdd extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpAnd extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpAndRight extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpCeil extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpBigramStat extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpComma extends swExpressionFunction

Nop function

Methods

__construct()
run($args)

Properties


xpConcat extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpCos extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpCosineSimilarity extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpDiv extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpEqN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpEqS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpFileExists extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpExp extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpFalse extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpFloor extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpFormat extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpGeN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpGeS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpGtN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpGtS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


XpHint extends swExpressionFunction

Returns true if a text matches the hint pattern.
A hint is a combination fof urltext, separated by spaces (AND) and by pipes (OR).
"foo bar" foo AND bar
"foo|bar" foo OR bar
"alice bob/foo" (alice AND bob) OR foo
There can not be nested levels of space and pipes

Methods

__construct()
run($args)

Properties


xpIdiv extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpJaccardDistance extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLeN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLength extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLeS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLevenshtein extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLink extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLn extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLog extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLower extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLtN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpLtS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpMax extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpMin extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpMod extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpMul extends swExpressionFunction


Methods

__construct()
run($args)

Properties


XpNative extends swExpressionFunction

Provides a class to access wiki functions.
$nativefunction instance of wiki function class
Only functions with a defined arity can be included
Native function do not handle infinity and undefined
Native function do not expression functions

Methods

__construct()
init($key,$fn)
run($args)

Properties

$nativefunction

xpNeN extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpNeg extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpNeS extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpNot extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpOr extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpPad extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpPow extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpRegex extends swExpressionFunction

Provides a class to handle case-sensitive regex search
As an alternative for backslash \ the ∫ can be used

Methods

__construct()
run($args)

Properties


xpRegexi extends swExpressionFunction

Provides a class to handle case-insensitive regex search
As an alternative for backslash \ the ∫ can be used

Methods

__construct()
run($args)

Properties


xpRegexReplace extends swExpressionFunction

Provides a class to handle regex replace
As an alternative for backslash \ the ∫ can be used

Methods

__construct()
run($args)

Properties


xpRegexReplaceMod extends swExpressionFunction

Provides a class to handle regex replace with a modifier as argument
As an alternative for backslash \ the ∫ can be used

Methods

__construct()
run($args)

Properties


xpReplace extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpResume extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpRnd extends swExpressionFunction

Returns a random number between 0 and 999999

Methods

__construct()
run($agrs)

Properties


xpRound extends swExpressionFunction

Rounds to integer

Methods

__construct()
run($args)

Properties


XPSecondsToSql extends swExpressionFunction

Converts unix seconds to SQL date-time string

Methods

__construct()
run($args)

Properties


xpSign extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSin extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSoundex extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSoundexLong extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSqlEscape extends swExpressionFunction

Converts SQL date-time string to unix seconds

Methods

__construct()
run($args)

Properties


xpSqlToSeconds extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSqrt extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpStrip extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSub extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpSubstr extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpTag extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpTan extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpTemplate extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpTrim extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpWeightedJaccardDistance extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpTrue extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpUpper extends swExpressionFunction


Methods

__construct()
run($args)

Properties


xpUrlText extends swExpressionFunction

Converts text to urltext

Methods

__construct()
run($args)

Properties


xpXor extends swExpressionFunction


Methods

__construct()
run($args)

Properties

Used elements

Classes

XPAbs, XPAdd, XPAnd, XPCeil, XPComma, XPConcat, XPCos, XPDiv, XPEqN, XPEqS, XPFloor, XPFormat, XPGeN, XPGeS, XPGtN, XPGtS, XPHint, XPIdiv, XPLeS, XPLength, XPLink, XPLower, XPLtN, XPLtS, XPMax, XPMin, XPMod, XPMul, XPNeN, XPNeS, XPNeg, XPNot, XPOr, XPPad, XPPow, XPRegex, XPRegexReplace, XPRegexReplaceMod, XPRegexi, XPReplace, XPRnd, XPRound, XPSQLtoSeconds, XPSecondsToSQL, XPSign, XPSin, XPSoundex, XPSoundexLong, XPSqrt, XPStrip, XPSub, XPSubstr, XPTag, XPTan, XPTrim, XPUpper, XPXor, XPleN, XPurltext, XpExp, XpLn, XpLog, XpResume, XpTemplate, swExpression, swExpressionError, swTemplateParser, swWiki, xpBigramStat, xpCosineSimilarity, xpFileExists, xpJaccardDistance, xpLevenshtein, xpSqlEscape, xpWeightedJaccardDistance

Functions

swBigramStat, swConvertText15, swNameURL, swNumberformat, swResumeFromText

Globals

$swExpressionFunctions

Variables

$alist, $alistsum, $alistw, $andfound, $args, $blist, $blistsum, $blistw, $body, $command, $command2, $conditioncount, $dotxx, $dotxy, $dotyy, $dummy, $elem, $elsefound, $fields, $file1, $file2, $found, $hand, $hands, $hands2, $hors, $hors2, $jaccard, $length, $line, $list, $localvalues, $orfound, $result, $score, $source, $stack

Short variables: $a, $arg, $b, $c, $d, $eq, $f, $fn, $hor, $i, $il, $j, $k, $key, $lb, $off, $p, $raw, $s, $ti, $u, $v, $w

Features

array, class, exception, file, math, mb, preg, str, string, time, variable

Others

SQLite3, levenshtein, soundex