Back to index

php5  5.3.10
gtIsValidFunction.php
Go to the documentation of this file.
00001 <?php
00002 
00007 class gtIsValidFunction extends gtPreCondition {
00008 
00009   public function check( $clo) {
00010     if($clo->hasOption('f') ) {
00011       $function = $clo->getOption('f');
00012       $functions = get_defined_functions();
00013       if( in_array( $function, $functions['internal'] ) ) {
00014         return true;
00015       }
00016       return false;
00017     }
00018     return true;
00019   }
00020 
00021   public function getMessage() {
00022     return gtText::get('unknownFunction');
00023   }
00024 }
00025 ?>