src/wcmf/lib/persistence/impl/DefaultPersistenceFacade.php
private function checkArrayParameter($param, $paramName, $className=null) {
    if ($param == null) {
      return;
    }
    if (!is_array($param)) {
      throw new IllegalArgumentException("The parameter '".$paramName.
        "' is expected to be null or an array");
    }
    if ($className != null) {
      foreach ($param as $instance) {
        if (!($instance instanceof $className)) {
          throw new IllegalArgumentException("The parameter '".$paramName.
            "' is expected to contain only instances of '".$className."'");
        }
      }
    }
  }
private function checkArrayParameter($param, $paramName, $className=null) {
    if ($param == null) {
      return;
    }
    if (!is_array($param)) {
      throw new IllegalArgumentException("The parameter '".$paramName.
        "' is expected to be null or an array");
    }
    if ($className != null) {
      foreach ($param as $instance) {
        if (!($instance instanceof $className)) {
          throw new IllegalArgumentException("The parameter '".$paramName.
            "' is expected to contain only instances of '".$className."'");
        }
      }
    }
  }
private function checkArrayParameter ( $ param , $ paramName , $ className = null ) { if ( $ param == null ) { return ; } if ( ! is_array ( $ param ) ) { throw new IllegalArgumentException ( "The parameter '" . $ paramName . "' is expected to be null or an array" ) ; } if ( $ className != null ) { foreach ( $ param as $ instance ) { if ( ! ( $ instance instanceof $ className ) ) { throw new IllegalArgumentException ( "The parameter '" . $ paramName . "' is expected to contain only instances of '" . $ className . "'" ) ; } } } }
Check if the given value is either null or an array and
throw an exception if not
@param $param The parameter
@param $paramName The name of the parameter (used in the exception text)
@param $className Class name to match if, instances of a specific type are expected (optional)
Check if the given value is either null or an array and throw an exception if not