Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_table\local\filter\numeric_comparison_filter Class Reference

Class representing an integer filter. More...

Inheritance diagram for core_table\local\filter\numeric_comparison_filter:
core_table\local\filter\filter

Public Member Functions

 add_filter_value ($value)
 Add a value to the filter.
 
 count ()
 Return the number of contexts.
 
 current ()
 Return the current filter value.
 
 get_filter_values ()
 Return the current filter values.
 
 get_join_type ()
 Return the currently specified join type.
 
 get_name ()
 Return the name of the filter.
 
 jsonSerialize ()
 Serialize filter.
 
 key ()
 Returns the current position of the iterator.
 
 next ()
 Move to the next value in the list.
 
 reset_iterator ()
 Reset the iterator position.
 
 rewind ()
 Rewind the Iterator position to the start.
 
 set_join_type (int $jointype)
 Specify the type of join to employ for the filter.
 
 valid ()
 Check if the current position is valid.
 

Public Attributes

int const JOINTYPE_ALL = 2
 All of the following match.
 
int const JOINTYPE_ANY = 1
 Any of the following match.
 
int const JOINTYPE_DEFAULT = 1
 The default filter type (ANY)
 
int const JOINTYPE_NONE = 0
 None of the following match.
 

Protected Member Functions

 get_direction (string $direction)
 Get the authoritative direction.
 
 sort_filter_values ()
 Sort the filter values to ensure reliable, and consistent output.
 

Protected Attributes

array $filtervalues = []
 The list of active filter values.
 
int $iteratorposition = null
 The current iterator position.
 
int $jointype = self::JOINTYPE_DEFAULT
 The join type currently in use.
 
int[] $jointypes
 valid join types
 
string $name = null
 The name of this filter.
 

Detailed Description

Class representing an integer filter.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_filter_value()

core_table\local\filter\numeric_comparison_filter::add_filter_value ( $value)

Add a value to the filter.

Parameters
string$valueA json-encoded array containing a direction, and comparison value
Return values
self

Reimplemented from core_table\local\filter\filter.

◆ count()

core_table\local\filter\filter::count ( )
inherited

Return the number of contexts.

Return values
int

◆ get_direction()

core_table\local\filter\numeric_comparison_filter::get_direction ( string $direction)
protected

Get the authoritative direction.

Parameters
string$directionThe supplied direction
Return values
stringThe authoritative direction

◆ get_filter_values()

core_table\local\filter\filter::get_filter_values ( )
inherited

Return the current filter values.

Return values
mixed[]

◆ get_join_type()

core_table\local\filter\filter::get_join_type ( )
inherited

Return the currently specified join type.

Return values
int

◆ get_name()

core_table\local\filter\filter::get_name ( )
inherited

Return the name of the filter.

Return values
string

◆ jsonSerialize()

core_table\local\filter\filter::jsonSerialize ( )
inherited

Serialize filter.

Return values
mixed|object

◆ key()

core_table\local\filter\filter::key ( )
inherited

Returns the current position of the iterator.

Return values
int

◆ set_join_type()

core_table\local\filter\filter::set_join_type ( int $jointype)
inherited

Specify the type of join to employ for the filter.

Parameters
int$jointypeThe join type to use using one of the supplied constants
Return values
self

◆ valid()

core_table\local\filter\filter::valid ( )
inherited

Check if the current position is valid.

Return values
bool

Member Data Documentation

◆ $jointypes

int [] core_table\local\filter\filter::$jointypes
protectedinherited
Initial value:
= [
]
int const JOINTYPE_ALL
All of the following match.
Definition filter.php:54
int const JOINTYPE_ANY
Any of the following match.
Definition filter.php:51
int const JOINTYPE_NONE
None of the following match.
Definition filter.php:48

valid join types


The documentation for this class was generated from the following file: