yii\validators\Validator::isEmpty PHP 메소드

isEmpty() 공개 메소드

A value is considered empty if it is null, an empty array, or an empty string. Note that this method is different from PHP empty(). It will return false when the value is 0.
public isEmpty ( mixed $value ) : boolean
$value mixed the value to be checked
리턴 boolean whether the value is empty
    public function isEmpty($value)
    {
        if ($this->isEmpty !== null) {
            return call_user_func($this->isEmpty, $value);
        } else {
            return $value === null || $value === [] || $value === '';
        }
    }