src/bbn/html/element.php
public static function check_config($cfg){
    if ( !\is_array($cfg) ){
      self::$error = "The configuration is not a valid array";
      return false;
    }
    self::$validator->check(bbn\x::to_object($cfg), static::$schema);
    self::$error = '';
    if ( self::$validator->isValid() ){
      return 1;
    }
    foreach ( self::$validator->getErrors() as $error ){
      self::$error .= sprintf("[%s] %s",$error['property'], $error['message']);
      var_dump($cfg);
    }
    return false;
  }
public static function check_config($cfg){
    if ( !\is_array($cfg) ){
      self::$error = "The configuration is not a valid array";
      return false;
    }
    self::$validator->check(bbn\x::to_object($cfg), static::$schema);
    self::$error = '';
    if ( self::$validator->isValid() ){
      return 1;
    }
    foreach ( self::$validator->getErrors() as $error ){
      self::$error .= sprintf("[%s] %s",$error['property'], $error['message']);
      var_dump($cfg);
    }
    return false;
  }
public static function check_config ( $ cfg ) { if ( ! \ is_array ( $ cfg ) ) { self :: $ error = "The configuration is not a valid array" ; return false ; } self :: $ validator -> check ( bbn \ x :: to_object ( $ cfg ) , static :: $ schema ) ; self :: $ error = '' ; if ( self :: $ validator -> isValid ( ) ) { return 1 ; } foreach ( self :: $ validator -> getErrors ( ) as $ error ) { self :: $ error .= sprintf ( "[%s] %s" , $ error [ 'property' ] , $ error [ 'message' ] ) ; var_dump ( $ cfg ) ; } return false ; }
Confront the JSON schema object with the current configuration

@param array $cfg Configuration
@return bool
Confront the JSON schema object with the current configuration