root/scripts/dev/generate-phpt/src/setup/preconditions/gtIsValidClass.php

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. check
  2. getMessage

<?php

/**
 * Check that the class name is valid
 *
 */
class gtIsValidClass extends gtPreCondition {

  public function check( $clo) {
    if($clo->hasOption('c') ) {
      $className = $clo->getOption('c');
      if( in_array( $className, get_declared_classes() ) ) {
        return true;
      }
      return false;
    }
    return true;
  }

  public function getMessage() {
    return gtText::get('unknownClass');
  }
}

/* [<][>][^][v][top][bottom][index][help] */