protected function checkCondition($input, $conditions)
    {
        foreach ($conditions['match'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value)) {
                return false;
            }
        }

        foreach ($conditions['empty'] as $key => $value) {
            if (!$this->checkEmpty($input, $key)) {
                return false;
            }
        }

        foreach ($conditions['match_regexp'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, true, true)) {
                return false;
            }
        }

        foreach ($conditions['not_match'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, false)) {
                return false;
            }
        }

        foreach ($conditions['not_empty'] as $key => $value) {
            if ($this->checkEmpty($input, $key)) {
                return false;
            }
        }

        foreach ($conditions['not_match_regexp'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, false, true)) {
                return false;
            }
        }

        return true;
    }
protected function checkCondition($input, $conditions)
    {
        foreach ($conditions['match'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value)) {
                return false;
            }
        }

        foreach ($conditions['empty'] as $key => $value) {
            if (!$this->checkEmpty($input, $key)) {
                return false;
            }
        }

        foreach ($conditions['match_regexp'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, true, true)) {
                return false;
            }
        }

        foreach ($conditions['not_match'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, false)) {
                return false;
            }
        }

        foreach ($conditions['not_empty'] as $key => $value) {
            if ($this->checkEmpty($input, $key)) {
                return false;
            }
        }

        foreach ($conditions['not_match_regexp'] as $key => $value) {
            if (!$this->checkValue($input, $key, $value, false, true)) {
                return false;
            }
        }

        return true;
    }
protected function checkCondition ( $ input , $ conditions ) { foreach ( $ conditions [ 'match' ] as $ key => $ value ) { if ( ! $ this -> checkValue ( $ input , $ key , $ value ) ) { return false ; } } foreach ( $ conditions [ 'empty' ] as $ key => $ value ) { if ( ! $ this -> checkEmpty ( $ input , $ key ) ) { return false ; } } foreach ( $ conditions [ 'match_regexp' ] as $ key => $ value ) { if ( ! $ this -> checkValue ( $ input , $ key , $ value , true , true ) ) { return false ; } } foreach ( $ conditions [ 'not_match' ] as $ key => $ value ) { if ( ! $ this -> checkValue ( $ input , $ key , $ value , false ) ) { return false ; } } foreach ( $ conditions [ 'not_empty' ] as $ key => $ value ) { if ( $ this -> checkEmpty ( $ input , $ key ) ) { return false ; } } foreach ( $ conditions [ 'not_match_regexp' ] as $ key => $ value ) { if ( ! $ this -> checkValue ( $ input , $ key , $ value , false , true ) ) { return false ; } } return true ; }
Test the input with the given set of conditions
True by default

@param mixed $input
@param array $conditions

@return bool
Test the input with the given set of conditions True by default