protected function create_proposition( $parent_name, $operator = null, $check_value = null ) {
		list( $operator, $check_value ) = $this->normalize_proposition( $operator, $check_value );

		// Allow check value can be a reference value of a variable in the context.
		// This can be done with: ['some-check', '!=', '@another-check'].
		if ( is_string( $check_value ) && 0 === strpos( $check_value, '@' ) ) {
			$check_value = $this->new_variable( substr( $check_value, 1 ) );
		}

		$vars = $this->new_variable( $parent_name );

		// The "is_" operator can not have check value.
		if ( 0 === strpos( $operator, 'is_' ) ) {
			return $vars->{$operator}();
		}

		return $vars->{$operator}( $check_value );
	}
protected function create_proposition( $parent_name, $operator = null, $check_value = null ) {
		list( $operator, $check_value ) = $this->normalize_proposition( $operator, $check_value );

		// Allow check value can be a reference value of a variable in the context.
		// This can be done with: ['some-check', '!=', '@another-check'].
		if ( is_string( $check_value ) && 0 === strpos( $check_value, '@' ) ) {
			$check_value = $this->new_variable( substr( $check_value, 1 ) );
		}

		$vars = $this->new_variable( $parent_name );

		// The "is_" operator can not have check value.
		if ( 0 === strpos( $operator, 'is_' ) ) {
			return $vars->{$operator}();
		}

		return $vars->{$operator}( $check_value );
	}
protected function create_proposition ( $ parent_name , $ operator = null , $ check_value = null ) { list ( $ operator , $ check_value ) = $ this -> normalize_proposition ( $ operator , $ check_value ) ; // Allow check value can be a reference value of a variable in the context. // This can be done with: ['some-check', '!=', '@another-check']. if ( is_string ( $ check_value ) && 0 === strpos ( $ check_value , '@' ) ) { $ check_value = $ this -> new_variable ( substr ( $ check_value , 1 ) ) ; } $ vars = $ this -> new_variable ( $ parent_name ) ; // The "is_" operator can not have check value. if ( 0 === strpos ( $ operator , 'is_' ) ) { return $ vars -> { $ operator } ( ) ; } return $ vars -> { $ operator } ( $ check_value ) ; }
Create a rule proposition.

@param  string $parent_name
@param  string $operator
@param  mixed  $check_value
@return mixed
Create a rule proposition .