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