src/wcmf/lib/presentation/ApplicationError.php
public static function get($code, $data=null) {
    self::predefine();
    if (defined($code)) {
      $def = unserialize(constant($code));
      $error = new ApplicationError($def[0], $def[1], $def[2], $def[3], $data);
      return $error;
    }
    else {
      throw new IllegalArgumentException("The error code '".$code."' is not defined");
    }
  }
public static function get($code, $data=null) {
    self::predefine();
    if (defined($code)) {
      $def = unserialize(constant($code));
      $error = new ApplicationError($def[0], $def[1], $def[2], $def[3], $data);
      return $error;
    }
    else {
      throw new IllegalArgumentException("The error code '".$code."' is not defined");
    }
  }
public static function get ( $ code , $ data = null ) { self :: predefine ( ) ; if ( defined ( $ code ) ) { $ def = unserialize ( constant ( $ code ) ) ; $ error = new ApplicationError ( $ def [ 0 ] , $ def [ 1 ] , $ def [ 2 ] , $ def [ 3 ] , $ data ) ; return $ error ; } else { throw new IllegalArgumentException ( "The error code '" . $ code . "' is not defined" ) ; } }
Factory method for retrieving a predefined error instance.
@param $code An error code
@param $data Some error codes required to transmit further information
to the client (optional, default: _null_)
@return ApplicationError
Factory method for retrieving a predefined error instance .