Fakoli Framework
ExclusionFilter Class Reference

Used to place a filter on the contents of a DataItem-derived object. More...

Public Member Functions

 ExclusionFilter ()
 
 isExcluded ($field)
 
 add ()
 
 remove ()
 
 includeField ($field)
 
 excludeField ($field)
 

Public Attributes

 $fields = array()
 
 $type = "ExclusionFilter"
 

Detailed Description

Used to place a filter on the contents of a DataItem-derived object.

With an ExclusionFilter, the specified fields will be excluded from any subsequent queries or operations.

Definition at line 47 of file abstract_data_item.inc.

Member Function Documentation

◆ add()

ExclusionFilter::add ( )

Definition at line 66 of file abstract_data_item.inc.

67  {
68  $args = func_get_args();
69  for($i = 0; $i < count($args); ++$i)
70  {
71  $this->fields[$args[$i]] = true;
72  }
73  }

◆ excludeField()

ExclusionFilter::excludeField (   $field)

Definition at line 89 of file abstract_data_item.inc.

90  {
91  $this->add($field);
92  }

◆ ExclusionFilter()

ExclusionFilter::ExclusionFilter ( )

Definition at line 52 of file abstract_data_item.inc.

53  {
54  $args = func_get_args();
55  for($i = 0; $i < count($args); ++$i)
56  {
57  $this->fields[$args[$i]] = true;
58  }
59  }

◆ includeField()

ExclusionFilter::includeField (   $field)

Definition at line 84 of file abstract_data_item.inc.

85  {
86  $this->remove($field);
87  }

◆ isExcluded()

ExclusionFilter::isExcluded (   $field)

Definition at line 61 of file abstract_data_item.inc.

62  {
63  return (array_key_exists($field, $this->fields));
64  }

◆ remove()

ExclusionFilter::remove ( )

Definition at line 75 of file abstract_data_item.inc.

76  {
77  $args = func_get_args();
78  for($i = 0; $i < count($args); ++$i)
79  {
80  unset($this->fields[$args[$i]]);
81  }
82  }

Member Data Documentation

◆ $fields

ExclusionFilter::$fields = array()

Definition at line 49 of file abstract_data_item.inc.

◆ $type

ExclusionFilter::$type = "ExclusionFilter"

Definition at line 50 of file abstract_data_item.inc.


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