Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function isOptionalArrayNotEmpty($value, $suppressException = true)
 {
     /* Clear the last error. */
     $this->lastError = null;
     /* If valid just return true. */
     if (Validator::isOptionalArrayNotEmpty($value)) {
         return true;
     }
     /* Set the error message. */
     $type = 'array' === gettype($value) ? 'empty array' : gettype($value);
     $this->lastError = sprintf('Expected null or array not empty, \'%s\' given.', $type);
     return $this->validationFailed($suppressException);
 }