methodString = $methodString; } public function invokeMethod($flow, $form) { //function[\s\n]+(\S+)[\s\n]*\( preg_match_all("/function[\s\n]+(\S+)[\s\n]*\(/", $this->methodString, $arr); eval($this->methodString . ";"); $func=$arr[1][0]; return $func($flow, $form); } }; return $obj; } }