1<?php 2 3/** 4 * Check that the function name is valid 5 * 6 */ 7class gtIsValidFunction extends gtPreCondition { 8 9 public function check( $clo) { 10 if($clo->hasOption('f') ) { 11 $function = $clo->getOption('f'); 12 $functions = get_defined_functions(); 13 if( in_array( $function, $functions['internal'] ) ) { 14 return true; 15 } 16 return false; 17 } 18 return true; 19 } 20 21 public function getMessage() { 22 return gtText::get('unknownFunction'); 23 } 24} 25?>