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