T) { case 'ARR': return new FRArray($options,$parent); case 'AE': return new FRAssigmentExpression($options,$parent); case 'BE': return new FRBinaryExpression($options,$parent); case 'BLO': return new FRBlock($options,$parent); case 'BL': return new FRBool($options,$parent); case 'BR': return new FRBreak($options,$parent); case 'VAR': return new FRVariable($options,$parent); case 'CE': return new FRCondE($options,$parent); case 'FC': return new FRFCExpression($options,$parent); case 'FOR': return new FRFor($options,$parent); case 'FE': return new FRForE($options,$parent); case 'IF': return new FRIfStatement($options,$parent); case 'ME': return new FRMembE($options,$parent); case 'Null': return new FRNull($options,$parent); case 'NUM': return new FRNumber($options,$parent); case 'RE': return new FRReturn($options,$parent); case 'STR': return new FRString($options,$parent); case "PE": return new ParenthezisedExpression($options,$parent); case 'UE': return new FRUnaryExpression($options,$parent); case 'RNF': return new FRField($options,$parent); } throw new \Exception('Undefined formula element '.$options->T); } public static function AddField($type,$field){ FRFactory::GetDictionary()[$type]=$field; } }