You are here

class MathfieldMathExpr in Math Field 7

Evalueate a mathfield expression.

Hierarchy

Expanded class hierarchy of MathfieldMathExpr

File

includes/mathfield.math_expr.inc, line 13

View source
class MathfieldMathExpr extends ctools_math_expr {

  /**
   * Handle errors gracefully.
   *
   * @throws MathfieldException
   */
  public function trigger($msg) {
    $this->last_error = $msg;
    if (!$this->suppress_errors) {
      throw new MathfieldException($msg);
    }
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ctools_math_expr::$binaryops protected property The set of operators using two arguments.
ctools_math_expr::$constvars protected property The names of constants, used to make constants read-only.
ctools_math_expr::$errors public property List of all errors reported.
ctools_math_expr::$funcs protected property Definitions of all built-in functions.
ctools_math_expr::$last_error public property The last error message reported.
ctools_math_expr::$ops protected property Operators and their precedence.
ctools_math_expr::$simplefuncs protected property Built in simple (one arg) functions. Merged into $this->funcs in constructor.
ctools_math_expr::$suppress_errors public property If TRUE do not call trigger_error on error other wise do.
ctools_math_expr::$userfuncs protected property User defined functions.
ctools_math_expr::$vars protected property Variable and constant values.
ctools_math_expr::e public function Backwards compatible wrapper for evaluate().
ctools_math_expr::evaluate public function Evaluate the expression.
ctools_math_expr::funcs public function Fetch all user defined functions in the expression.
ctools_math_expr::nfx private function Convert infix to postfix notation.
ctools_math_expr::pfx public function Evaluate a prefix-operator stack expression.
ctools_math_expr::set_suppress_errors public function Change the suppress errors flag.
ctools_math_expr::vars public function Fetch an array of variables used in the expression.
ctools_math_expr::__construct public function Public constructor.
MathfieldMathExpr::trigger public function Handle errors gracefully. Overrides ctools_math_expr::trigger