isBlank() публичный статический Метод

Example: $result = Strings::isBlank('0'); Result: false
public static isBlank ( string $string ) : boolean
$string string
Результат boolean
Пример #1
0
 public function validateNotBlank($value, $errorMessage, $errorField = null)
 {
     if (Strings::isBlank($value)) {
         $this->error($errorMessage);
         $this->_errorFields[] = $errorField;
     }
 }
Пример #2
0
 /**
  * @test
  */
 public function shouldReturnTrueForBlankString()
 {
     $this->assertTrue(Strings::isBlank(''));
     $this->assertTrue(Strings::isBlank(' '));
     $this->assertTrue(Strings::isBlank("\t\n\r"));
 }
Пример #3
0
 public function nullifyIfEmpty()
 {
     $fields = func_get_args();
     foreach ($fields as $field) {
         if (isset($this->{$field}) && !is_bool($this->{$field}) && Strings::isBlank($this->{$field})) {
             $this->{$field} = null;
         }
     }
 }
Пример #4
0
 public function isEmpty()
 {
     return Strings::isBlank($this->sql);
 }